- Added comprehensive bounds checking to prevent buffer overruns in multicall parsing - Implemented graduated validation system (Strict/Moderate/Permissive) to reduce false positives - Added LRU caching system for address validation with 10-minute TTL - Enhanced ABI decoder with missing Universal Router and Arbitrum-specific DEX signatures - Fixed duplicate function declarations and import conflicts across multiple files - Added error recovery mechanisms with multiple fallback strategies - Updated tests to handle new validation behavior for suspicious addresses - Fixed parser test expectations for improved validation system - Applied gofmt formatting fixes to ensure code style compliance - Fixed mutex copying issues in monitoring package by introducing MetricsSnapshot - Resolved critical security vulnerabilities in heuristic address extraction - Progress: Updated TODO audit from 10% to 35% complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
122 lines
4.4 KiB
Plaintext
122 lines
4.4 KiB
Plaintext
# MEV Bot Environment Configuration
|
|
# Copy this file to .env and fill in your actual values
|
|
|
|
# =============================================================================
|
|
# ARBITRUM NETWORK CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# 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 events (optional, defaults to RPC_ENDPOINT if WSS)
|
|
ARBITRUM_WS_ENDPOINT=
|
|
|
|
# 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
|
|
|
|
# Rate limiting for RPC calls
|
|
RPC_REQUESTS_PER_SECOND=100
|
|
RPC_MAX_CONCURRENT=10
|
|
|
|
# =============================================================================
|
|
# BOT CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Maximum number of concurrent workers
|
|
BOT_MAX_WORKERS=5
|
|
|
|
# Channel buffer size for event processing
|
|
BOT_CHANNEL_BUFFER_SIZE=1000
|
|
|
|
# =============================================================================
|
|
# ETHEREUM ACCOUNT CONFIGURATION
|
|
# =============================================================================
|
|
|
|
# Private key for transaction signing (64 hex characters without 0x prefix)
|
|
# NEVER commit this to version control!
|
|
ETHEREUM_PRIVATE_KEY=your_private_key_here
|
|
|
|
# Account address (will be derived from private key if not specified)
|
|
ETHEREUM_ACCOUNT_ADDRESS=0xYOUR_ETHEREUM_ACCOUNT_ADDRESS_HERE
|
|
|
|
# Gas price multiplier for competitive transactions
|
|
ETHEREUM_GAS_PRICE_MULTIPLIER=1.5
|
|
|
|
# =============================================================================
|
|
# 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)
|
|
# Generate with: openssl rand -base64 32
|
|
# REQUIRED: Must be set for secure operation
|
|
MEV_BOT_ENCRYPTION_KEY=
|
|
|
|
# =============================================================================
|
|
# LOGGING AND MONITORING
|
|
# =============================================================================
|
|
|
|
# Log level (debug, info, warn, error)
|
|
LOG_LEVEL=info
|
|
|
|
# Log format (json, text)
|
|
LOG_FORMAT=json
|
|
|
|
# Enable metrics collection
|
|
METRICS_ENABLED=true
|
|
|
|
# Metrics server port
|
|
METRICS_PORT=9090
|
|
|
|
# =============================================================================
|
|
# DEVELOPMENT/TESTING
|
|
# =============================================================================
|
|
|
|
# Go environment (development, production)
|
|
GO_ENV=production
|
|
|
|
# Enable debug mode
|
|
DEBUG=false
|
|
|
|
# =============================================================================
|
|
# EXAMPLE VALUES FOR TESTING
|
|
# =============================================================================
|
|
|
|
# For testing on Arbitrum Goerli testnet:
|
|
# ARBITRUM_RPC_ENDPOINT=https://goerli-rollup.arbitrum.io/rpc
|
|
# ARBITRUM_WS_ENDPOINT=wss://goerli-rollup.arbitrum.io/ws
|
|
|
|
# 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
|
|
|