refactor: move all remaining files to orig/ directory
Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
128
orig/tools/math-audit/reports/math/latest/audit_report.md
Normal file
128
orig/tools/math-audit/reports/math/latest/audit_report.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# MEV Bot Math Audit Report
|
||||
|
||||
**Generated:** 2025-10-09T07:54:04-05:00
|
||||
**Test Vectors:** default
|
||||
**Error Tolerance:** 1.0 basis points
|
||||
|
||||
## Executive Summary
|
||||
|
||||
**Overall Status:** ✅ PASS
|
||||
|
||||
### Summary Statistics
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Total Tests | 10 |
|
||||
| Passed Tests | 10 |
|
||||
| Failed Tests | 0 |
|
||||
| Success Rate | 100.00% |
|
||||
| Exchanges Tested | 4 |
|
||||
|
||||
## Exchange Results
|
||||
|
||||
### UNISWAP_V3
|
||||
|
||||
**Status:** ✅ PASS
|
||||
**Duration:** 0s
|
||||
|
||||
#### Test Statistics
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Total Tests | 2 |
|
||||
| Passed | 2 |
|
||||
| Failed | 0 |
|
||||
| Max Error | 0.0000 bp |
|
||||
| Avg Error | 0.0000 bp |
|
||||
|
||||
#### Test Breakdown
|
||||
|
||||
| Category | Tests |
|
||||
|----------|-------|
|
||||
| Pricing Functions | 0 |
|
||||
| Amount Calculations | 1 |
|
||||
| Price Impact | 0 |
|
||||
|
||||
### CURVE
|
||||
|
||||
**Status:** ✅ PASS
|
||||
**Duration:** 0s
|
||||
|
||||
#### Test Statistics
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Total Tests | 2 |
|
||||
| Passed | 2 |
|
||||
| Failed | 0 |
|
||||
| Max Error | 0.0000 bp |
|
||||
| Avg Error | 0.0000 bp |
|
||||
|
||||
#### Test Breakdown
|
||||
|
||||
| Category | Tests |
|
||||
|----------|-------|
|
||||
| Pricing Functions | 0 |
|
||||
| Amount Calculations | 1 |
|
||||
| Price Impact | 0 |
|
||||
|
||||
### BALANCER
|
||||
|
||||
**Status:** ✅ PASS
|
||||
**Duration:** 0s
|
||||
|
||||
#### Test Statistics
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Total Tests | 2 |
|
||||
| Passed | 2 |
|
||||
| Failed | 0 |
|
||||
| Max Error | 0.0000 bp |
|
||||
| Avg Error | 0.0000 bp |
|
||||
|
||||
#### Test Breakdown
|
||||
|
||||
| Category | Tests |
|
||||
|----------|-------|
|
||||
| Pricing Functions | 0 |
|
||||
| Amount Calculations | 1 |
|
||||
| Price Impact | 0 |
|
||||
|
||||
### UNISWAP_V2
|
||||
|
||||
**Status:** ✅ PASS
|
||||
**Duration:** 0s
|
||||
|
||||
#### Test Statistics
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Total Tests | 4 |
|
||||
| Passed | 4 |
|
||||
| Failed | 0 |
|
||||
| Max Error | 0.0000 bp |
|
||||
| Avg Error | 0.0000 bp |
|
||||
|
||||
#### Test Breakdown
|
||||
|
||||
| Category | Tests |
|
||||
|----------|-------|
|
||||
| Pricing Functions | 0 |
|
||||
| Amount Calculations | 1 |
|
||||
| Price Impact | 1 |
|
||||
|
||||
## Recommendations
|
||||
|
||||
✅ All mathematical validations passed successfully.
|
||||
|
||||
### Next Steps
|
||||
|
||||
- Consider running extended test vectors for comprehensive validation
|
||||
- Implement continuous mathematical validation in CI/CD pipeline
|
||||
- Monitor for precision degradation with production data
|
||||
|
||||
---
|
||||
|
||||
*This report was generated by the MEV Bot Math Audit Tool*
|
||||
*Report generated at: 2025-10-09T07:54:04-05:00*
|
||||
129
orig/tools/math-audit/reports/math/latest/audit_results.json
Normal file
129
orig/tools/math-audit/reports/math/latest/audit_results.json
Normal file
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"timestamp": "2025-10-09T07:54:04.652531259-05:00",
|
||||
"vectors_file": "default",
|
||||
"tolerance_bp": 1,
|
||||
"exchange_results": {
|
||||
"balancer": {
|
||||
"exchange_type": "balancer",
|
||||
"total_tests": 2,
|
||||
"passed_tests": 2,
|
||||
"failed_tests": 0,
|
||||
"max_error_bp": 0,
|
||||
"avg_error_bp": 0,
|
||||
"failed_cases": [],
|
||||
"test_results": [
|
||||
{
|
||||
"test_name": "Weighted_80_20_Pool",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 23129,
|
||||
"description": "Price calculation test for balancer"
|
||||
},
|
||||
{
|
||||
"test_name": "Weighted_Pool_Swap",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 43,
|
||||
"description": "Amount calculation test for balancer"
|
||||
}
|
||||
],
|
||||
"duration": 25108
|
||||
},
|
||||
"curve": {
|
||||
"exchange_type": "curve",
|
||||
"total_tests": 2,
|
||||
"passed_tests": 2,
|
||||
"failed_tests": 0,
|
||||
"max_error_bp": 0,
|
||||
"avg_error_bp": 0,
|
||||
"failed_cases": [],
|
||||
"test_results": [
|
||||
{
|
||||
"test_name": "Stable_USDC_USDT",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 11825,
|
||||
"description": "Price calculation test for curve"
|
||||
},
|
||||
{
|
||||
"test_name": "Stable_Swap_Low_Impact",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 44,
|
||||
"description": "Amount calculation test for curve"
|
||||
}
|
||||
],
|
||||
"duration": 13510
|
||||
},
|
||||
"uniswap_v2": {
|
||||
"exchange_type": "uniswap_v2",
|
||||
"total_tests": 4,
|
||||
"passed_tests": 4,
|
||||
"failed_tests": 0,
|
||||
"max_error_bp": 0,
|
||||
"avg_error_bp": 0,
|
||||
"failed_cases": [],
|
||||
"test_results": [
|
||||
{
|
||||
"test_name": "ETH_USDC_Basic",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 13525,
|
||||
"description": "Price calculation test for uniswap_v2"
|
||||
},
|
||||
{
|
||||
"test_name": "WBTC_ETH_Basic",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 9079,
|
||||
"description": "Price calculation test for uniswap_v2"
|
||||
},
|
||||
{
|
||||
"test_name": "ETH_to_USDC_Swap",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 56,
|
||||
"description": "Amount calculation test for uniswap_v2"
|
||||
},
|
||||
{
|
||||
"test_name": "Large_ETH_Swap_Impact",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 69,
|
||||
"description": "Price impact test for uniswap_v2"
|
||||
}
|
||||
],
|
||||
"duration": 26862
|
||||
},
|
||||
"uniswap_v3": {
|
||||
"exchange_type": "uniswap_v3",
|
||||
"total_tests": 2,
|
||||
"passed_tests": 2,
|
||||
"failed_tests": 0,
|
||||
"max_error_bp": 6.8468e-13,
|
||||
"avg_error_bp": 3.4234e-13,
|
||||
"failed_cases": [],
|
||||
"test_results": [
|
||||
{
|
||||
"test_name": "ETH_USDC_V3_Basic",
|
||||
"passed": true,
|
||||
"error_bp": 6.8468e-13,
|
||||
"duration": 16251,
|
||||
"description": "Price calculation test for uniswap_v3"
|
||||
},
|
||||
{
|
||||
"test_name": "V3_Concentrated_Liquidity",
|
||||
"passed": true,
|
||||
"error_bp": 0,
|
||||
"duration": 75,
|
||||
"description": "Amount calculation test for uniswap_v3"
|
||||
}
|
||||
],
|
||||
"duration": 18398
|
||||
}
|
||||
},
|
||||
"overall_passed": true,
|
||||
"total_tests": 10,
|
||||
"total_passed": 10,
|
||||
"total_failed": 0
|
||||
}
|
||||
Reference in New Issue
Block a user