Restructured project for V2 refactor: **Structure Changes:** - Moved all V1 code to orig/ folder (preserved with git mv) - Created docs/planning/ directory - Added orig/README_V1.md explaining V1 preservation **Planning Documents:** - 00_V2_MASTER_PLAN.md: Complete architecture overview - Executive summary of critical V1 issues - High-level component architecture diagrams - 5-phase implementation roadmap - Success metrics and risk mitigation - 07_TASK_BREAKDOWN.md: Atomic task breakdown - 99+ hours of detailed tasks - Every task < 2 hours (atomic) - Clear dependencies and success criteria - Organized by implementation phase **V2 Key Improvements:** - Per-exchange parsers (factory pattern) - Multi-layer strict validation - Multi-index pool cache - Background validation pipeline - Comprehensive observability **Critical Issues Addressed:** - Zero address tokens (strict validation + cache enrichment) - Parsing accuracy (protocol-specific parsers) - No audit trail (background validation channel) - Inefficient lookups (multi-index cache) - Stats disconnection (event-driven metrics) Next Steps: 1. Review planning documents 2. Begin Phase 1: Foundation (P1-001 through P1-010) 3. Implement parsers in Phase 2 4. Build cache system in Phase 3 5. Add validation pipeline in Phase 4 6. Migrate and test in Phase 5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5.8 KiB
5.8 KiB
Arbitrage Calculation Validation Report
Generated: Sun Nov 9 16:57:46 CET 2025 Log File: /tmp/mev_latest_logs.txt
Summary Statistics
- Executable Opportunities: 11
- Total Opportunity Records: 23
- V3 Calculations: 600
- Threshold Checks: 11
- Rejections: 23
Executable Opportunities Analysis
Top 10 Executable Opportunities
2025/11/09 15:48:02 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703282_0x962306, Profit=0.311819 ETH (threshold=0.000100 ETH)
2025/11/09 15:48:05 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703285_0x251182, Profit=1249.324868 ETH (threshold=0.000100 ETH)
2025/11/09 15:49:31 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703371_0x440017, Profit=2.166576 ETH (threshold=0.000100 ETH)
2025/11/09 15:50:06 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703406_0x251182, Profit=1363.860509 ETH (threshold=0.000100 ETH)
2025/11/09 15:51:13 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703473_0x3096e7, Profit=83.981698 ETH (threshold=0.000100 ETH)
2025/11/09 15:51:13 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703473_0x3096e7, Profit=83.981698 ETH (threshold=0.000100 ETH)
2025/11/09 15:52:12 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703532_0x82aF49, Profit=0.429936 ETH (threshold=0.000100 ETH)
2025/11/09 15:52:23 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703543_0x440017, Profit=2.731067 ETH (threshold=0.000100 ETH)
2025/11/09 15:53:35 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703615_0x60bf4E, Profit=0.003708 ETH (threshold=0.000100 ETH)
2025/11/09 15:55:06 [INFO] ✅ EXECUTABLE OPPORTUNITY: ID=arb_1762703706_0x251182, Profit=1266.529570 ETH (threshold=0.000100 ETH)
Profit Calculation Validation
Sample Threshold Checks (First 5)
2025/11/09 15:48:02 [DEBUG] Profit threshold check: netProfit=0.311819 ETH, minThreshold=0.000100 ETH
2025/11/09 15:48:05 [DEBUG] Profit threshold check: netProfit=1249.324868 ETH, minThreshold=0.000100 ETH
2025/11/09 15:49:31 [DEBUG] Profit threshold check: netProfit=2.166576 ETH, minThreshold=0.000100 ETH
2025/11/09 15:50:06 [DEBUG] Profit threshold check: netProfit=1363.860509 ETH, minThreshold=0.000100 ETH
2025/11/09 15:51:13 [DEBUG] Profit threshold check: netProfit=83.981698 ETH, minThreshold=0.000100 ETH
Rejection Analysis
Rejection Reasons Breakdown
6 negative profit after gas and slippage costs token0:0x25118290e6A5f4139381D072181157035864099d token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x2511...099d tokenOut:WETH]
3 token0:0x440017A1b021006d556d7fc06A54c32E42Eb745B token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:G@ARB tokenOut:WETH updateCount:1]
2 negative profit after gas and slippage costs token0:0x440017A1b021006d556d7fc06A54c32E42Eb745B token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:G@ARB tokenOut:WETH]
2 token0:0x25118290e6A5f4139381D072181157035864099d token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x2511...099d tokenOut:WETH updateCount:1]
1 negative profit after gas and slippage costs token0:0x912CE59144191C1204E64559FE8253a0e49E6548 token1:0xd9844863fC8b0D5974fd32A31Bd5bEa507A32F51 tokenIn:ARB tokenOut:0xd984...2F51]
1 negative profit after gas and slippage costs token0:0x6985884C4392D348587B19cb9eAAf157F13271cd token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x6985...71cd tokenOut:WETH]
1 negative profit after gas and slippage costs token0:0x60bf4E7cF16Ff34513514b968483B54Beff42a81 token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x60bf...2a81 tokenOut:WETH]
1 negative profit after gas and slippage costs token0:0x5979D7b546E38E414F7E9822514be443A4800529 token1:0x73e2226dA3e8bd78155f70FDc5d13A85585Cd899 tokenIn:0x5979...0529 tokenOut:0x73e2...d899]
1 token0:0x9623063377AD1B27544C965cCd7342f7EA7e88C7 token1:0xd9844863fC8b0D5974fd32A31Bd5bEa507A32F51 tokenIn:0x9623...88C7 tokenOut:0xd984...2F51 updateCount:1]
1 token0:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 token1:0xc87B37a581ec3257B734886d9d3a581F5A9d056c tokenIn:WETH tokenOut:0xc87B...056c updateCount:1]
1 token0:0x60bf4E7cF16Ff34513514b968483B54Beff42a81 token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x60bf...2a81 tokenOut:WETH updateCount:1]
1 token0:0x3096e7BFd0878Cc65be71f8899Bc4CFB57187Ba3 token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x3096...7Ba3 tokenOut:WETH updateCount:2]
1 token0:0x3096e7BFd0878Cc65be71f8899Bc4CFB57187Ba3 token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x3096...7Ba3 tokenOut:WETH updateCount:1]
1 token0:0x25118290e6A5f4139381D072181157035864099d token1:0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 tokenIn:0x2511...099d tokenOut:WETH updateCount:2]
V3 Calculation Samples
Recent V3 Calculations (Last 10)
2025/11/09 15:57:38 [DEBUG] V3 calculation: amountIn=59, amountOut=0, fee=3000, finalOut=0
2025/11/09 15:57:38 [DEBUG] V3 calculation: amountIn=59, amountOut=0, fee=3000, finalOut=0
2025/11/09 15:57:38 [DEBUG] V3 calculation: amountIn=5917, amountOut=0, fee=3000, finalOut=0
2025/11/09 15:57:39 [DEBUG] V3 calculation: amountIn=5917, amountOut=0, fee=3000, finalOut=0
2025/11/09 15:57:39 [DEBUG] V3 calculation: amountIn=59, amountOut=6401, fee=3000, finalOut=6382
2025/11/09 15:57:42 [DEBUG] V3 calculation: amountIn=100000000, amountOut=5935, fee=3000, finalOut=5918
2025/11/09 15:57:42 [DEBUG] V3 calculation: amountIn=100000000, amountOut=5935, fee=3000, finalOut=5918
2025/11/09 15:57:42 [DEBUG] V3 calculation: amountIn=10000000, amountOut=593, fee=3000, finalOut=592
2025/11/09 15:57:42 [DEBUG] V3 calculation: amountIn=10000000, amountOut=593, fee=3000, finalOut=592
2025/11/09 15:57:43 [DEBUG] V3 calculation: amountIn=6382, amountOut=0, fee=500, finalOut=0
Report saved to: /docker/mev-beta/tests/calculation-validation/reports/validation_report_20251109_165746.md