fix(critical): integrate multi-hop scanner with swap analyzer
✅ CRITICAL FIX #1: Connected swap analyzer to multi-hop scanner - Modified SubmitBridgeOpportunity() to trigger multi-hop scanner - Scanner uses token graph with 8 high-liquidity Arbitrum pools - Finds real multi-hop arbitrage paths (A→B→C→A) ✅ CRITICAL FIX #2: Lowered profit threshold 1000x - ExecuteArbitrageOpportunity: 0.01 ETH → 0.00001 ETH - Matches aggressive settings (/bin/bash.02 minimum) 🎯 Target: First profitable execution within 24 hours 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -737,13 +737,17 @@ func (s *MarketScanner) executeArbitrageOpportunity(opportunity stypes.Arbitrage
|
||||
}
|
||||
|
||||
// Only execute opportunities with sufficient profit
|
||||
minProfitThreshold := big.NewInt(10000000000000000) // 0.01 ETH minimum profit
|
||||
// AGGRESSIVE THRESHOLD: Lowered to match arbitrum_production.yaml settings (0.00001 ETH / $0.02)
|
||||
minProfitThreshold := big.NewInt(10000000000000) // 0.00001 ETH minimum profit - VERY AGGRESSIVE
|
||||
if opportunity.Profit.Cmp(minProfitThreshold) < 0 {
|
||||
s.logger.Debug(fmt.Sprintf("Arbitrage opportunity profit too low: %s < %s",
|
||||
opportunity.Profit.String(), minProfitThreshold.String()))
|
||||
s.logger.Debug(fmt.Sprintf("Arbitrage opportunity profit too low: %s < %s (%.6f ETH)",
|
||||
opportunity.Profit.String(), minProfitThreshold.String(), float64(opportunity.Profit.Int64())/1e18))
|
||||
return
|
||||
}
|
||||
|
||||
s.logger.Info(fmt.Sprintf("✅ PROFITABLE OPPORTUNITY FOUND! Profit: %.6f ETH (%.2f USD @ $2000/ETH)",
|
||||
float64(opportunity.Profit.Int64())/1e18, float64(opportunity.Profit.Int64())*2000/1e18))
|
||||
|
||||
s.logger.Info(fmt.Sprintf("Executing arbitrage opportunity with profit: %s", opportunity.Profit.String()))
|
||||
|
||||
// Execute the arbitrage opportunity
|
||||
|
||||
Reference in New Issue
Block a user