Files
mev-beta/.env.example
Krypto Kajun c7142ef671 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>
2025-10-29 04:18:27 -05:00

116 lines
4.4 KiB
Plaintext

# 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
# WebSocket endpoint for real-time event monitoring
ARBITRUM_WS_ENDPOINT=wss://arbitrum-mainnet.infura.io/ws/v3/YOUR_PROJECT_ID
# ============================================================
# 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
# Maximum concurrent RPC connections
# Lower values reduce rate limit errors but slow down processing
RPC_MAX_CONCURRENT=1
# ============================================================
# BOT PERFORMANCE CONFIGURATION
# ============================================================
# Number of worker goroutines for opportunity processing
BOT_MAX_WORKERS=3
# Buffer size for opportunity channel
BOT_CHANNEL_BUFFER_SIZE=100
# ============================================================
# 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
# Your Ethereum account address (checksum format)
ETHEREUM_ACCOUNT_ADDRESS=0x0000000000000000000000000000000000000000
# Gas price multiplier for competitive transaction submission (1.0 = no increase)
ETHEREUM_GAS_PRICE_MULTIPLIER=1.2
# ============================================================
# CONTRACT ADDRESSES
# ============================================================
# Deploy these contracts first, then update addresses here
# See: docs/deployment/contract-deployment.md
CONTRACT_ARBITRAGE_EXECUTOR=0x0000000000000000000000000000000000000000
CONTRACT_FLASH_SWAPPER=0x0000000000000000000000000000000000000000
# ============================================================
# SECURITY CONFIGURATION
# ============================================================
# Encryption key for keystore (MUST be 32+ characters)
# Generate with: openssl rand -base64 32
# 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=info
# Log format: text, json
LOG_FORMAT=text
# Enable Prometheus metrics endpoint
METRICS_ENABLED=true
# Metrics server port
METRICS_PORT=9090
# ============================================================
# 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
# Debug mode (verbose logging)
DEBUG=false
# ============================================================
# 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
# ============================================================
# ADVANCED CONFIGURATION (OPTIONAL)
# ============================================================
# Allow localhost RPC endpoints (security: only enable for development)
MEV_BOT_ALLOW_LOCALHOST=false
# 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