Files
mev-beta/.qwen/commands/implement-algorithm.toml
2025-10-04 09:31:02 -05:00

1 line
2.2 KiB
TOML

name = \"implement-algorithm\"\ndescription = \"Implement Mathematical Algorithm - Implement the following mathematical algorithm for the MEV bot\"\ncategory = \"implementation\"\nparameters = [\n { name = \"algorithm\", type = \"string\", description = \"The mathematical algorithm to implement\" }\n]\n\n[command]\nshell = '''\necho \"# Implement Mathematical Algorithm\n\nImplement the following mathematical algorithm for the MEV bot: ${algorithm}\n\n## Implementation Framework:\n1. **Requirements Analysis**: Break down the mathematical requirements and precision needs\n2. **Formula Implementation**: Convert mathematical formulas to precise Go code\n3. **Precision Handling**: Use appropriate data types (uint256, big.Int) for calculations\n4. **Edge Case Handling**: Consider boundary conditions and error scenarios\n5. **Testing**: Create comprehensive tests including property-based tests\n6. **Optimization**: Optimize for performance while maintaining precision\n\n## Implementation Standards:\n- **Numerical Precision**: Use github.com/holiman/uint256 for precise uint256 arithmetic\n- **Error Handling**: Implement robust error handling with clear error messages\n- **Documentation**: Document all mathematical formulas and implementation decisions\n- **Testing**: Achieve >95% test coverage with property-based tests for mathematical functions\n- **Performance**: Consider performance implications and benchmark critical paths\n\n## File Organization:\n- **Core Logic**: Place in appropriate \\`pkg/uniswap/\\` or \\`pkg/math/\\` subdirectory\n- **Tests**: Co-locate with source files (\\`*_test.go\\`)\n- **Documentation**: Inline comments explaining mathematical formulas\n\n## Integration Points:\n- **Uniswap Pricing**: Integrate with \\`pkg/uniswap/\\` for pricing calculations\n- **Market Analysis**: Connect to \\`pkg/market/\\` for market data processing\n- **Precision Libraries**: Use \\`github.com/holiman/uint256\\` for uint256 arithmetic\n\n## Deliverables:\n- Working implementation with comprehensive tests\n- Documentation of mathematical formulas and implementation approach\n- Performance benchmarks for critical functions\n- Edge case handling and error scenarios\"\n'''\n