docs: update planning with real issue - need cross-protocol arbitrage
FINDINGS: - Reserve refresh WAS already implemented and working - Real issue: only 9 V2 pools, no V3 pools, same-protocol only - Same-protocol (V2→V2) markets too efficient for public RPC bot - Need cross-protocol (V2↔V3) arbitrage for real opportunities PRIORITY FIXES: 1. Add UniswapV3 pool discovery (HIGH impact, 2 hrs) 2. Enable cross-protocol arbitrage detection (HIGH impact, 4 hrs) 3. Add more DEXs: SushiSwap, Camelot (MEDIUM impact, 3 hrs) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -804,6 +804,61 @@ Static test data can hide critical bugs like stale caches.
|
||||
|
||||
---
|
||||
|
||||
## 🔍 UPDATE: Reserve Refresh Already Implemented (Nov 30, 2024)
|
||||
|
||||
Upon inspection, **reserve refresh was already implemented** in:
|
||||
- `pkg/discovery/reserve_refresh.go` - V2 pools
|
||||
- `pkg/discovery/reserve_refresh_v3.go` - V3 pools
|
||||
- `cmd/mev-flashloan/main.go` lines 141-149 - Called before each scan
|
||||
|
||||
**The REAL issues are:**
|
||||
|
||||
### 1. Limited Pool Coverage
|
||||
- Only 9 UniswapV2 pools discovered
|
||||
- No UniswapV3 pools in cache (only parsing, not discovering)
|
||||
- Need 100+ pools for meaningful arbitrage opportunities
|
||||
|
||||
### 2. Same-Protocol Only
|
||||
- Current detector only checks V2→V2 arbitrage
|
||||
- REAL opportunities are V2→V3 cross-protocol
|
||||
- Same-protocol markets are too efficient
|
||||
|
||||
### 3. Market Efficiency
|
||||
- Professional MEV bots with:
|
||||
- Flashbots/private mempools
|
||||
- Sequencer-level access
|
||||
- Submillisecond execution
|
||||
- Public RPC bot can't compete on same-protocol arb
|
||||
|
||||
### Required Fixes (Priority Order):
|
||||
|
||||
| Fix | Impact | Effort |
|
||||
|-----|--------|--------|
|
||||
| Add UniswapV3 pool discovery | HIGH | 2 hours |
|
||||
| Enable cross-protocol arbitrage (V2↔V3) | HIGH | 4 hours |
|
||||
| Add SushiSwap, Camelot pools | MEDIUM | 3 hours |
|
||||
| Reduce scan interval to 5s | LOW | 5 min |
|
||||
| Add sequencer feed integration | HIGH | 8 hours |
|
||||
|
||||
### Why Cross-Protocol Matters
|
||||
|
||||
```
|
||||
Same-protocol (V2→V2):
|
||||
Pool A: 1 WETH = 3000 USDC
|
||||
Pool B: 1 WETH = 3001 USDC
|
||||
Difference: 0.03% - Too small, eaten by gas
|
||||
|
||||
Cross-protocol (V2→V3):
|
||||
V2 Pool: 1 WETH = 3000 USDC (constant product)
|
||||
V3 Pool: 1 WETH = 3050 USDC (concentrated liquidity)
|
||||
Difference: 1.67% - PROFITABLE!
|
||||
```
|
||||
|
||||
V3 pools have different pricing due to concentrated liquidity,
|
||||
creating larger arbitrage windows with V2 pools.
|
||||
|
||||
---
|
||||
|
||||
## 📋 Updated Implementation Checklist
|
||||
|
||||
### Immediate Fixes Required:
|
||||
|
||||
Reference in New Issue
Block a user