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:
Administrator
2025-11-10 10:53:05 +01:00
parent 803de231ba
commit c54c569f30
718 changed files with 8304 additions and 8281 deletions

View File

@@ -0,0 +1,128 @@
# MEV Bot Math Audit Report
**Generated:** 2025-10-19T23:18:22-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_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 |
### 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 |
## 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-19T23:18:22-05:00*

View File

@@ -0,0 +1,129 @@
{
"timestamp": "2025-10-19T23:18:22.27323505-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": 7985,
"description": "Price calculation test for balancer"
},
{
"test_name": "Weighted_Pool_Swap",
"passed": true,
"error_bp": 0,
"duration": 31,
"description": "Amount calculation test for balancer"
}
],
"duration": 8931
},
"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": 6725,
"description": "Price calculation test for curve"
},
{
"test_name": "Stable_Swap_Low_Impact",
"passed": true,
"error_bp": 0,
"duration": 21,
"description": "Amount calculation test for curve"
}
],
"duration": 7851
},
"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": 10469,
"description": "Price calculation test for uniswap_v2"
},
{
"test_name": "WBTC_ETH_Basic",
"passed": true,
"error_bp": 0,
"duration": 4963,
"description": "Price calculation test for uniswap_v2"
},
{
"test_name": "ETH_to_USDC_Swap",
"passed": true,
"error_bp": 0,
"duration": 73,
"description": "Amount calculation test for uniswap_v2"
},
{
"test_name": "Large_ETH_Swap_Impact",
"passed": true,
"error_bp": 0,
"duration": 67,
"description": "Price impact test for uniswap_v2"
}
],
"duration": 19068
},
"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": 16441,
"description": "Price calculation test for uniswap_v3"
},
{
"test_name": "V3_Concentrated_Liquidity",
"passed": true,
"error_bp": 0,
"duration": 71,
"description": "Amount calculation test for uniswap_v3"
}
],
"duration": 17977
}
},
"overall_passed": true,
"total_tests": 10,
"total_passed": 10,
"total_failed": 0
}

View File

@@ -0,0 +1,70 @@
{
"summary": {
"generated_at": "2025-10-20T04:25:07.908285289Z",
"total_vectors": 1,
"vectors_passed": 1,
"total_assertions": 1,
"assertions_passed": 1,
"property_checks": 4,
"property_succeeded": 4
},
"vectors": [
{
"name": "uniswap_v2_usdc_weth",
"description": "Uniswap V2 style pool with 10k WETH against 20M USDC",
"exchange": "uniswap_v2",
"passed": true,
"tests": [
{
"name": "amount_out_5_weth",
"type": "amount_out",
"passed": true,
"delta_bps": 0,
"expected": "9871580343970612988504",
"actual": "9871580343970612988504",
"annotations": [
"tolerance 1.0000 bps"
]
}
]
}
],
"property_checks": [
{
"name": "price_conversion_round_trip",
"type": "property",
"passed": true,
"delta_bps": 0,
"expected": "",
"actual": "",
"details": "all samples within 0.1% tolerance"
},
{
"name": "tick_conversion_round_trip",
"type": "property",
"passed": true,
"delta_bps": 0,
"expected": "",
"actual": "",
"details": "ticks round-trip within ±1"
},
{
"name": "price_monotonicity",
"type": "property",
"passed": true,
"delta_bps": 0,
"expected": "",
"actual": "",
"details": "higher ticks produced higher prices"
},
{
"name": "price_symmetry",
"type": "property",
"passed": true,
"delta_bps": 0,
"expected": "",
"actual": "",
"details": "price * inverse remained within 0.1%"
}
]
}

View File

@@ -0,0 +1,20 @@
# Math Audit Report
- Generated: 2025-10-20 04:25:07 UTC
- Vectors: 1/1 passed
- Assertions: 1/1 passed
- Property checks: 4/4 passed
## Vector Results
| Vector | Exchange | Status | Notes |
| --- | --- | --- | --- |
| uniswap_v2_usdc_weth | uniswap_v2 | ✅ PASS | |
## Property Checks
- ✅ price_conversion_round_trip — all samples within 0.1% tolerance
- ✅ tick_conversion_round_trip — ticks round-trip within ±1
- ✅ price_monotonicity — higher ticks produced higher prices
- ✅ price_symmetry — price * inverse remained within 0.1%