Files
mev-beta/config/arbitrage_example.yaml
2025-09-16 11:05:47 -05:00

112 lines
3.8 KiB
YAML

# MEV Bot Configuration - Arbitrage Service Example
# Copy this file to config/local.yaml and customize for your environment
arbitrum:
rpc_endpoint: "${ARBITRUM_RPC_ENDPOINT}"
ws_endpoint: "${ARBITRUM_WS_ENDPOINT}"
chain_id: 42161
rate_limit:
requests_per_second: 50
max_concurrent: 10
burst: 100
fallback_endpoints:
- url: "https://arb1.arbitrum.io/rpc"
rate_limit:
requests_per_second: 30
max_concurrent: 5
burst: 50
bot:
enabled: true
polling_interval: 1
min_profit_threshold: 0.001
gas_price_multiplier: 1.1
max_workers: 8
channel_buffer_size: 1000
rpc_timeout: 30
uniswap:
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
position_manager_address: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
fee_tiers: [100, 500, 3000, 10000]
cache:
enabled: true
expiration: 300
max_size: 10000
log:
level: "info"
format: "json"
file: ""
database:
file: "mev_bot.db"
max_open_connections: 25
max_idle_connections: 5
ethereum:
private_key: "${ETHEREUM_PRIVATE_KEY}"
account_address: "${ETHEREUM_ACCOUNT_ADDRESS}"
gas_price_multiplier: 1.15
contracts:
arbitrage_executor: "${CONTRACT_ARBITRAGE_EXECUTOR}"
flash_swapper: "${CONTRACT_FLASH_SWAPPER}"
authorized_callers:
- "${ETHEREUM_ACCOUNT_ADDRESS}"
authorized_dexes:
- "0x1F98431c8aD98523631AE4a59f267346ea31F984" # Uniswap V3 Factory
# Arbitrage Service Configuration
arbitrage:
enabled: true
# Contract addresses (replace with actual deployed contract addresses)
arbitrage_contract_address: "0x0000000000000000000000000000000000000000"
flash_swap_contract_address: "0x0000000000000000000000000000000000000000"
# Profitability settings
min_profit_wei: 10000000000000000 # 0.01 ETH minimum profit
min_roi_percent: 1.0 # 1% minimum ROI
min_significant_swap_size: 1000000000000000000 # 1 ETH minimum swap to trigger analysis
slippage_tolerance: 0.005 # 0.5% slippage tolerance
# Scanning configuration
min_scan_amount_wei: 100000000000000000 # 0.1 ETH minimum scan amount
max_scan_amount_wei: 10000000000000000000 # 10 ETH maximum scan amount
# Gas configuration
max_gas_price_wei: 100000000000 # 100 gwei maximum gas price
# Execution limits
max_concurrent_executions: 3 # Maximum concurrent arbitrage executions
max_opportunities_per_event: 5 # Maximum opportunities to pursue per swap event
# Timing settings
opportunity_ttl: 30s # How long opportunities remain valid
max_path_age: 60s # Maximum age of arbitrage paths
stats_update_interval: 30s # How often to log statistics
# Pool discovery configuration
pool_discovery:
enabled: true
block_range: 1000 # Number of blocks to scan for new pools
polling_interval: 15s # How often to poll for new pools
factory_addresses:
# Uniswap V3 Factory
- "0x1F98431c8aD98523631AE4a59f267346ea31F984"
# Camelot V3 Factory
- "0x1a3c9B1d2F0529D97f2afC5136Cc23e58f1FD35B"
# Ramses V2 Factory
- "0xAA2cd7477c451E703f3B9Ba5663334914763edF8"
min_liquidity_wei: 100000000000000000 # 0.1 ETH minimum liquidity for pool inclusion
cache_size: 5000 # Maximum pools to cache
cache_ttl: 300s # Pool data cache TTL
# Environment variable examples:
# export ARBITRUM_RPC_ENDPOINT="wss://arbitrum-mainnet.core.chainstack.com/your-api-key"
# export ARBITRUM_WS_ENDPOINT="wss://arbitrum-mainnet.core.chainstack.com/your-api-key"
# export ETHEREUM_PRIVATE_KEY="0x1234..."
# export ETHEREUM_ACCOUNT_ADDRESS="0xabcd..."
# export CONTRACT_ARBITRAGE_EXECUTOR="0x..."
# export CONTRACT_FLASH_SWAPPER="0x..."