fix(critical): fix empty token graph + aggressive settings for 24h execution
CRITICAL BUG FIX: - MultiHopScanner.updateTokenGraph() was EMPTY - adding no pools! - Result: Token graph had 0 pools, found 0 arbitrage paths - All opportunities showed estimatedProfitETH: 0.000000 FIX APPLIED: - Populated token graph with 8 high-liquidity Arbitrum pools: * WETH/USDC (0.05% and 0.3% fees) * USDC/USDC.e (0.01% - common arbitrage) * ARB/USDC, WETH/ARB, WETH/USDT * WBTC/WETH, LINK/WETH - These are REAL verified pool addresses with high volume AGGRESSIVE THRESHOLD CHANGES: - Min profit: 0.0001 ETH → 0.00001 ETH (10x lower, ~$0.02) - Min ROI: 0.05% → 0.01% (5x lower) - Gas multiplier: 5x → 1.5x (3.3x lower safety margin) - Max slippage: 3% → 5% (67% higher tolerance) - Max paths: 100 → 200 (more thorough scanning) - Cache expiry: 2min → 30sec (fresher opportunities) EXPECTED RESULTS (24h): - 20-50 opportunities with profit > $0.02 (was 0) - 5-15 execution attempts (was 0) - 1-2 successful executions (was 0) - $0.02-$0.20 net profit (was $0) WARNING: Aggressive settings may result in some losses Monitor closely for first 6 hours and adjust if needed 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:
172
.env.example
172
.env.example
@@ -1,121 +1,115 @@
|
||||
# MEV Bot Environment Configuration
|
||||
# MEV Bot Environment Configuration Template
|
||||
# Copy this file to .env and fill in your actual values
|
||||
# SECURITY WARNING: Never commit .env files with actual credentials to version control
|
||||
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# ARBITRUM NETWORK CONFIGURATION
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# HTTP endpoint for transaction execution (reliable)
|
||||
# Get your own endpoint from: https://chainstack.com or https://alchemy.com
|
||||
ARBITRUM_RPC_ENDPOINT=https://arbitrum-mainnet.infura.io/v3/YOUR_PROJECT_ID
|
||||
|
||||
# Primary RPC endpoint (WebSocket or HTTP)
|
||||
# Examples:
|
||||
# - WebSocket: wss://arbitrum-mainnet.core.chainstack.com/YOUR_API_KEY
|
||||
# - HTTP: https://arb1.arbitrum.io/rpc
|
||||
# - Infura: https://arbitrum-mainnet.infura.io/v3/YOUR_PROJECT_ID
|
||||
ARBITRUM_RPC_ENDPOINT=
|
||||
# WebSocket endpoint for real-time event monitoring
|
||||
ARBITRUM_WS_ENDPOINT=wss://arbitrum-mainnet.infura.io/ws/v3/YOUR_PROJECT_ID
|
||||
|
||||
# WebSocket endpoint for real-time events (optional, defaults to RPC_ENDPOINT if WSS)
|
||||
ARBITRUM_WS_ENDPOINT=
|
||||
# ============================================================
|
||||
# RPC RATE LIMITING
|
||||
# ============================================================
|
||||
# Requests per second to avoid provider rate limits
|
||||
# Adjust based on your provider's tier (free tier: 1-2, paid: 10-50)
|
||||
RPC_REQUESTS_PER_SECOND=2
|
||||
|
||||
# Fallback RPC endpoints (comma-separated)
|
||||
# Used automatically if primary endpoint fails
|
||||
ARBITRUM_FALLBACK_ENDPOINTS=https://arb1.arbitrum.io/rpc,https://arbitrum.llamarpc.com,https://arbitrum-one.publicnode.com
|
||||
# Maximum concurrent RPC connections
|
||||
# Lower values reduce rate limit errors but slow down processing
|
||||
RPC_MAX_CONCURRENT=1
|
||||
|
||||
# Rate limiting for RPC calls
|
||||
RPC_REQUESTS_PER_SECOND=100
|
||||
RPC_MAX_CONCURRENT=10
|
||||
# ============================================================
|
||||
# BOT PERFORMANCE CONFIGURATION
|
||||
# ============================================================
|
||||
# Number of worker goroutines for opportunity processing
|
||||
BOT_MAX_WORKERS=3
|
||||
|
||||
# =============================================================================
|
||||
# BOT CONFIGURATION
|
||||
# =============================================================================
|
||||
# Buffer size for opportunity channel
|
||||
BOT_CHANNEL_BUFFER_SIZE=100
|
||||
|
||||
# Maximum number of concurrent workers
|
||||
BOT_MAX_WORKERS=5
|
||||
|
||||
# Channel buffer size for event processing
|
||||
BOT_CHANNEL_BUFFER_SIZE=1000
|
||||
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# ETHEREUM ACCOUNT CONFIGURATION
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# CRITICAL: Replace with your actual private key (without 0x prefix)
|
||||
# Generate with: cast wallet new (foundry) or eth-keygen
|
||||
ETHEREUM_PRIVATE_KEY=0000000000000000000000000000000000000000000000000000000000000000
|
||||
|
||||
# Private key for transaction signing (64 hex characters without 0x prefix)
|
||||
# NEVER commit this to version control!
|
||||
ETHEREUM_PRIVATE_KEY=your_private_key_here
|
||||
# Your Ethereum account address (checksum format)
|
||||
ETHEREUM_ACCOUNT_ADDRESS=0x0000000000000000000000000000000000000000
|
||||
|
||||
# Account address (will be derived from private key if not specified)
|
||||
ETHEREUM_ACCOUNT_ADDRESS=0xYOUR_ETHEREUM_ACCOUNT_ADDRESS_HERE
|
||||
# Gas price multiplier for competitive transaction submission (1.0 = no increase)
|
||||
ETHEREUM_GAS_PRICE_MULTIPLIER=1.2
|
||||
|
||||
# Gas price multiplier for competitive transactions
|
||||
ETHEREUM_GAS_PRICE_MULTIPLIER=1.5
|
||||
# ============================================================
|
||||
# CONTRACT ADDRESSES
|
||||
# ============================================================
|
||||
# Deploy these contracts first, then update addresses here
|
||||
# See: docs/deployment/contract-deployment.md
|
||||
CONTRACT_ARBITRAGE_EXECUTOR=0x0000000000000000000000000000000000000000
|
||||
CONTRACT_FLASH_SWAPPER=0x0000000000000000000000000000000000000000
|
||||
|
||||
# =============================================================================
|
||||
# CONTRACT ADDRESSES (Deploy your contracts and fill these in)
|
||||
# =============================================================================
|
||||
|
||||
# Your deployed ArbitrageExecutor contract address
|
||||
CONTRACT_ARBITRAGE_EXECUTOR=0xYOUR_ARBITRAGE_EXECUTOR_CONTRACT_ADDRESS_HERE
|
||||
|
||||
# Your deployed FlashSwapper contract address
|
||||
CONTRACT_FLASH_SWAPPER=0xYOUR_FLASH_SWAPPER_CONTRACT_ADDRESS_HERE
|
||||
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# SECURITY CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Encryption key for secure key storage (32 bytes, base64 encoded)
|
||||
# ============================================================
|
||||
# Encryption key for keystore (MUST be 32+ characters)
|
||||
# Generate with: openssl rand -base64 32
|
||||
# REQUIRED: Must be set for secure operation
|
||||
MEV_BOT_ENCRYPTION_KEY=
|
||||
# CRITICAL: Keep this secret! Losing it means losing access to keys
|
||||
MEV_BOT_ENCRYPTION_KEY=REPLACE_WITH_32_CHARACTER_MINIMUM_RANDOM_STRING_FROM_OPENSSL
|
||||
|
||||
# =============================================================================
|
||||
# Keystore directory for encrypted private keys
|
||||
MEV_BOT_KEYSTORE_PATH=keystore
|
||||
|
||||
# Audit log path for security events
|
||||
MEV_BOT_AUDIT_LOG=logs/audit.log
|
||||
|
||||
# Backup directory for key backups
|
||||
MEV_BOT_BACKUP_PATH=backups
|
||||
|
||||
# ============================================================
|
||||
# LOGGING AND MONITORING
|
||||
# =============================================================================
|
||||
|
||||
# Log level (debug, info, warn, error)
|
||||
# ============================================================
|
||||
# Log level: debug, info, warn, error
|
||||
LOG_LEVEL=info
|
||||
|
||||
# Log format (json, text)
|
||||
LOG_FORMAT=json
|
||||
# Log format: text, json
|
||||
LOG_FORMAT=text
|
||||
|
||||
# Enable metrics collection
|
||||
# Enable Prometheus metrics endpoint
|
||||
METRICS_ENABLED=true
|
||||
|
||||
# Metrics server port
|
||||
METRICS_PORT=9090
|
||||
|
||||
# =============================================================================
|
||||
# DEVELOPMENT/TESTING
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# ENVIRONMENT MODE
|
||||
# ============================================================
|
||||
# Environment: development, staging, production
|
||||
# Controls which config file is loaded (config/local.yaml, config/staging.yaml, config/arbitrum_production.yaml)
|
||||
GO_ENV=development
|
||||
|
||||
# Go environment (development, production)
|
||||
GO_ENV=production
|
||||
|
||||
# Enable debug mode
|
||||
# Debug mode (verbose logging)
|
||||
DEBUG=false
|
||||
|
||||
# =============================================================================
|
||||
# EXAMPLE VALUES FOR TESTING
|
||||
# =============================================================================
|
||||
# ============================================================
|
||||
# BLOCKCHAIN EXPLORER API KEYS (OPTIONAL)
|
||||
# ============================================================
|
||||
# Arbiscan API key for contract verification and transaction tracking
|
||||
# Get free key from: https://arbiscan.io/apis
|
||||
ARBISCAN_API_KEY=YOUR_ARBISCAN_API_KEY_HERE
|
||||
|
||||
# For testing on Arbitrum Goerli testnet:
|
||||
# ARBITRUM_RPC_ENDPOINT=https://goerli-rollup.arbitrum.io/rpc
|
||||
# ARBITRUM_WS_ENDPOINT=wss://goerli-rollup.arbitrum.io/ws
|
||||
# ============================================================
|
||||
# ADVANCED CONFIGURATION (OPTIONAL)
|
||||
# ============================================================
|
||||
# Allow localhost RPC endpoints (security: only enable for development)
|
||||
MEV_BOT_ALLOW_LOCALHOST=false
|
||||
|
||||
# For local development with anvil fork:
|
||||
# ARBITRUM_RPC_ENDPOINT=http://localhost:8545
|
||||
# ARBITRUM_WS_ENDPOINT=ws://localhost:8545
|
||||
|
||||
# =============================================================================
|
||||
# PRODUCTION RECOMMENDATIONS
|
||||
# =============================================================================
|
||||
|
||||
# For production, use premium RPC providers for better reliability:
|
||||
# - Chainstack: wss://arbitrum-mainnet.core.chainstack.com/YOUR_API_KEY
|
||||
# - Alchemy: wss://arb-mainnet.g.alchemy.com/v2/YOUR_API_KEY
|
||||
# - Infura: wss://arbitrum-mainnet.infura.io/ws/v3/YOUR_PROJECT_ID
|
||||
# - QuickNode: wss://YOUR_ENDPOINT.arbitrum-mainnet.quiknode.pro/YOUR_TOKEN/
|
||||
|
||||
# Always use multiple fallback endpoints for high availability
|
||||
# Consider geographic distribution of endpoints for better latency
|
||||
|
||||
ARBISCAN_API_KEY=H8PEIY79385F4UKYU7MRV5IAT1BI1WYIVY
|
||||
# Dashboard server port
|
||||
DASHBOARD_PORT=8080
|
||||
|
||||
# Security webhook URL for alerts (Slack, Discord, etc.)
|
||||
SECURITY_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
|
||||
|
||||
Reference in New Issue
Block a user