Files
mev-beta/config/config.production.yaml
2025-09-14 06:21:10 -05:00

185 lines
5.3 KiB
YAML

# MEV Bot Production Configuration - Arbitrum L2 Optimized
# Arbitrum L2 node configuration
arbitrum:
# Primary RPC endpoint - Use environment variable for security
rpc_endpoint: "${ARBITRUM_RPC_ENDPOINT}"
# WebSocket endpoint for real-time L2 message streaming
ws_endpoint: "${ARBITRUM_WS_ENDPOINT}"
# Chain ID for Arbitrum mainnet
chain_id: 42161
# Aggressive rate limiting for high-frequency L2 message processing
rate_limit:
# High throughput for L2 messages (Arbitrum can handle more)
requests_per_second: 50
# Higher concurrency for parallel processing
max_concurrent: 20
# Large burst for L2 message spikes
burst: 100
# Fallback endpoints for redundancy
fallback_endpoints:
- url: "${ARBITRUM_INFURA_ENDPOINT}"
rate_limit:
requests_per_second: 30
max_concurrent: 15
burst: 60
- url: "wss://arb1.arbitrum.io/ws"
rate_limit:
requests_per_second: 20
max_concurrent: 10
burst: 40
- url: "${ARBITRUM_BLOCKPI_ENDPOINT}"
rate_limit:
requests_per_second: 25
max_concurrent: 12
burst: 50
# Bot configuration optimized for L2 message processing
bot:
# Enable the bot
enabled: true
# Fast polling for L2 blocks (250ms for competitive advantage)
polling_interval: 0.25
# Minimum profit threshold in USD (account for L2 gas costs)
min_profit_threshold: 5.0
# Gas price multiplier for fast L2 execution
gas_price_multiplier: 1.5
# High worker count for L2 message volume
max_workers: 25
# Large buffer for high-frequency L2 messages
channel_buffer_size: 1000
# Fast timeout for L2 operations
rpc_timeout: 15
# Uniswap configuration optimized for Arbitrum
uniswap:
# Uniswap V3 factory on Arbitrum
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
# Position manager on Arbitrum
position_manager_address: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
# Focus on high-volume fee tiers
fee_tiers:
- 500 # 0.05% - High volume pairs
- 3000 # 0.3% - Most liquid
- 10000 # 1% - Exotic pairs
# Aggressive caching for performance
cache:
enabled: true
# Short expiration for real-time data
expiration: 30
# Large cache for many pools
max_size: 50000
# Production logging
log:
# Info level for production monitoring
level: "info"
# JSON format for log aggregation
format: "json"
# Log to file for persistence
file: "/var/log/mev-bot/mev-bot.log"
# Database configuration for production
database:
# Production database file
file: "/data/mev-bot-production.db"
# High connection pool for concurrent operations
max_open_connections: 50
# Large idle pool for performance
max_idle_connections: 25
# Production-specific settings
production:
# Performance monitoring
metrics:
enabled: true
port: 9090
path: "/metrics"
# Health checks
health:
enabled: true
port: 8080
path: "/health"
# L2 specific configuration
l2_optimization:
# Enable L2 message priority processing
prioritize_l2_messages: true
# Batch processing settings
batch_size: 100
batch_timeout: "100ms"
# Gas optimization
gas_estimation:
# Include L1 data fees in calculations
include_l1_fees: true
# Safety multiplier for gas limits
safety_multiplier: 1.2
# Priority fee strategy
priority_fee_strategy: "aggressive"
# Security settings
security:
# Maximum position size (in ETH)
max_position_size: 10.0
# Daily loss limit (in ETH)
daily_loss_limit: 2.0
# Circuit breaker settings
circuit_breaker:
enabled: true
error_threshold: 10
timeout: "5m"
# DEX configuration
dex_protocols:
uniswap_v3:
enabled: true
router: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
priority: 1
sushiswap:
enabled: true
router: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
priority: 2
camelot:
enabled: true
router: "0xc873fEcbd354f5A56E00E710B90EF4201db2448d"
priority: 3
# Monitoring and alerting
alerts:
# Slack webhook for alerts - use environment variable for security
slack_webhook: "${SLACK_WEBHOOK_URL}"
# Discord webhook for alerts - use environment variable for security
discord_webhook: "${DISCORD_WEBHOOK_URL}"
# Email alerts
email:
enabled: false
smtp_server: "smtp.gmail.com:587"
username: "your-email@gmail.com"
password: "your-app-password"
# Alert conditions
conditions:
- name: "High Error Rate"
condition: "error_rate > 0.05"
severity: "critical"
- name: "Low Profit Margin"
condition: "avg_profit < min_profit_threshold"
severity: "warning"
- name: "L2 Message Lag"
condition: "l2_message_lag > 1000ms"
severity: "critical"
- name: "Gas Price Spike"
condition: "gas_price > 50gwei"
severity: "warning"
# Environment-specific overrides
# Set these via environment variables in production:
# ARBITRUM_RPC_ENDPOINT - Your primary RPC endpoint
# ARBITRUM_WS_ENDPOINT - Your WebSocket endpoint
# BOT_MAX_WORKERS - Number of workers (adjust based on server capacity)
# BOT_CHANNEL_BUFFER_SIZE - Buffer size (adjust based on memory)
# DATABASE_FILE - Database file path
# LOG_FILE - Log file path
# SLACK_WEBHOOK - Slack webhook URL
# DISCORD_WEBHOOK - Discord webhook URL