feat: create v2-prep branch with comprehensive planning

Restructured project for V2 refactor:

**Structure Changes:**
- Moved all V1 code to orig/ folder (preserved with git mv)
- Created docs/planning/ directory
- Added orig/README_V1.md explaining V1 preservation

**Planning Documents:**
- 00_V2_MASTER_PLAN.md: Complete architecture overview
  - Executive summary of critical V1 issues
  - High-level component architecture diagrams
  - 5-phase implementation roadmap
  - Success metrics and risk mitigation

- 07_TASK_BREAKDOWN.md: Atomic task breakdown
  - 99+ hours of detailed tasks
  - Every task < 2 hours (atomic)
  - Clear dependencies and success criteria
  - Organized by implementation phase

**V2 Key Improvements:**
- Per-exchange parsers (factory pattern)
- Multi-layer strict validation
- Multi-index pool cache
- Background validation pipeline
- Comprehensive observability

**Critical Issues Addressed:**
- Zero address tokens (strict validation + cache enrichment)
- Parsing accuracy (protocol-specific parsers)
- No audit trail (background validation channel)
- Inefficient lookups (multi-index cache)
- Stats disconnection (event-driven metrics)

Next Steps:
1. Review planning documents
2. Begin Phase 1: Foundation (P1-001 through P1-010)
3. Implement parsers in Phase 2
4. Build cache system in Phase 3
5. Add validation pipeline in Phase 4
6. Migrate and test in Phase 5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Administrator
2025-11-10 10:14:26 +01:00
parent 1773daffe7
commit 803de231ba
411 changed files with 20390 additions and 8680 deletions

View File

@@ -1,112 +0,0 @@
# 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..."

View File

@@ -1,337 +0,0 @@
# Arbitrum-Optimized MEV Bot Configuration
# Based on Layer 2 Research and Best Practices (November 2025)
#
# USAGE:
# This config can be merged with arbitrum_production.yaml for testing
# All changes are non-breaking and can be enabled via feature flags
#
# RESEARCH FINDINGS:
# - Arbitrum block time: ~250ms (vs 12s Ethereum)
# - Opportunity window: 10-20 blocks (2.5-5 seconds)
# - Cyclic arbitrage: ~7% of gas usage
# - Profitable arbitrage: 0.03%-0.05% of trade volume
#
# See: docs/L2_MEV_BOT_RESEARCH_REPORT.md for full analysis
# =============================================================================
# FEATURE FLAGS - Enable/Disable Optimizations
# =============================================================================
features:
# Phase 1: Configuration tuning (LOW RISK)
use_arbitrum_optimized_timeouts: true # Adjust for 250ms blocks
use_dynamic_ttl: true # Calculate TTL based on block time
# Phase 2: Transaction filtering (MEDIUM RISK)
enable_dex_prefilter: false # Filter non-DEX transactions (80-90% reduction)
log_filtered_transactions: true # Monitor for missed opportunities
# Phase 3: Sequencer optimizations (MEDIUM RISK)
use_direct_sequencer_feed: false # Direct WebSocket to sequencer
sequencer_feed_fallback: true # Keep RPC as fallback
# Phase 4: Timeboost (HIGH RISK - Future)
enable_timeboost: false # Express lane integration
timeboost_monitoring_only: false # Monitor without bidding
# =============================================================================
# ARBITRUM-SPECIFIC NETWORK CONFIGURATION
# =============================================================================
arbitrum_l2:
# Network characteristics
chain_id: 42161
average_block_time_ms: 250 # Arbitrum typical
blocks_per_second: 4 # 1000ms / 250ms
# Transaction ordering
ordering_policy: "fcfs" # First-Come-First-Served
has_public_mempool: false # No mempool on L2
gas_price_affects_ordering: false # FCFS = gas price doesn't matter
# Sequencer configuration
sequencer_endpoint: "wss://arb1-sequencer.arbitrum.io/feed"
sequencer_publish_delay_ms: 0 # Transactions published immediately
# Timeboost configuration (if enabled)
timeboost:
auction_contract: "0x0000000000000000000000000000000000000000" # TBD when launched
express_lane_duration_seconds: 60 # 60-second rounds
auction_type: "sealed_bid_second_price" # Auction mechanism
min_express_lane_bid_wei: 1000000000000000 # 0.001 ETH minimum
# Gattaca Kairos integration (Timeboost relay)
kairos:
enabled: false # Phase 5
endpoint: "https://kairos.gattaca.com" # Gattaca Timeboost relay
api_key_env: "KAIROS_API_KEY" # Environment variable for key
sub_auction_interval_ms: 100 # ~100ms sub-auctions
# =============================================================================
# OPTIMIZED ARBITRAGE TIMING (Phase 1)
# =============================================================================
arbitrage_optimized:
# CRITICAL: Tuned for Arbitrum's 250ms blocks
# Research shows opportunities last 10-20 blocks (2.5-5 seconds)
# Opportunity lifecycle
opportunity_ttl: "5s" # 20 blocks @ 250ms (was 30s)
opportunity_window_blocks: 20 # ~5 seconds
# Path caching
max_path_age: "10s" # 40 blocks @ 250ms (was 60s)
cache_ttl_blocks: 40 # Blocks before cache expires
# Execution deadlines
execution_deadline: "3s" # 12 blocks @ 250ms
max_execution_blocks: 12 # Must execute within 12 blocks
# Revalidation before execution
revalidate_before_exec: true # Re-check prices before execution
max_price_deviation_percent: 1.0 # Cancel if price moved >1%
# Dynamic TTL calculation (if use_dynamic_ttl enabled)
dynamic_ttl:
min_ttl_blocks: 10 # Minimum 10 blocks (2.5s)
max_ttl_blocks: 20 # Maximum 20 blocks (5s)
profit_multiplier: true # Higher profit = longer TTL
volatility_adjustment: true # High volatility = shorter TTL
# =============================================================================
# TRANSACTION PRE-FILTERING (Phase 2)
# =============================================================================
dex_filter:
enabled: false # Set features.enable_dex_prefilter to enable
# Known DEX addresses on Arbitrum
known_dex_addresses:
# Uniswap V3
- "0x1F98431c8aD98523631AE4a59f267346ea31F984" # Factory
- "0xE592427A0AEce92De3Edee1F18E0157C05861564" # Router
- "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45" # Router V2
# Camelot
- "0x6EcCab422D763aC031210895C81787E87B43A652" # Factory
- "0xc873fEcbd354f5A56E00E710B90EF4201db2448d" # Router
# SushiSwap
- "0xc35DADB65012eC5796536bD9864eD8773aBc74C4" # Factory
- "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506" # Router
# Curve
- "0x5ffe7FB82894076ECB99A30D6A32e969e6e35E98" # Address Provider
# Balancer V2
- "0xBA12222222228d8Ba445958a75a0704d566BF2C8" # Vault
# Ramses
- "0xAAA87963EFeB6f7E0a2711F397663105Acb1805e" # Router
# KyberSwap Elastic
- "0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a" # Factory
- "0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83" # Router
# Swap function signatures
known_swap_signatures:
- "0x128acb08" # swap(address,bool,int256,uint160,bytes)
- "0xc04b8d59" # exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))
- "0x414bf389" # exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160))
- "0xb858183f" # multicall(uint256,bytes[])
- "0x38ed1739" # swapExactTokensForTokens
- "0x8803dbee" # swapTokensForExactTokens
- "0x022c0d9f" # swap(uint256,uint256,address,bytes)
- "0x5ae401dc" # multicall(uint256,bytes[])
# Filtering behavior
filter_mode: "whitelist" # "whitelist" or "blacklist"
log_filtered: true # Log filtered transactions
filtered_log_sample_rate: 0.01 # Log 1% of filtered tx (avoid spam)
# Performance tuning
cache_lookups: true # Cache address lookups
cache_ttl: "5m" # Cache for 5 minutes
# =============================================================================
# SEQUENCER FEED OPTIMIZATION (Phase 3)
# =============================================================================
sequencer_feed:
enabled: false # Set features.use_direct_sequencer_feed to enable
# Connection settings
websocket_url: "wss://arb1-sequencer.arbitrum.io/feed"
connection_timeout: "30s"
read_timeout: "10s"
write_timeout: "10s"
# Reconnection logic
auto_reconnect: true
max_reconnect_attempts: 10
reconnect_backoff_ms: 1000 # Start at 1s
reconnect_backoff_max_ms: 30000 # Max 30s
# Message processing
message_buffer_size: 100000 # Large buffer for high throughput
decode_concurrency: 10 # Parallel decoding workers
enable_transaction_cache: true # Cache decoded transactions
# Latency optimization
priority_processing: true # Process DEX transactions first
skip_non_dex: true # Don't decode non-DEX transactions
# Fallback to RPC
fallback_on_disconnect: true # Use RPC if sequencer disconnects
fallback_delay_ms: 5000 # Wait 5s before falling back
# =============================================================================
# ENHANCED PROFIT VALIDATION (Non-Breaking Addition)
# =============================================================================
profit_validation:
# Pre-execution validation
revalidate_before_submission: true # Check profit before submitting
min_profit_after_revalidation_wei: 800000000000000 # 0.0008 ETH ($1.60)
# Price movement thresholds
max_price_movement_percent: 2.0 # Cancel if price moved >2%
alert_on_large_movement: true # Alert if movement >1%
# Slippage protection
use_dynamic_slippage: true # Adjust slippage based on pool depth
min_slippage_bps: 10 # 0.1% minimum
max_slippage_bps: 500 # 5% maximum
# Multi-hop specific
max_hops_with_revalidation: 3 # Revalidate 3+ hop paths
per_hop_validation: true # Check each hop individually
# =============================================================================
# COMPETITIVE OPTIMIZATION
# =============================================================================
competition:
# Latency targets for Arbitrum (250ms blocks)
target_detection_latency_ms: 50 # Detect within 50ms
target_execution_latency_ms: 150 # Execute within 150ms
total_latency_budget_ms: 200 # Total <200ms (80% of block time)
# Gas optimization for competition
base_gas_price_gwei: 0.1 # Arbitrum typical
priority_gas_multiplier: 1.0 # No priority on FCFS
min_gas_price_gwei: 0.05 # Minimum
max_gas_price_gwei: 1.0 # Maximum
# Express lane (Timeboost) strategy
express_lane_min_profit_wei: 50000000000000000 # $100 minimum to use express lane
express_lane_max_bid_percent: 10.0 # Bid up to 10% of profit
express_lane_compete_above_profit: 100000000000000000 # $200+ always compete
# =============================================================================
# A/B TESTING FRAMEWORK
# =============================================================================
ab_testing:
enabled: false # Enable A/B testing
# Test groups
control_group_percentage: 50 # 50% use old config
treatment_group_percentage: 50 # 50% use new config
# Metrics to track
track_metrics:
- "opportunities_detected"
- "opportunities_executed"
- "total_profit"
- "average_latency"
- "success_rate"
# Duration
test_duration_hours: 24 # Run for 24 hours
min_sample_size: 100 # Minimum 100 opportunities per group
# =============================================================================
# MONITORING AND ALERTING
# =============================================================================
l2_monitoring:
# Performance tracking
track_block_times: true # Monitor actual block times
track_opportunity_window: true # Measure actual opportunity duration
track_competition: true # Monitor express lane activity
# Alerts
alert_on_long_block_time: true # Alert if block time >500ms
alert_on_missed_opportunities: true # Alert if we're being consistently outbid
alert_on_low_success_rate: true # Alert if success rate <5%
# Logging
log_opportunity_lifecycle: true # Detailed lifecycle logging
log_execution_timing: true # Log all timing metrics
log_comparison_with_mainnet: false # Don't log L1 comparisons (not relevant)
# =============================================================================
# BACKWARD COMPATIBILITY
# =============================================================================
legacy_config:
# Keep old values for rollback
opportunity_ttl_legacy: "30s"
max_path_age_legacy: "60s"
# Rollback procedure
enable_legacy_mode: false # Emergency rollback
auto_rollback_on_failure: true # Auto-rollback if >50% failure rate
rollback_threshold_failures: 10 # Rollback after 10 consecutive failures
# =============================================================================
# DEPLOYMENT PHASES
# =============================================================================
deployment_phases:
current_phase: 1 # Which phase we're in
# Phase 1: Configuration tuning (Week 1)
phase_1:
enabled: true
features:
- "use_arbitrum_optimized_timeouts"
- "use_dynamic_ttl"
rollback_ready: true
# Phase 2: Transaction filtering (Week 2)
phase_2:
enabled: false
features:
- "enable_dex_prefilter"
- "log_filtered_transactions"
rollback_ready: true
# Phase 3: Sequencer optimization (Week 3)
phase_3:
enabled: false
features:
- "use_direct_sequencer_feed"
- "sequencer_feed_fallback"
rollback_ready: true
# Phase 4: Timeboost monitoring (Week 4)
phase_4:
enabled: false
features:
- "timeboost_monitoring_only"
rollback_ready: true
# Phase 5: Timeboost execution (Month 2+)
phase_5:
enabled: false
features:
- "enable_timeboost"
rollback_ready: false # High risk, careful rollout
# =============================================================================
# VALIDATION AND TESTING
# =============================================================================
validation:
# Pre-deployment validation
run_config_validation: true # Validate config before starting
require_all_dex_addresses: true # Ensure all DEXes configured
require_sequencer_connectivity: false # Don't require for Phase 1
# Runtime validation
continuous_validation: true # Monitor config consistency
alert_on_misconfiguration: true # Alert on detected issues
# Test mode
dry_run_mode: false # Set to true for testing without execution
log_would_be_executed: true # Log what would execute in dry run

View File

@@ -1,486 +0,0 @@
# MEV Bot Production Configuration for Arbitrum One
# Generated based on verified contract addresses as of September 2024
# Top 20 Arbitrum One Tokens by Market Cap and Trading Volume
tokens:
# Major Stablecoins and Base Assets
weth:
symbol: "WETH"
name: "Wrapped Ether"
address: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
decimals: 18
coingecko_id: "weth"
is_base_token: true
usdc:
symbol: "USDC"
name: "USD Coin (Native)"
address: "0xaf88d065e77c8cc2239327c5edb3a432268e5831"
decimals: 6
coingecko_id: "usd-coin"
is_stable: true
usdc_e:
symbol: "USDC.e"
name: "USD Coin (Bridged)"
address: "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"
decimals: 6
coingecko_id: "usd-coin-ethereum-bridged"
is_stable: true
usdt:
symbol: "USDT"
name: "Tether USD"
address: "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"
decimals: 6
coingecko_id: "tether"
is_stable: true
# Native and Governance Tokens
arb:
symbol: "ARB"
name: "Arbitrum"
address: "0x912ce59144191c1204e64559fe8253a0e49e6548"
decimals: 18
coingecko_id: "arbitrum"
is_governance: true
# DeFi Blue Chips
gmx:
symbol: "GMX"
name: "GMX"
address: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a"
decimals: 18
coingecko_id: "gmx"
category: "derivatives"
pendle:
symbol: "PENDLE"
name: "Pendle"
address: "0x0c880f6761f1af8d9aa9c466984b80dab9a8c9e8"
decimals: 18
coingecko_id: "pendle"
category: "yield"
# Additional High Volume Tokens
wbtc:
symbol: "WBTC"
name: "Wrapped Bitcoin"
address: "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"
decimals: 8
coingecko_id: "wrapped-bitcoin"
link:
symbol: "LINK"
name: "Chainlink"
address: "0xf97f4df75117a78c1a5a0dbb814af92458539fb4"
decimals: 18
coingecko_id: "chainlink"
uni:
symbol: "UNI"
name: "Uniswap"
address: "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0"
decimals: 18
coingecko_id: "uniswap"
aave:
symbol: "AAVE"
name: "Aave"
address: "0xba5ddd1f9d7f570dc94a51479a000e3bce967196"
decimals: 18
coingecko_id: "aave"
crv:
symbol: "CRV"
name: "Curve DAO Token"
address: "0x11cdb42b0eb46d95f990bedd4695a6e3fa034978"
decimals: 18
coingecko_id: "curve-dao-token"
bal:
symbol: "BAL"
name: "Balancer"
address: "0x040d1edc9569d4bab2d15287dc5a4f10f56a56b8"
decimals: 18
coingecko_id: "balancer"
comp:
symbol: "COMP"
name: "Compound"
address: "0x354a6da3fcde098f8389cad84b0182725c6c91de"
decimals: 18
coingecko_id: "compound-governance-token"
mkr:
symbol: "MKR"
name: "Maker"
address: "0x2e9a6df78e42c50b0cefcf9000d0c3a4d34e1dd5"
decimals: 18
coingecko_id: "maker"
# Arbitrum Ecosystem Tokens
magic:
symbol: "MAGIC"
name: "MAGIC"
address: "0x539bde0d7dbd336b79148aa742883198bbf60342"
decimals: 18
coingecko_id: "magic"
category: "gaming"
grail:
symbol: "GRAIL"
name: "Camelot Token"
address: "0x3d9907f9a368ad0a51be60f7da3b97cf940982d8"
decimals: 18
coingecko_id: "camelot-token"
dpx:
symbol: "DPX"
name: "Dopex"
address: "0x6c2c06790b3e3e3c38e12ee22f8183b37a13ee55"
decimals: 18
coingecko_id: "dopex"
category: "options"
rdnt:
symbol: "RDNT"
name: "Radiant Capital"
address: "0x3082cc23568ea640225c2467653db90e9250aaa0"
decimals: 18
coingecko_id: "radiant-capital"
ram:
symbol: "RAM"
name: "Ramses"
address: "0xaaa6c1e32c55a7bfa8066a6fae9b42650f262418"
decimals: 18
coingecko_id: "ramses-exchange"
# DEX Factory and Router Addresses - Verified for Arbitrum One
dex_protocols:
uniswap_v3:
name: "Uniswap V3"
factory: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
router: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
router_v2: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
universal_router: "0x4c60051384bd2d3c01bfc845cf5f4b44bcbe9de5"
position_manager: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
quoter: "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6"
quoter_v2: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e"
fee_tiers: [100, 500, 3000, 10000]
init_code_hash: "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54"
uniswap_v2:
name: "Uniswap V2"
factory: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"
router: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
fee_percent: 0.3
init_code_hash: "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f"
camelot:
name: "Camelot DEX"
factory: "0x6EcCab422D763aC031210895C81787E87B43A652"
router: "0xc873fEcbd354f5A56E00E710B90EF4201db2448d"
fee_percent: 0.2
supports_custom_fees: true
balancer_v2:
name: "Balancer V2"
vault: "0xba12222222228d8ba445958a75a0704d566bf2c8"
# Note: Balancer uses vault-based architecture, not traditional factory/router
curve:
name: "Curve Finance"
address_provider: "0x5ffe7FB82894076ECB99A30D6A32e969e6e35E98"
# Registry addresses retrieved via address_provider.get_address(id)
registry_ids:
stableswap_registry: 0
pool_info: 1
exchange_router: 2
metapool_factory: 3
fee_distributor: 4
crypto_registry: 5
twocrypto_factory: 6
metaregistry: 7
crvusd_factory: 8
tricrypto_ng_factory: 11
stableswap_ng_factory: 12
twocrypto_ng_factory: 13
kyber_elastic:
name: "KyberSwap Elastic"
factory: "0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a"
router: "0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83"
position_manager: "0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8"
quoter_v2: "0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f"
tick_fees_reader: "0x165c68077ac06c83800d19200e6E2B08D02dE75D"
ramses:
name: "Ramses Exchange"
router: "0xAAA87963EFeB6f7E0a2711F397663105Acb1805e"
position_manager: "0xAA277CB7914b7e5514946Da92cb9De332Ce610EF"
# Factory address to be retrieved from router or documentation
fee_tiers: [100, 500, 3000, 10000]
sushiswap:
name: "SushiSwap"
factory: "0xc35DADB65012eC5796536bD9864eD8773aBc74C4"
router: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
fee_percent: 0.3
init_code_hash: "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303"
# REAL DEPLOYED MEV BOT CONTRACT ADDRESSES ON ARBITRUM MAINNET
# Uniswap V3 Flash Swaps - Deployed October 27, 2025
contracts:
# Core arbitrage execution contract - DEPLOYED AND VERIFIED
arbitrage_executor: "0x6C2B1c6Eb0e5aB73d8C60944c74A62bfE629c418"
# Flash swap contracts - DEPLOYED AND AUTHORIZED
uniswap_v3_flash_swapper: "0x7Cc97259cBe0D02Cd0b8A80c2E1f79C7265808b4"
# Data fetcher for batch pool data fetching (99% RPC call reduction!)
data_fetcher: "0xC6BD82306943c0F3104296a46113ca0863723cBD"
uniswap_v2_flash_swapper: "0xE82c24b3fD47995E0626b1e8ac13E13130f5AeEE"
# Legacy field mappings for backward compatibility
flash_swapper: "0x5801ee5c2f6069e0f11cce7c0f27c2ef88e79a95" # Points to V3 swapper
# Flash loan receiver contract (Balancer flash loans) - DEPLOYED
flash_loan_receiver: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"
# Balancer Vault address for flash loans (Arbitrum mainnet)
balancer_vault: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
# Arbitrage Service Configuration - MICRO-FUNDING MODE (0.001 ETH)
arbitrage:
enabled: true
arbitrage_contract_address: "0xec2a16d5f8ac850d08c4c7f67efd50051e7cfc0b"
flash_swap_contract_address: "0x5801ee5c2f6069e0f11cce7c0f27c2ef88e79a95"
stats_update_interval: "10s"
max_concurrent_executions: 2 # Reduced for micro-funding
# Detection thresholds - ULTRA AGGRESSIVE FOR MICRO-FUNDING
min_profit_wei: 1000000000000000 # $2.00 minimum profit (0.001 ETH @ $2000/ETH)
min_roi_percent: 0.05 # Minimum 0.05% ROI - AGGRESSIVE!
min_significant_swap_size: 50000000000000000 # 0.05 ETH minimum swap size
slippage_tolerance: 0.005 # 0.5% max slippage (tighter)
# Scanning parameters
min_scan_amount_wei: 50000000000000000 # 0.05 ETH minimum scan amount
max_scan_amount_wei: 5000000000000000000 # 5 ETH maximum scan amount
max_gas_price_wei: 1000000000 # 1.0 gwei max gas price (Arbitrum)
# Processing limits
max_opportunities_per_event: 3 # Max opportunities to process per swap event
# Timing constraints
opportunity_ttl: "30s" # Opportunities expire after 30 seconds
max_path_age: "60s" # Max age for cached arbitrage paths
# Multi-hop and confidence settings
min_profit_threshold: 0.05 # 0.05% minimum
max_hops: 3 # Allow up to 3-hop arbitrage
enable_multi_hop: true # Enable multi-hop opportunities
score_by_profit: true # Prioritize by profit amount
score_by_confidence: true # Weight by confidence score
min_confidence_score: 0.6 # Minimum 60% confidence
# PRODUCTION Arbitrage Strategy Configuration - ARBITRUM FOCUSED
arbitrage_config:
min_profit_threshold: "0.001" # 0.001 ETH minimum profit (~10x gas cost for safety)
max_gas_price: "0.5" # 0.5 gwei max (capped in code, appropriate for Arbitrum)
max_slippage: "0.3" # 0.3% max slippage (tight for profitability)
# MEV Competition Settings
priority_fee_multiplier: 15 # 15x base gas for competitive advantage
max_position_size: "10.0" # Max 10 ETH per arbitrage (risk management)
# Profitability Requirements - AGGRESSIVE SETTINGS FOR RAPID EXECUTION
min_roi_percent: 0.01 # Minimum 0.01% ROI to execute - AGGRESSIVE!
gas_cost_multiplier: 1.5 # Require 1.5x gas cost as minimum profit - LOWERED!
# Priority token pairs for arbitrage
priority_pairs:
- ["WETH", "USDC"]
- ["WETH", "USDT"]
- ["USDC", "USDT"]
- ["WETH", "ARB"]
- ["WETH", "GMX"]
- ["ARB", "USDC"]
# Flash swap preferences
flash_swap_providers:
- protocol: "uniswap_v3"
priority: 1
fee_tier: 500
- protocol: "camelot"
priority: 2
- protocol: "uniswap_v2"
priority: 3
# Risk Management
risk_management:
max_position_size: "10.0" # Max position size in ETH
circuit_breaker_threshold: 5 # Stop after 5 consecutive failures
cooldown_period: 300 # 5 minutes cooldown after circuit breaker
# Arbitrum Network Configuration with Fallback Support
arbitrum:
# Primary RPC endpoint (can be overridden by ARBITRUM_RPC_ENDPOINT env var)
rpc_endpoint: "${ARBITRUM_RPC_ENDPOINT:-wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57}"
# WebSocket endpoint (can be overridden by ARBITRUM_WS_ENDPOINT env var)
ws_endpoint: "${ARBITRUM_WS_ENDPOINT:-wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57}"
chain_id: 42161
rate_limit:
requests_per_second: 20 # Conservative limit for Chainstack Growth plan
max_concurrent: 5 # Reduced to prevent rate limit bursts
burst: 30 # Conservative burst allowance
rpc_call_delay_ms: 50 # 50ms delay to smooth request distribution
# Fallback RPC endpoints for reliability (can be overridden by ARBITRUM_FALLBACK_ENDPOINTS env var)
# ENHANCED: More endpoints with timeout and retry settings
connection_timeout: "30s" # Increased from default 10s
request_timeout: "15s" # Increased from default 5s
max_retries: 5 # Increased from default 3
fallback_endpoints:
- url: "https://arb1.arbitrum.io/rpc"
rate_limit:
requests_per_second: 5 # Conservative for public endpoint
max_concurrent: 2
burst: 3
- url: "https://rpc.ankr.com/arbitrum"
rate_limit:
requests_per_second: 10 # Conservative for free tier
max_concurrent: 2
burst: 3
- url: "https://arbitrum.blockpi.network/v1/rpc/public"
rate_limit:
requests_per_second: 5 # Conservative for public endpoint
max_concurrent: 2
burst: 3
- url: "https://arbitrum-one.publicnode.com"
rate_limit:
requests_per_second: 5 # Conservative for public endpoint
max_concurrent: 2
burst: 3
- url: "https://1rpc.io/arb"
rate_limit:
requests_per_second: 5 # Conservative for public endpoint
max_concurrent: 2
burst: 3
- url: "https://arbitrum-one.public.blastapi.io"
rate_limit:
requests_per_second: 5 # Conservative for public endpoint
max_concurrent: 2
burst: 3
# Legacy Network Configuration (for backward compatibility)
network:
chain_id: 42161
name: "Arbitrum One"
rpc_endpoints:
- "https://arb1.arbitrum.io/rpc"
- "https://arbitrum-one.public.blastapi.io"
ws_endpoints:
- "wss://arb1.arbitrum.io/ws"
# Gas Configuration for Arbitrum
gas:
base_gas_price: 0.01 # Base gas price in gwei (Arbitrum typical)
priority_fee: 0.005 # Priority fee in gwei (very low on Arbitrum)
gas_multiplier: 1.1 # Multiplier for urgent transactions
max_gas_limit: 1000000 # Maximum gas limit per transaction (higher for complex arbitrage)
# Monitoring and Alerting
monitoring:
profit_alerts_threshold: "0.1" # Alert for profits above 0.1 ETH
loss_alerts_threshold: "0.05" # Alert for losses above 0.05 ETH
health_check_interval: 30 # Health check every 30 seconds
# Database Configuration
database:
type: "sqlite"
connection_string: "file:./data/mev_bot.db"
max_connections: 10
# Logging Configuration
log:
level: "info"
format: "json"
file: "./logs/mev_bot.log"
# Security Configuration
security:
require_signature_verification: true
max_transaction_value: "100.0" # Max transaction value in ETH
whitelist_only: false
emergency_stop_enabled: true
# Execution Configuration - MICRO-FUNDING MODE (0.001 ETH)
execution:
enabled: true # Enable live trading
dry_run: false # Real transactions
# Profitability Thresholds - LOWERED for micro-funding
min_profit_usd: 2.0 # Minimum $2 profit (lowered from $10)
min_profit_percentage: 0.05 # Minimum 0.05% profit (lowered from 0.1%)
max_profit_percentage: 50.0 # Maximum expected profit (safety check)
# Gas Management - CRITICAL for 0.0005 ETH limit
max_gas_price_gwei: 1.0 # Maximum 1 gwei (Arbitrum typical: 0.1-0.5)
max_gas_cost_usd: 1.0 # Maximum $1 gas (~0.0005 ETH at $2000/ETH)
gas_estimation_buffer: 1.1 # Only 10% buffer (reduced from 20%)
# Execution Limits - Conservative for micro-funding
max_position_size_eth: 5.0 # Maximum flash loan size (reduced from 10)
max_trades_per_minute: 2 # Rate limiting (reduced from 5)
max_daily_trades: 50 # Daily limit (reduced from 200)
# Safety Settings
enable_slippage_protection: true # Protect against slippage
max_slippage_percentage: 0.5 # Maximum 0.5% slippage (tightened)
enable_front_run_protection: true # Monitor mempool for front-running
# Flash Loan Settings
flash_loan_enabled: true # Use flash loans for capital-free trading
preferred_flash_loan_provider: "balancer" # "balancer" (0% fee) - CRITICAL
flash_loan_fallback: ["uniswap", "aave"] # Fallback providers
# Keystore Configuration
keystore_path: "keystore/production/executor_wallet.json"
keystore_encryption_key_env: "MEV_BOT_ENCRYPTION_KEY"
# =============================================================================
# LAYER 2 OPTIMIZATIONS (Phase 1) - ARBITRUM-SPECIFIC TIMING
# =============================================================================
# Based on comprehensive L2 MEV research (docs/L2_MEV_BOT_RESEARCH_REPORT.md)
# All changes are NON-BREAKING and can be disabled via feature flags
features:
# Phase 1: Configuration tuning (ROLLBACK - DISABLED)
use_arbitrum_optimized_timeouts: false # DISABLED - Back to legacy 30s/60s
use_dynamic_ttl: false # Static TTL for now, enable later
# Phase 2-5: Future optimizations (DISABLED)
enable_dex_prefilter: false # Transaction filtering (Phase 2)
use_direct_sequencer_feed: false # Sequencer WebSocket (Phase 3)
enable_timeboost: false # Express lane (Phase 4-5)
arbitrage_optimized:
# CRITICAL: Tuned for Arbitrum's 250ms blocks (vs 12s Ethereum)
# Research shows opportunities last 10-20 blocks (2.5-5 seconds)
# Opportunity lifecycle - CRITICAL FIX #7: Increased TTL for Arbitrum
opportunity_ttl: "15s" # CRITICAL FIX #7: 60 blocks @ 250ms (increased from 5s to allow more execution time)
max_path_age: "20s" # CRITICAL FIX #7: 80 blocks @ 250ms (increased from 10s for orchestration buffer)
execution_deadline: "10s" # CRITICAL FIX #7: 40 blocks @ 250ms (increased from 3s to prevent timeout failures)
# Backward compatibility - for emergency rollback
legacy_opportunity_ttl: "30s" # Original Ethereum-optimized value
legacy_max_path_age: "60s" # Original Ethereum-optimized value
# Dynamic TTL settings (if use_dynamic_ttl enabled)
dynamic_ttl:
min_ttl_blocks: 10 # Minimum 10 blocks (2.5s)
max_ttl_blocks: 20 # Maximum 20 blocks (5s)
profit_multiplier: true # Higher profit = longer TTL
volatility_adjustment: true # High volatility = shorter TTL

View File

@@ -1,177 +0,0 @@
# MEV Bot Configuration - Micro-Funding Mode (0.001 ETH)
# Optimized for minimal gas budget with ultra-low thresholds
# Bot Mode
mode: "execution" # Live trading enabled
# Execution Settings - ULTRA LOW GAS MODE
execution:
enabled: true # Enable live trading
dry_run: false # Real transactions
# Profitability Thresholds - LOWERED for micro-funding
min_profit_usd: 2.0 # Minimum $2 profit (lowered from $10)
min_profit_percentage: 0.05 # Minimum 0.05% profit (lowered from 0.1%)
max_profit_percentage: 50.0 # Maximum expected profit (safety check)
# Gas Management - CRITICAL for 0.0005 ETH limit
max_gas_price_gwei: 1.0 # Maximum 1 gwei (Arbitrum typical: 0.1-0.5 gwei)
max_gas_cost_usd: 1.0 # Maximum $1 gas (~0.0005 ETH at $2000/ETH)
gas_estimation_buffer: 1.1 # Only 10% buffer (reduced from 20%)
# Execution Limits - Conservative for micro-funding
max_position_size_eth: 5.0 # Maximum flash loan size (reduced from 10)
max_trades_per_minute: 2 # Rate limiting (reduced from 5)
max_daily_trades: 50 # Daily limit (reduced from 200)
# Safety Settings
enable_slippage_protection: true # Protect against slippage
max_slippage_percentage: 0.5 # Maximum 0.5% slippage (tightened from 1%)
enable_front_run_protection: true # Monitor mempool for front-running
# Flash Loan Settings
flash_loan_enabled: true # Use flash loans for capital-free trading
preferred_flash_loan_provider: "balancer" # "balancer" (0% fee) - CRITICAL for low budget
flash_loan_fallback: ["uniswap", "aave"] # Fallback providers (note: Uniswap has 0.09% fee)
# Keystore Configuration
keystore_path: "keystore/production/executor_wallet.json"
keystore_encryption_key_env: "MEV_BOT_ENCRYPTION_KEY"
# Arbitrage Detection - AGGRESSIVE settings for more opportunities
arbitrage:
min_profit_threshold: 0.05 # 0.05% minimum (lowered from 0.1%)
max_hops: 3 # Allow up to 3-hop arbitrage
enable_multi_hop: true # Enable multi-hop opportunities
# Opportunity Scoring - Aggressive filtering
score_by_profit: true # Prioritize by profit amount
score_by_confidence: true # Weight by confidence score
min_confidence_score: 0.6 # Minimum 60% confidence (lowered from 70%)
# Network Configuration
network:
chain_id: 42161 # Arbitrum One
name: "Arbitrum One"
# RPC Configuration
provider_config_path: "config/providers.yaml"
# Connection Settings
max_retries: 3
retry_delay_ms: 1000
connection_timeout_seconds: 30
request_timeout_seconds: 10
# Monitoring & Logging
monitoring:
enable_metrics: true # Enable Prometheus metrics
metrics_port: 9090
health_check_interval_seconds: 30
# Performance Tracking
track_execution_latency: true
track_gas_usage: true
track_profit_loss: true
# Alerting
enable_alerts: true
alert_on_failed_execution: true
alert_on_low_balance: true
low_balance_threshold_eth: 0.0003 # Alert when < 0.0003 ETH (60% of one trade)
# Logging
logging:
level: "info" # "debug", "info", "warn", "error"
format: "json" # "json" or "text"
output: "logs/mev_bot.log"
enable_console: true
enable_file: true
# Log Rotation
max_size_mb: 100
max_backups: 10
max_age_days: 30
compress: true
# DEX Configuration - Prioritize lowest gas DEXs
dexes:
# Uniswap V3 (Most liquid, but higher gas)
- name: "uniswap_v3"
enabled: true
router_address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
priority: 2
# SushiSwap (Lower gas than Uniswap V3)
- name: "sushiswap"
enabled: true
router_address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
factory_address: "0xc35DADB65012eC5796536bD9864eD8773aBc74C4"
priority: 1
# Camelot (Arbitrum native, efficient)
- name: "camelot"
enabled: true
router_address: "0xc873fEcbd354f5A56E00E710B90EF4201db2448d"
factory_address: "0x6EcCab422D763aC031210895C81787E87B43A652"
priority: 1
# Balancer V2 (Flash Loans - 0% fee!)
- name: "balancer_v2"
enabled: true
vault_address: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
priority: 1
# Token Configuration - Focus on high-volume pairs only
tokens:
# Wrapped Ether (WETH) - Essential
- symbol: "WETH"
address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
decimals: 18
enabled: true
# USD Coin (USDC) - Highest volume stablecoin
- symbol: "USDC"
address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
decimals: 6
enabled: true
# Tether (USDT) - Second stablecoin
- symbol: "USDT"
address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
decimals: 6
enabled: true
# Arbitrum (ARB) - Native token
- symbol: "ARB"
address: "0x912CE59144191C1204E64559FE8253a0e49E6548"
decimals: 18
enabled: true
# Smart Contracts (Deployed)
contracts:
arbitrage_executor: "0x6C2B1c6Eb0e5aB73d8C60944c74A62bfE629c418"
flash_swapper: "0x7Cc97259cBe0D02Cd0b8A80c2E1f79C7265808b4"
data_fetcher: "0xC6BD82306943c0F3104296a46113ca0863723cBD"
# Micro-Funding Mode Notes:
#
# With 0.001 ETH and max 0.0005 ETH per trade:
# - Estimated capacity: ~2 trades before refill
# - Focus on highest probability opportunities only
# - Use Balancer flash loans exclusively (0% fee)
# - Minimize gas usage at all costs
# - Alert on low balance immediately
#
# Expected Performance:
# - Trades/day: 1-3 (very selective)
# - Avg profit: $2-5 per trade
# - Risk: Very low (small position sizes)
# - Refill frequency: Every 1-2 days
#
# Recommendations:
# - Monitor balance closely
# - Consider increasing to 0.005 ETH for better capacity
# - Expect fewer but higher-confidence trades
# - Gas efficiency is critical - bot will be very selective

View File

@@ -1,177 +0,0 @@
# MEV Bot Configuration - Micro-Funding Mode (0.001 ETH)
# Optimized for minimal gas budget with ultra-low thresholds
# Bot Mode
mode: "execution" # Live trading enabled
# Execution Settings - ULTRA LOW GAS MODE
execution:
enabled: true # Enable live trading
dry_run: false # Real transactions
# Profitability Thresholds - LOWERED for micro-funding
min_profit_usd: 2.0 # Minimum $2 profit (lowered from $10)
min_profit_percentage: 0.05 # Minimum 0.05% profit (lowered from 0.1%)
max_profit_percentage: 50.0 # Maximum expected profit (safety check)
# Gas Management - CRITICAL for 0.0005 ETH limit
max_gas_price_gwei: 1.0 # Maximum 1 gwei (Arbitrum typical: 0.1-0.5 gwei)
max_gas_cost_usd: 1.0 # Maximum $1 gas (~0.0005 ETH at $2000/ETH)
gas_estimation_buffer: 1.1 # Only 10% buffer (reduced from 20%)
# Execution Limits - Conservative for micro-funding
max_position_size_eth: 5.0 # Maximum flash loan size (reduced from 10)
max_trades_per_minute: 2 # Rate limiting (reduced from 5)
max_daily_trades: 50 # Daily limit (reduced from 200)
# Safety Settings
enable_slippage_protection: true # Protect against slippage
max_slippage_percentage: 0.5 # Maximum 0.5% slippage (tightened from 1%)
enable_front_run_protection: true # Monitor mempool for front-running
# Flash Loan Settings
flash_loan_enabled: true # Use flash loans for capital-free trading
preferred_flash_loan_provider: "balancer" # "balancer" (0% fee) - CRITICAL for low budget
flash_loan_fallback: ["uniswap", "aave"] # Fallback providers (note: Uniswap has 0.09% fee)
# Keystore Configuration
keystore_path: "keystore/production/executor_wallet.json"
keystore_encryption_key_env: "MEV_BOT_ENCRYPTION_KEY"
# Arbitrage Detection - AGGRESSIVE settings for more opportunities
arbitrage:
min_profit_threshold: 0.05 # 0.05% minimum (lowered from 0.1%)
max_hops: 3 # Allow up to 3-hop arbitrage
enable_multi_hop: true # Enable multi-hop opportunities
# Opportunity Scoring - Aggressive filtering
score_by_profit: true # Prioritize by profit amount
score_by_confidence: true # Weight by confidence score
min_confidence_score: 0.6 # Minimum 60% confidence (lowered from 70%)
# Network Configuration
network:
chain_id: 42161 # Arbitrum One
name: "Arbitrum One"
# RPC Configuration
provider_config_path: "config/providers.yaml"
# Connection Settings
max_retries: 3
retry_delay_ms: 1000
connection_timeout_seconds: 30
request_timeout_seconds: 10
# Monitoring & Logging
monitoring:
enable_metrics: true # Enable Prometheus metrics
metrics_port: 9090
health_check_interval_seconds: 30
# Performance Tracking
track_execution_latency: true
track_gas_usage: true
track_profit_loss: true
# Alerting
enable_alerts: true
alert_on_failed_execution: true
alert_on_low_balance: true
low_balance_threshold_eth: 0.0003 # Alert when < 0.0003 ETH (60% of one trade)
# Logging
logging:
level: "info" # "debug", "info", "warn", "error"
format: "json" # "json" or "text"
output: "logs/mev_bot.log"
enable_console: true
enable_file: true
# Log Rotation
max_size_mb: 100
max_backups: 10
max_age_days: 30
compress: true
# DEX Configuration - Prioritize lowest gas DEXs
dexes:
# Uniswap V3 (Most liquid, but higher gas)
- name: "uniswap_v3"
enabled: true
router_address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
priority: 2
# SushiSwap (Lower gas than Uniswap V3)
- name: "sushiswap"
enabled: true
router_address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
factory_address: "0xc35DADB65012eC5796536bD9864eD8773aBc74C4"
priority: 1
# Camelot (Arbitrum native, efficient)
- name: "camelot"
enabled: true
router_address: "0xc873fEcbd354f5A56E00E710B90EF4201db2448d"
factory_address: "0x6EcCab422D763aC031210895C81787E87B43A652"
priority: 1
# Balancer V2 (Flash Loans - 0% fee!)
- name: "balancer_v2"
enabled: true
vault_address: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
priority: 1
# Token Configuration - Focus on high-volume pairs only
tokens:
# Wrapped Ether (WETH) - Essential
- symbol: "WETH"
address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
decimals: 18
enabled: true
# USD Coin (USDC) - Highest volume stablecoin
- symbol: "USDC"
address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
decimals: 6
enabled: true
# Tether (USDT) - Second stablecoin
- symbol: "USDT"
address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
decimals: 6
enabled: true
# Arbitrum (ARB) - Native token
- symbol: "ARB"
address: "0x912CE59144191C1204E64559FE8253a0e49E6548"
decimals: 18
enabled: true
# Smart Contracts (Deployed)
contracts:
arbitrage_executor: "0x6C2B1c6Eb0e5aB73d8C60944c74A62bfE629c418"
flash_swapper: "0x7Cc97259cBe0D02Cd0b8A80c2E1f79C7265808b4"
data_fetcher: "0xC6BD82306943c0F3104296a46113ca0863723cBD"
# Micro-Funding Mode Notes:
#
# With 0.001 ETH and max 0.0005 ETH per trade:
# - Estimated capacity: ~2 trades before refill
# - Focus on highest probability opportunities only
# - Use Balancer flash loans exclusively (0% fee)
# - Minimize gas usage at all costs
# - Alert on low balance immediately
#
# Expected Performance:
# - Trades/day: 1-3 (very selective)
# - Avg profit: $2-5 per trade
# - Risk: Very low (small position sizes)
# - Refill frequency: Every 1-2 days
#
# Recommendations:
# - Monitor balance closely
# - Consider increasing to 0.005 ETH for better capacity
# - Expect fewer but higher-confidence trades
# - Gas efficiency is critical - bot will be very selective

View File

@@ -1,177 +0,0 @@
# MEV Bot Configuration - Micro-Funding Mode (0.001 ETH)
# Optimized for minimal gas budget with ultra-low thresholds
# Bot Mode
mode: "execution" # Live trading enabled
# Execution Settings - ULTRA LOW GAS MODE
execution:
enabled: true # Enable live trading
dry_run: false # Real transactions
# Profitability Thresholds - LOWERED for micro-funding
min_profit_usd: 2.0 # Minimum $2 profit (lowered from $10)
min_profit_percentage: 0.05 # Minimum 0.05% profit (lowered from 0.1%)
max_profit_percentage: 50.0 # Maximum expected profit (safety check)
# Gas Management - CRITICAL for 0.0005 ETH limit
max_gas_price_gwei: 1.0 # Maximum 1 gwei (Arbitrum typical: 0.1-0.5 gwei)
max_gas_cost_usd: 1.0 # Maximum $1 gas (~0.0005 ETH at $2000/ETH)
gas_estimation_buffer: 1.1 # Only 10% buffer (reduced from 20%)
# Execution Limits - Conservative for micro-funding
max_position_size_eth: 5.0 # Maximum flash loan size (reduced from 10)
max_trades_per_minute: 2 # Rate limiting (reduced from 5)
max_daily_trades: 50 # Daily limit (reduced from 200)
# Safety Settings
enable_slippage_protection: true # Protect against slippage
max_slippage_percentage: 0.5 # Maximum 0.5% slippage (tightened from 1%)
enable_front_run_protection: true # Monitor mempool for front-running
# Flash Loan Settings
flash_loan_enabled: true # Use flash loans for capital-free trading
preferred_flash_loan_provider: "balancer" # "balancer" (0% fee) - CRITICAL for low budget
flash_loan_fallback: ["uniswap", "aave"] # Fallback providers (note: Uniswap has 0.09% fee)
# Keystore Configuration
keystore_path: "keystore/production/executor_wallet.json"
keystore_encryption_key_env: "MEV_BOT_ENCRYPTION_KEY"
# Arbitrage Detection - AGGRESSIVE settings for more opportunities
arbitrage:
min_profit_threshold: 0.05 # 0.05% minimum (lowered from 0.1%)
max_hops: 3 # Allow up to 3-hop arbitrage
enable_multi_hop: true # Enable multi-hop opportunities
# Opportunity Scoring - Aggressive filtering
score_by_profit: true # Prioritize by profit amount
score_by_confidence: true # Weight by confidence score
min_confidence_score: 0.6 # Minimum 60% confidence (lowered from 70%)
# Network Configuration
network:
chain_id: 42161 # Arbitrum One
name: "Arbitrum One"
# RPC Configuration
provider_config_path: "config/providers.yaml"
# Connection Settings
max_retries: 3
retry_delay_ms: 1000
connection_timeout_seconds: 30
request_timeout_seconds: 10
# Monitoring & Logging
monitoring:
enable_metrics: true # Enable Prometheus metrics
metrics_port: 9090
health_check_interval_seconds: 30
# Performance Tracking
track_execution_latency: true
track_gas_usage: true
track_profit_loss: true
# Alerting
enable_alerts: true
alert_on_failed_execution: true
alert_on_low_balance: true
low_balance_threshold_eth: 0.0003 # Alert when < 0.0003 ETH (60% of one trade)
# Logging
logging:
level: "info" # "debug", "info", "warn", "error"
format: "json" # "json" or "text"
output: "logs/mev_bot.log"
enable_console: true
enable_file: true
# Log Rotation
max_size_mb: 100
max_backups: 10
max_age_days: 30
compress: true
# DEX Configuration - Prioritize lowest gas DEXs
dexes:
# Uniswap V3 (Most liquid, but higher gas)
- name: "uniswap_v3"
enabled: true
router_address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
priority: 2
# SushiSwap (Lower gas than Uniswap V3)
- name: "sushiswap"
enabled: true
router_address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
factory_address: "0xc35DADB65012eC5796536bD9864eD8773aBc74C4"
priority: 1
# Camelot (Arbitrum native, efficient)
- name: "camelot"
enabled: true
router_address: "0xc873fEcbd354f5A56E00E710B90EF4201db2448d"
factory_address: "0x6EcCab422D763aC031210895C81787E87B43A652"
priority: 1
# Balancer V2 (Flash Loans - 0% fee!)
- name: "balancer_v2"
enabled: true
vault_address: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
priority: 1
# Token Configuration - Focus on high-volume pairs only
tokens:
# Wrapped Ether (WETH) - Essential
- symbol: "WETH"
address: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
decimals: 18
enabled: true
# USD Coin (USDC) - Highest volume stablecoin
- symbol: "USDC"
address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
decimals: 6
enabled: true
# Tether (USDT) - Second stablecoin
- symbol: "USDT"
address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
decimals: 6
enabled: true
# Arbitrum (ARB) - Native token
- symbol: "ARB"
address: "0x912CE59144191C1204E64559FE8253a0e49E6548"
decimals: 18
enabled: true
# Smart Contracts (Deployed)
contracts:
arbitrage_executor: "0x6C2B1c6Eb0e5aB73d8C60944c74A62bfE629c418"
flash_swapper: "0x7Cc97259cBe0D02Cd0b8A80c2E1f79C7265808b4"
data_fetcher: "0xC6BD82306943c0F3104296a46113ca0863723cBD"
# Micro-Funding Mode Notes:
#
# With 0.001 ETH and max 0.0005 ETH per trade:
# - Estimated capacity: ~2 trades before refill
# - Focus on highest probability opportunities only
# - Use Balancer flash loans exclusively (0% fee)
# - Minimize gas usage at all costs
# - Alert on low balance immediately
#
# Expected Performance:
# - Trades/day: 1-3 (very selective)
# - Avg profit: $2-5 per trade
# - Risk: Very low (small position sizes)
# - Refill frequency: Every 1-2 days
#
# Recommendations:
# - Monitor balance closely
# - Consider increasing to 0.005 ETH for better capacity
# - Expect fewer but higher-confidence trades
# - Gas efficiency is critical - bot will be very selective

View File

@@ -1,98 +0,0 @@
# MEV Bot Development Configuration
# Arbitrum node configuration
arbitrum:
# RPC endpoint for Arbitrum node (using public endpoint for development)
rpc_endpoint: "https://arb1.arbitrum.io/rpc"
# WebSocket endpoint for Arbitrum node - CRITICAL FIX: Use HTTP instead of WSS to avoid 403
# The Chainstack WSS endpoint in .env returns 403 Forbidden
# Using empty string will make bot use RPC endpoint for both HTTP and WS
ws_endpoint: ""
# Chain ID for Arbitrum (42161 for mainnet)
chain_id: 42161
# Rate limiting configuration for RPC endpoint
rate_limit:
# Maximum requests per second (adjust based on your provider's limits)
requests_per_second: 5
# Maximum concurrent requests
max_concurrent: 3
# Burst size for rate limiting
burst: 10
# Fallback RPC endpoints
fallback_endpoints:
- url: "https://arbitrum-rpc.publicnode.com"
rate_limit:
requests_per_second: 3
max_concurrent: 2
burst: 5
# Bot configuration
bot:
# Enable or disable the bot
enabled: true
# Polling interval in seconds
polling_interval: 5
# Minimum profit threshold in USD
min_profit_threshold: 5.0
# Gas price multiplier (for faster transactions)
gas_price_multiplier: 1.2
# Maximum number of concurrent workers for processing
max_workers: 5
# Buffer size for channels
channel_buffer_size: 50
# Timeout for RPC calls in seconds
rpc_timeout: 30
# Uniswap configuration
uniswap:
# Factory contract address
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
# Position manager contract address
position_manager_address: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
# Supported fee tiers
fee_tiers:
- 500 # 0.05%
- 3000 # 0.3%
- 10000 # 1%
# Cache configuration for pool data
cache:
# Enable or disable caching
enabled: true
# Cache expiration time in seconds
expiration: 300
# Maximum cache size
max_size: 1000
# Logging configuration
log:
# Log level (debug, info, warn, error)
level: "debug"
# Log format (json, text)
format: "text"
# Log file path (empty for stdout)
file: ""
# Database configuration
database:
# Database file path
file: "data/mev-bot.db"
# Maximum number of open connections
max_open_connections: 5
# Maximum number of idle connections
max_idle_connections: 2
# Arbitrage configuration
arbitrage:
# Enable or disable arbitrage service
enabled: true
# Minimum profit threshold in USD
min_profit: 1.0
# Maximum position size in USD
max_position_size: 1000.0
# Gas price limit in gwei
max_gas_price: 100
# Minimum swap size to trigger arbitrage detection (in wei)
min_significant_swap_size: 10000000000000000 # 0.01 ETH
# Minimum scan amount (in wei) - CRITICAL FIX for amount=0 bug
min_scan_amount_wei: 10000000000000000 # 0.01 ETH minimum
# Maximum scan amount (in wei) - fits in int64 (max 9.2e18)
max_scan_amount_wei: 9000000000000000000 # 9 ETH maximum (fits int64)

View File

@@ -1,207 +0,0 @@
# 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: 200
# Higher concurrency for parallel processing
max_concurrent: 20
# Large burst for L2 message spikes
burst: 1000
# Fallback RPC endpoints for redundancy
fallback_endpoints:
- url: "${ARBITRUM_FALLBACK_ENDPOINTS}"
rate_limit:
requests_per_second: 100
max_concurrent: 15
burst: 500
- url: "https://arb1.arbitrum.io/rpc"
rate_limit:
requests_per_second: 50
max_concurrent: 10
burst: 250
- url: "https://arbitrum.llamarpc.com"
rate_limit:
requests_per_second: 75
max_concurrent: 12
burst: 375
- url: "https://arbitrum-one.publicnode.com"
rate_limit:
requests_per_second: 60
max_concurrent: 10
burst: 300
- url: "https://arbitrum-one.public.blastapi.io"
rate_limit:
requests_per_second: 80
max_concurrent: 15
burst: 400
# Bot configuration optimized for L2 message processing
bot:
# Enable the bot
enabled: true
# Ultra-fast polling for L2 blocks (100ms for maximum competitive advantage)
polling_interval: 0.1
# Minimum profit threshold in USD (account for L2 gas costs)
min_profit_threshold: 10.0
# Gas price multiplier for fast L2 execution
gas_price_multiplier: 2.0
# High worker count for L2 message volume
max_workers: 25
# Large buffer for high-frequency L2 messages
channel_buffer_size: 2000
# 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: 15
# Large cache for many pools
max_size: 100000
# 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: 100
# Large idle pool for performance
max_idle_connections: 50
# 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: 200
batch_timeout: "50ms"
# Gas optimization
gas_estimation:
# Include L1 data fees in calculations
include_l1_fees: true
# Safety multiplier for gas limits
safety_multiplier: 1.5
# Priority fee strategy
priority_fee_strategy: "aggressive"
# Security settings
security:
# Maximum position size (in ETH)
max_position_size: 50.0
# Daily loss limit (in ETH)
daily_loss_limit: 5.0
# Circuit breaker settings
circuit_breaker:
enabled: true
error_threshold: 5
timeout: "2m"
# 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
balancer_v2:
enabled: true
router: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
priority: 4
curve:
enabled: true
router: "0x445FE580eF8d70FF569aB36e80c647af338db351"
priority: 5
# 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.02"
severity: "critical"
- name: "Low Profit Margin"
condition: "avg_profit < min_profit_threshold"
severity: "warning"
- name: "L2 Message Lag"
condition: "l2_message_lag > 500ms"
severity: "critical"
- name: "Gas Price Spike"
condition: "gas_price > 100gwei"
severity: "warning"
- name: "Daily Loss Limit"
condition: "daily_loss > daily_loss_limit"
severity: "critical"
- name: "Position Size Limit"
condition: "position_size > max_position_size"
severity: "critical"
# 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

View File

@@ -1,160 +0,0 @@
# MEV Bot Staging Environment Configuration
# This configuration is for testing in a production-like environment with reduced risk
# Arbitrum node configuration
arbitrum:
# RPC endpoint for Arbitrum node (using premium provider for staging)
rpc_endpoint: "${ARBITRUM_RPC_ENDPOINT}"
# WebSocket endpoint for Arbitrum node (optional)
ws_endpoint: "${ARBITRUM_WS_ENDPOINT}"
# Chain ID for Arbitrum (42161 for mainnet)
chain_id: 42161
# Rate limiting configuration for RPC endpoint (more conservative than production)
rate_limit:
# Maximum requests per second (reduced to avoid hitting limits)
requests_per_second: 50
# Maximum concurrent requests (reduced to avoid overload)
max_concurrent: 5
# Burst size for rate limiting
burst: 100
# Fallback RPC endpoints
fallback_endpoints:
- url: "https://arb1.arbitrum.io/rpc"
rate_limit:
requests_per_second: 25
max_concurrent: 3
burst: 50
- url: "https://arbitrum.llamarpc.com"
rate_limit:
requests_per_second: 30
max_concurrent: 3
burst: 60
- url: "https://arbitrum-one.publicnode.com"
rate_limit:
requests_per_second: 20
max_concurrent: 2
burst: 40
# Bot configuration
bot:
# Enable or disable the bot
enabled: true
# Polling interval in seconds (slower than production for testing)
polling_interval: 10
# Minimum profit threshold in USD (higher than production for testing)
min_profit_threshold: 50.0
# Gas price multiplier (for faster transactions)
gas_price_multiplier: 1.2
# Maximum number of concurrent workers for processing (reduced for staging)
max_workers: 3
# Buffer size for channels
channel_buffer_size: 100
# Timeout for RPC calls in seconds
rpc_timeout: 30
# Uniswap configuration
uniswap:
# Factory contract address
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
# Position manager contract address
position_manager_address: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
# Supported fee tiers
fee_tiers:
- 500 # 0.05%
- 3000 # 0.3%
- 10000 # 1%
# Cache configuration for pool data
cache:
# Enable or disable caching
enabled: true
# Cache expiration time in seconds
expiration: 300
# Maximum cache size
max_size: 5000
# Logging configuration
log:
# Log level (debug, info, warn, error)
level: "debug"
# Log format (json, text)
format: "text"
# Log file path (empty for stdout)
file: "logs/mev-bot_staging.log"
# Database configuration
database:
# Database file path
file: "data/mev-bot_staging.db"
# Maximum number of open connections
max_open_connections: 10
# Maximum number of idle connections
max_idle_connections: 5
# Ethereum configuration
ethereum:
# Private key for transaction signing (NEVER COMMIT TO VERSION CONTROL)
private_key: "${ETHEREUM_PRIVATE_KEY}"
# Account address
account_address: "${ETHEREUM_ACCOUNT_ADDRESS}"
# Gas price multiplier (for faster transactions)
gas_price_multiplier: 1.2
# Smart contract addresses
contracts:
# Arbitrage executor contract address
arbitrage_executor: "${CONTRACT_ARBITRAGE_EXECUTOR}"
# Flash swapper contract address
flash_swapper: "${CONTRACT_FLASH_SWAPPER}"
# Authorized caller addresses
authorized_callers:
- "${ETHEREUM_ACCOUNT_ADDRESS}"
# Authorized DEX addresses
authorized_dexes:
- "0x1F98431c8aD98523631AE4a59f267346ea31F984" # Uniswap V3
- "0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9" # Uniswap V2
- "0xc35DADB65012eC5796536bD9864eD8773aBc74C4" # SushiSwap V2
- "0x6EcCab422D763aC031210895C81787E87B82A80f" # Camelot V2
- "0xaE4EC9901c3076D0DdBe76A520F9E90a6227aCB7" # TraderJoe
- "0xBA12222222228d8Ba445958a75a0704d566BF2C8" # Balancer V2
- "0x445FE580eF8d70FF569aB36e80c647af338db351" # Curve
# Arbitrage configuration
arbitrage:
# Enable or disable arbitrage service
enabled: true
# Contract addresses
arbitrage_contract_address: "${CONTRACT_ARBITRAGE_EXECUTOR}"
flash_swap_contract_address: "${CONTRACT_FLASH_SWAPPER}"
# Profitability settings
min_profit_wei: 50000000000000000 # 0.05 ETH minimum profit
min_roi_percent: 2.0 # 2% minimum ROI
min_significant_swap_size: 100000000000000000 # 0.1 ETH minimum swap size
slippage_tolerance: 0.01 # 1% slippage tolerance
# Scanning configuration
min_scan_amount_wei: 10000000000000000 # 0.01 ETH minimum scan amount
max_scan_amount_wei: 1000000000000000000 # 1 ETH maximum scan amount
# Gas configuration
max_gas_price_wei: 50000000000 # 50 gwei max gas price
# Execution limits
max_concurrent_executions: 2
max_opportunities_per_event: 3
# Timing settings
opportunity_ttl: 30s
max_path_age: 60s
stats_update_interval: 10s
# Pool discovery configuration
pool_discovery_config:
enabled: true
block_range: 1000
polling_interval: 30s
factory_addresses:
- "0x1F98431c8aD98523631AE4a59f267346ea31F984" # Uniswap V3
- "0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9" # Uniswap V2
- "0xc35DADB65012eC5796536bD9864eD8773aBc74C4" # SushiSwap V2
- "0x6EcCab422D763aC031210895C81787E87B82A80f" # Camelot V2
- "0xaE4EC9901c3076D0DdBe76A520F9E90a6227aCB7" # TraderJoe
- "0xBA12222222228d8Ba445958a75a0704d566BF2C8" # Balancer V2
- "0x445FE580eF8d70FF569aB36e80c647af338db351" # Curve
min_liquidity_wei: 1000000000000000000 # 1 ETH minimum liquidity
cache_size: 10000
cache_ttl: 1h

View File

@@ -1,109 +0,0 @@
# MEV Bot Configuration
# Arbitrum node configuration
arbitrum:
# RPC endpoint for Arbitrum node
rpc_endpoint: "${ARBITRUM_RPC_ENDPOINT}"
# WebSocket endpoint for Arbitrum node (optional)
ws_endpoint: "${ARBITRUM_WS_ENDPOINT}"
# Chain ID for Arbitrum (42161 for mainnet)
chain_id: 42161
# Rate limiting configuration for RPC endpoint (reduced to avoid limits)
rate_limit:
# Maximum requests per second (reduced to avoid rate limits)
requests_per_second: 5
# Maximum concurrent requests
max_concurrent: 3
# Burst size for rate limiting
burst: 10
# Fallback RPC endpoints
fallback_endpoints:
- url: "${ARBITRUM_INFURA_ENDPOINT}"
rate_limit:
requests_per_second: 3
max_concurrent: 2
burst: 5
- url: "https://arbitrum-rpc.publicnode.com"
rate_limit:
requests_per_second: 4
max_concurrent: 2
burst: 8
# Bot configuration
bot:
# Enable or disable the bot
enabled: true
# Polling interval in seconds (increased to reduce load)
polling_interval: 3
# Minimum profit threshold in USD
min_profit_threshold: 10.0
# Gas price multiplier (for faster transactions)
gas_price_multiplier: 1.2
# Maximum number of concurrent workers for processing (reduced to avoid rate limits)
max_workers: 3
# Buffer size for channels
channel_buffer_size: 50
# Timeout for RPC calls in seconds
rpc_timeout: 30
# Uniswap configuration
uniswap:
# Factory contract address
factory_address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
# Position manager contract address
position_manager_address: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88"
# Supported fee tiers
fee_tiers:
- 500 # 0.05%
- 3000 # 0.3%
- 10000 # 1%
# Cache configuration for pool data
cache:
# Enable or disable caching
enabled: true
# Cache expiration time in seconds
expiration: 300
# Maximum cache size
max_size: 10000
# Logging configuration
log:
# Log level (debug, info, warn, error)
level: "debug"
# Log format (json, text)
format: "text"
# Log file path (empty for stdout)
file: "logs/mev-bot.log"
# Database configuration
database:
# Database file path
file: "mev-bot.db"
# Maximum number of open connections
max_open_connections: 10
# Maximum number of idle connections
max_idle_connections: 5
# Ethereum configuration
ethereum:
# Private key for transaction signing (DO NOT COMMIT TO VERSION CONTROL)
private_key: "${ETHEREUM_PRIVATE_KEY}"
# Account address
account_address: "${ETHEREUM_ACCOUNT_ADDRESS}"
# Gas price multiplier (for faster transactions)
gas_price_multiplier: 1.2
# Smart contract addresses
contracts:
# Arbitrage executor contract address
arbitrage_executor: "0xYOUR_ARBITRAGE_EXECUTOR_CONTRACT_ADDRESS_HERE"
# Flash swapper contract address
flash_swapper: "0xYOUR_FLASH_SWAPPER_CONTRACT_ADDRESS_HERE"
# Authorized caller addresses
authorized_callers:
- "${ETHEREUM_ACCOUNT_ADDRESS}"
# Authorized DEX addresses
authorized_dexes:
- "0x1F98431c8aD98523631AE4a59f267346ea31F984" # Uniswap V3
- "0xf1D7CC64Fb4452F05c498126312eBE29f30Fbcf9" # Uniswap V2
- "0xc35DADB65012eC5796536bD9864eD8773aBc74C4" # SushiSwap

View File

@@ -1,172 +0,0 @@
# REAL DEPLOYED MEV CONTRACTS ON ARBITRUM MAINNET
# Deployed from /home/administrator/projects/Mev-Alpha
# Chain ID: 42161 (Arbitrum One)
# =============================================================================
# PRODUCTION DEPLOYED CONTRACTS
# =============================================================================
deployed_contracts:
# Core arbitrage execution contract
arbitrage_executor:
name: "ArbitrageExecutor"
address: "0xec2a16d5f8ac850d08c4c7f67efd50051e7cfc0b"
deployment_tx: "verified_on_arbitrum"
verified: true
gas_used: "estimated_1.5M"
# Flash swap contracts for different protocols
uniswap_v3_flash_swapper:
name: "UniswapV3FlashSwapper"
address: "0x5801ee5c2f6069e0f11cce7c0f27c2ef88e79a95"
deployment_tx: "verified_on_arbitrum"
verified: true
authorized_caller: "0xec2a16d5f8ac850d08c4c7f67efd50051e7cfc0b" # ArbitrageExecutor
# Data fetching contract for market analysis
data_fetcher:
name: "DataFetcher"
address: "0x3c2c9c86f081b9dac1f0bf97981cfbe96436b89d"
deployment_tx: "verified_on_arbitrum"
verified: true
# Additional flash swapper contracts (check deployment for addresses)
uniswap_v2_flash_swapper:
name: "UniswapV2FlashSwapper"
address: "0xc0b8c3e9a976ec67d182d7cb0283fb4496692593" # Assuming from other addresses
deployment_tx: "verified_on_arbitrum"
verified: true
# =============================================================================
# CONTRACT INTEGRATION CONFIGURATION
# =============================================================================
contract_integration:
# Primary arbitrage contract for executing trades
primary_executor: "0xec2a16d5f8ac850d08c4c7f67efd50051e7cfc0b"
# Flash swap providers in order of preference
flash_swap_providers:
- protocol: "uniswap_v3"
contract: "0x5801ee5c2f6069e0f11cce7c0f27c2ef88e79a95"
priority: 1
gas_efficient: true
- protocol: "uniswap_v2"
contract: "0xc0b8c3e9a976ec67d182d7cb0283fb4496692593"
priority: 2
gas_efficient: false
# Data source for market analysis
data_source: "0x3c2c9c86f081b9dac1f0bf97981cfbe96436b89d"
# =============================================================================
# DEPLOYMENT VALIDATION
# =============================================================================
deployment_info:
network: "arbitrum-one"
chain_id: 42161
deployment_date: "2024-09-11"
deployer_account: "verified_deployer"
total_deployment_cost: "~$1.50 USD"
# Contract verification status
verification:
arbitrage_executor: true
uniswap_v3_flash_swapper: true
data_fetcher: true
uniswap_v2_flash_swapper: true
# Authorization setup completed
authorization_configured:
flash_swapper_to_executor: true
executor_permissions: true
emergency_controls: true
# =============================================================================
# OPERATIONAL PARAMETERS
# =============================================================================
operation_config:
# Minimum profit thresholds optimized for Arbitrum
min_profit_wei: "1000000000000000" # 0.001 ETH ($1.60 at $1600 ETH)
# Gas optimization for Arbitrum L2
max_gas_price_gwei: "0.1" # Much higher than typical 0.034 gwei
target_gas_limit: 300000
# Position sizing for production deployment
max_position_size_eth: "10" # 10 ETH maximum
# MEV competition parameters
priority_fee_multiplier: 1.5
max_slippage_basis_points: 30 # 0.3%
# =============================================================================
# INTEGRATION EXAMPLES
# =============================================================================
usage_examples:
# How to call the ArbitrageExecutor
execute_arbitrage:
contract: "0xec2a16d5f8ac850d08c4c7f67efd50051e7cfc0b"
function: "executeArbitrage"
parameters:
- pool_address: "0xC31E54c7a869B9FcBEcc14363CF510d1c41fa443" # WETH/USDC 0.05%
- swap_amount: "1000000000000000000" # 1 ETH
- min_profit: "1000000000000000" # 0.001 ETH minimum
# How to check arbitrage opportunities
check_opportunity:
contract: "0x3c2c9c86f081b9dac1f0bf97981cfbe96436b89d"
function: "getArbitrageOpportunity"
parameters:
- token_a: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" # WETH
- token_b: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831" # USDC
- amount: "1000000000000000000" # 1 ETH
# =============================================================================
# SECURITY CONFIGURATION
# =============================================================================
security:
# Emergency controls
emergency_pause_enabled: true
owner_only_functions: true
# Access control
authorized_callers:
- "0xec2a16d5f8ac850d08c4c7f67efd50051e7cfc0b" # ArbitrageExecutor
# Profit validation
profit_validation_enabled: true
slippage_protection_enabled: true
# Circuit breakers
max_consecutive_failures: 5
cooldown_period_seconds: 300
# =============================================================================
# MONITORING AND ALERTING
# =============================================================================
monitoring:
# Contract events to monitor
events_to_track:
- "ArbitrageExecuted"
- "FlashSwapInitiated"
- "FlashSwapCompleted"
- "ProfitRealized"
- "EmergencyPause"
# Alert thresholds
alerts:
large_profit_threshold: "0.1" # 0.1 ETH
loss_threshold: "0.01" # 0.01 ETH
gas_price_spike_threshold: "1.0" # 1.0 gwei (unusual for Arbitrum)
# Health check endpoints
health_checks:
contract_balance: true
authorization_status: true
pause_status: true

View File

@@ -1,279 +0,0 @@
# Initial Markets Configuration for MEV Bot
# This file defines the initial tokens, factories, and routers to build markets from
version: "1.0"
network: "arbitrum"
chain_id: 42161
# Core tokens for market building
tokens:
# Major tokens
WETH:
address: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
symbol: "WETH"
decimals: 18
priority: 100
USDC:
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
symbol: "USDC"
decimals: 6
priority: 95
USDT:
address: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
symbol: "USDT"
decimals: 6
priority: 90
ARB:
address: "0x912CE59144191C1204E64559FE8253a0e49E6548"
symbol: "ARB"
decimals: 18
priority: 85
GMX:
address: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a"
symbol: "GMX"
decimals: 18
priority: 80
LINK:
address: "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4"
symbol: "LINK"
decimals: 18
priority: 75
UNI:
address: "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0"
symbol: "UNI"
decimals: 18
priority: 70
WBTC:
address: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f"
symbol: "WBTC"
decimals: 8
priority: 95
# DEX Factories for market discovery
factories:
uniswap_v3:
address: "0x1F98431c8aD98523631AE4a59f267346ea31F984"
type: "uniswap_v3"
init_code_hash: "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54"
fee_tiers: [500, 3000, 10000]
priority: 100
uniswap_v2:
address: "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f"
type: "uniswap_v2"
init_code_hash: "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f"
fee_tiers: [3000]
priority: 90
sushiswap:
address: "0xc35DADB65012eC5796536bD9864eD8773aBc74C4"
type: "uniswap_v2"
init_code_hash: "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303"
fee_tiers: [3000]
priority: 85
camelot_v3:
address: "0x1a3c9B1d2F0529D97f2afC5136Cc23e58f1FD35B"
type: "algebra"
init_code_hash: "0xa856464ae65f7619087bc369daaf7e387dae1e5af69cfa7935850ebf754b04c1"
fee_tiers: [500, 3000, 10000]
priority: 80
balancer_v2:
address: "0x8E9aa87E45f6a460D4448f8154F1CA8C5C8a63b5"
type: "balancer_v2"
fee_tiers: [100, 500, 3000]
priority: 70
curve_stable:
address: "0xb17b674D9c5CB2e441F8e196a2f048A81355d031"
type: "curve"
fee_tiers: [400]
priority: 65
curve_crypto:
address: "0x9AF14D26075f142eb3F292D5065EB3faa646167b"
type: "curve"
fee_tiers: [400]
priority: 65
# DEX Routers for trading
routers:
uniswap_v3_router:
address: "0xE592427A0AEce92De3Edee1F18E0157C05861564"
factory: "uniswap_v3"
type: "uniswap_v3"
priority: 100
uniswap_v3_router02:
address: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45"
factory: "uniswap_v3"
type: "uniswap_v3"
priority: 100
uniswap_v2_router:
address: "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"
factory: "uniswap_v2"
type: "uniswap_v2"
priority: 90
sushiswap_router:
address: "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
factory: "sushiswap"
type: "uniswap_v2"
priority: 85
camelot_router:
address: "0x1F721E2E82F6676FCE4eA07A5958cF098D339e18"
factory: "camelot_v3"
type: "algebra"
priority: 80
balancer_vault:
address: "0xBA12222222228d8Ba445958a75a0704d566BF2C8"
factory: "balancer_v2"
type: "balancer_v2"
priority: 70
oneInch_v5:
address: "0x1111111254EEB25477B68fb85Ed929f73A960582"
type: "aggregator"
priority: 75
# Known pools to monitor immediately
priority_pools:
# WETH/USDC pools across exchanges
- pool: "0xC31E54c7a869B9FcBEcc14363CF510d1c41fa443"
factory: "uniswap_v3"
token0: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" # WETH
token1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" # USDC
fee: 500
priority: 100
- pool: "0x17c14D2c404D167802b16C450d3c99F88F2c4F4d"
factory: "uniswap_v3"
token0: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" # WETH
token1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" # USDC
fee: 3000
priority: 95
# ARB/WETH pools
- pool: "0xC6F780497A95e246EB9449f5e4770916DCd6396A"
factory: "uniswap_v3"
token0: "0x912CE59144191C1204E64559FE8253a0e49E6548" # ARB
token1: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" # WETH
fee: 3000
priority: 90
# GMX/WETH pools
- pool: "0x80A9ae39310abf666A87C743d6ebBD0E8C42158E"
factory: "uniswap_v3"
token0: "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a" # GMX
token1: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" # WETH
fee: 3000
priority: 85
# Market scan settings
market_scan:
# How often to scan for new pools (seconds)
scan_interval: 600
# Maximum pools to track simultaneously
max_pools: 500
# Minimum liquidity threshold (USD)
min_liquidity_usd: 10000
# Minimum volume threshold (24h USD)
min_volume_24h_usd: 50000
# Pool discovery settings
discovery:
# Maximum blocks to look back for pool creation events (reduced to avoid limits)
max_blocks_back: 1000
# Minimum age for pools (blocks)
min_pool_age: 100
# Check for new pools every N blocks
discovery_interval: 100
# Arbitrage settings
arbitrage:
# Minimum profit threshold (USD)
min_profit_usd: 50.0
# Maximum slippage tolerance
max_slippage: 0.005
# Maximum gas price willing to pay (gwei)
max_gas_price: 20.0
# Profit margins by strategy type
profit_margins:
arbitrage: 0.05 # 5%
sandwich: 0.02 # 2%
liquidation: 0.10 # 10%
# Logging configuration
logging:
# Log levels: debug, info, warn, error
level: "info"
# JSONL files for event logging
files:
swaps: "logs/swaps.jsonl"
liquidations: "logs/liquidations.jsonl"
liquidity: "logs/liquidity.jsonl"
market_scans: "logs/market_scans.jsonl"
arbitrage: "logs/arbitrage_opportunities.jsonl"
performance: "logs/performance.jsonl"
# Real-time monitoring
real_time:
enabled: true
websocket_port: 8080
metrics_port: 9090
# Risk management
risk:
# Maximum position size (ETH)
max_position_eth: 1.0
# Maximum daily loss (ETH)
max_daily_loss_eth: 0.1
# Maximum concurrent transactions
max_concurrent_txs: 5
# Circuit breaker thresholds
circuit_breaker:
consecutive_failures: 10
profit_loss_ratio: 0.3
high_gas_threshold: 50.0 # gwei
# Performance monitoring
monitoring:
# Track performance metrics
enabled: true
# Update interval (seconds)
update_interval: 60
# Metrics to track
metrics:
- total_profit
- total_gas_cost
- success_rate
- average_profit_per_trade
- blocks_processed
- swaps_detected
- arbitrage_opportunities
- liquidation_opportunities

View File

@@ -1,14 +0,0 @@
# MEV Bot Log Manager Configuration
RETENTION_DAYS=30
ARCHIVE_SIZE_LIMIT=10G
LOG_SIZE_LIMIT=1G
ERROR_THRESHOLD=100
ALERT_EMAIL=
SLACK_WEBHOOK=
MONITORING_INTERVAL=60
AUTO_ROTATE=true
AUTO_ANALYZE=true
AUTO_ALERT=true
COMPRESS_LEVEL=9
HEALTH_CHECK_ENABLED=true
PERFORMANCE_TRACKING=true

View File

@@ -1,83 +0,0 @@
# Simplified Provider Configuration - Free Public Endpoints Only
# Updated for swap detection testing
global_limits:
connection_timeout: 30s
idle_timeout: 300s
max_concurrent_connections: 20
read_timeout: 60s
write_timeout: 30s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 60s
slow_request_threshold: 5s
track_provider_performance: true
provider_pools:
execution:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 10
providers:
- Arbitrum Public HTTP
- Arbitrum Public HTTP 2
strategy: reliability_first
read_only:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 15
providers:
- Arbitrum Public HTTP
- Arbitrum Public HTTP 2
strategy: reliability_first
providers:
# Free public HTTP endpoint
- name: Arbitrum Public HTTP
type: standard
http_endpoint: https://arb1.arbitrum.io/rpc
ws_endpoint: ""
priority: 1
features:
- execution
- transaction_submission
- reading
rate_limit:
requests_per_second: 5
burst: 10
timeout: 30s
max_retries: 3
retry_delay: 2s
health_check:
enabled: true
interval: 60s
timeout: 30s
# Free public HTTP endpoint (alternative for real-time)
- name: Arbitrum Public HTTP 2
type: standard
http_endpoint: https://arb1.arbitrum.io/rpc
ws_endpoint: ""
priority: 2
features:
- reading
- execution
rate_limit:
requests_per_second: 5
burst: 10
timeout: 30s
max_retries: 3
retry_delay: 2s
health_check:
enabled: true
interval: 60s
timeout: 30s
rotation:
strategy: priority_based
fallover_enabled: true
health_check_required: true
retry_failed_after: 5m

View File

@@ -1,174 +0,0 @@
global_limits:
connection_timeout: 30s
idle_timeout: 300s
max_concurrent_connections: 50
read_timeout: 60s
write_timeout: 30s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 60s
slow_request_threshold: 5s
track_provider_performance: true
provider_pools:
execution:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 20
providers:
- Alchemy WSS
- Alchemy WSS 2
- Chainstack WSS 1
- Chainstack WSS 2
- Chainstack WSS 3
- Arbitrum Public HTTP
strategy: reliability_first
read_only:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 25
providers:
- Alchemy WSS
- Alchemy WSS 2
- Chainstack WSS 1
- Chainstack WSS 2
- Chainstack WSS 3
- Arbitrum Public HTTP
strategy: websocket_preferred
providers:
# Alchemy - Premium provider (Priority 1)
- features:
- reading
- real_time
- execution
- transaction_submission
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arb-mainnet.g.alchemy.com/v2/d6VAHgzkOI3NgLGem6uBMiADT1E9rROB
name: Alchemy WSS
priority: 1
rate_limit:
burst: 1000
max_retries: 3
requests_per_second: 330
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arb-mainnet.g.alchemy.com/v2/d6VAHgzkOI3NgLGem6uBMiADT1E9rROB
# Alchemy 2 - Secondary premium provider (Priority 2)
- features:
- reading
- real_time
- execution
- transaction_submission
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arb-mainnet.g.alchemy.com/v2/Qpf70Ii5GojW2pD14601r
name: Alchemy WSS 2
priority: 2
rate_limit:
burst: 1000
max_retries: 3
requests_per_second: 330
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arb-mainnet.g.alchemy.com/v2/Qpf70Ii5GojW2pD14601r
# Chainstack Endpoint 1 (Priority 3)
- features:
- reading
- real_time
- execution
- transaction_submission
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/5d4d7ef9a15d34c16a5d566c4d077d9d
name: Chainstack WSS 1
priority: 3
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/5d4d7ef9a15d34c16a5d566c4d077d9d
# Chainstack Endpoint 2 (Priority 4) - Original endpoint
- features:
- reading
- real_time
- execution
- transaction_submission
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
name: Chainstack WSS 2
priority: 4
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
# Chainstack Endpoint 3 (Priority 5)
- features:
- reading
- real_time
- execution
- transaction_submission
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/f69d14406bc00700da9b936504e1a870
name: Chainstack WSS 3
priority: 5
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/f69d14406bc00700da9b936504e1a870
# Arbitrum Public RPC - Free fallback (Priority 10)
- features:
- reading
- real_time
- execution
- transaction_submission
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arb1.arbitrum.io/rpc
name: Arbitrum Public HTTP
priority: 10
rate_limit:
burst: 20
max_retries: 3
requests_per_second: 10
retry_delay: 2s
timeout: 60s
type: standard
ws_endpoint: ""
rotation:
fallover_enabled: true
health_check_required: true
retry_failed_after: 5m
strategy: priority_based

View File

@@ -1,69 +0,0 @@
global_limits:
connection_timeout: 30s
idle_timeout: 300s
max_concurrent_connections: 50
read_timeout: 60s
write_timeout: 30s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 60s
slow_request_threshold: 5s
track_provider_performance: true
provider_pools:
execution:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 20
providers:
- Primary RPC
strategy: reliability_first
read_only:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 25
providers:
- Primary WSS
strategy: websocket_preferred
providers:
- features:
- reading
- real_time
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: ""
name: Primary WSS
priority: 1
rate_limit:
burst: 600
max_retries: 3
requests_per_second: 300
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
- features:
- execution
- transaction_submission
health_check:
enabled: true
interval: 60s
timeout: 30s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
name: Primary RPC
priority: 1
rate_limit:
burst: 400
max_retries: 3
requests_per_second: 200
retry_delay: 1s
timeout: 30s
type: standard
ws_endpoint: ""
rotation:
fallover_enabled: true
health_check_required: true
retry_failed_after: 5m
strategy: priority_based

View File

@@ -1,69 +0,0 @@
global_limits:
connection_timeout: 30s
idle_timeout: 300s
max_concurrent_connections: 50
read_timeout: 60s
write_timeout: 30s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 60s
slow_request_threshold: 5s
track_provider_performance: true
provider_pools:
execution:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 20
providers:
- Primary RPC
strategy: reliability_first
read_only:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 25
providers:
- Primary WSS
strategy: websocket_preferred
providers:
- features:
- reading
- real_time
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: ""
name: Primary WSS
priority: 1
rate_limit:
burst: 600
max_retries: 3
requests_per_second: 300
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: ${ARBITRUM_WS_ENDPOINT}
- features:
- execution
- transaction_submission
health_check:
enabled: true
interval: 60s
timeout: 30s
http_endpoint: ${ARBITRUM_RPC_ENDPOINT}
name: Primary RPC
priority: 1
rate_limit:
burst: 400
max_retries: 3
requests_per_second: 200
retry_delay: 1s
timeout: 30s
type: standard
ws_endpoint: ""
rotation:
fallover_enabled: true
health_check_required: true
retry_failed_after: 5m
strategy: priority_based

View File

@@ -1,215 +0,0 @@
# Enhanced Multi-Provider RPC Configuration for Arbitrum
# Uses multiple free/public endpoints with intelligent rotation and failover
# Last Updated: 2025-10-31 - Added 6 diverse RPC providers
global_limits:
connection_timeout: 45s
idle_timeout: 600s
max_concurrent_connections: 30
read_timeout: 90s
write_timeout: 45s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 30s
slow_request_threshold: 3s
track_provider_performance: true
provider_pools:
# Execution pool - for sending transactions
execution:
failover_enabled: true
health_check_interval: 20s
max_concurrent_connections: 15
providers:
- Arbitrum Public HTTP
- Chainlist RPC 1
- Chainlist RPC 2
- Alchemy Free Tier
strategy: round_robin # Distribute load evenly
# Read-only pool - for queries and DataFetcher
read_only:
failover_enabled: true
health_check_interval: 20s
max_concurrent_connections: 20
providers:
- Arbitrum Public WS
- Chainlist RPC 1
- Chainlist RPC 2
- Chainlist RPC 3
- LlamaNodes RPC
- Alchemy Free Tier
strategy: round_robin # Rotate through all providers
providers:
# Provider 1: Official Arbitrum Public HTTP
- name: Arbitrum Public HTTP
type: standard
http_endpoint: https://arb1.arbitrum.io/rpc
ws_endpoint: ""
priority: 10
features:
- execution
- transaction_submission
- reading
rate_limit:
requests_per_second: 10 # Increased from 5
burst: 25
timeout: 45s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 30s
timeout: 30s
# Provider 2: Official Arbitrum Public WebSocket
- name: Arbitrum Public WS
type: standard
http_endpoint: https://arb1.arbitrum.io/rpc
ws_endpoint: wss://arb1.arbitrum.io/ws
priority: 10
features:
- reading
- real_time
- subscriptions
rate_limit:
requests_per_second: 15 # WSS can handle more
burst: 40
timeout: 60s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 20s
timeout: 45s
# Provider 3: Chainlist RPC 1
- name: Chainlist RPC 1
type: standard
http_endpoint: https://arbitrum-one.publicnode.com
ws_endpoint: wss://arbitrum-one.publicnode.com
priority: 9
features:
- execution
- transaction_submission
- reading
- real_time
rate_limit:
requests_per_second: 12
burst: 30
timeout: 45s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 25s
timeout: 30s
# Provider 4: Chainlist RPC 2
- name: Chainlist RPC 2
type: standard
http_endpoint: https://rpc.ankr.com/arbitrum
ws_endpoint: wss://rpc.ankr.com/arbitrum/ws
priority: 8
features:
- execution
- reading
- real_time
rate_limit:
requests_per_second: 12
burst: 30
timeout: 45s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 25s
timeout: 30s
# Provider 5: Chainlist RPC 3
- name: Chainlist RPC 3
type: standard
http_endpoint: https://arbitrum.blockpi.network/v1/rpc/public
ws_endpoint: wss://arbitrum.blockpi.network/v1/ws/public
priority: 7
features:
- reading
- real_time
rate_limit:
requests_per_second: 10
burst: 25
timeout: 45s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 30s
timeout: 30s
# Provider 6: LlamaNodes
- name: LlamaNodes RPC
type: standard
http_endpoint: https://arbitrum.llamarpc.com
ws_endpoint: wss://arbitrum.llamarpc.com
priority: 6
features:
- reading
- real_time
rate_limit:
requests_per_second: 10
burst: 25
timeout: 45s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 30s
timeout: 30s
# Provider 7: Alchemy Free Tier (Optional - requires signup)
- name: Alchemy Free Tier
type: standard
http_endpoint: https://arb-mainnet.g.alchemy.com/v2/demo
ws_endpoint: wss://arb-mainnet.g.alchemy.com/v2/demo
priority: 5
features:
- execution
- reading
- real_time
rate_limit:
requests_per_second: 15
burst: 35
timeout: 45s
max_retries: 5
retry_delay: 1s
health_check:
enabled: true
interval: 20s
timeout: 30s
rotation:
strategy: round_robin # Changed from priority_based to round_robin
fallback_enabled: true # Fixed typo: fallover -> fallback
health_check_required: true
retry_failed_after: 2m # Reduced from 5m for faster recovery
auto_rotate_interval: 30s # Automatically rotate every 30s to distribute load
failover_on_rate_limit: true # Immediately switch on 429 errors
# Circuit breaker configuration for rate limit protection
circuit_breaker:
enabled: true
failure_threshold: 5 # Switch provider after 5 failures
success_threshold: 2 # Re-enable after 2 successes
timeout: 60s # How long to wait before trying again
half_open_requests: 3 # Requests to test in half-open state
# Retry configuration
retry:
max_attempts: 5 # Try up to 5 times across different providers
initial_delay: 500ms
max_delay: 5s
backoff_multiplier: 2.0 # Exponential backoff
jitter: true # Add randomness to prevent thundering herd

View File

@@ -1,431 +0,0 @@
# RPC Provider Configuration for MEV Bot
# Supports separate provider pools for read-only, execution, and testing operations
# Provider Pool Configuration
provider_pools:
# Read-Only Pool: Optimized for high-frequency data fetching and real-time events
read_only:
strategy: "websocket_preferred" # Prefer WebSocket for real-time data
max_concurrent_connections: 5
health_check_interval: "30s"
failover_enabled: true
providers: ["chainstack_arbitrum", "quicknode_arbitrum", "alchemy_arbitrum"]
# Execution Pool: Dedicated for transaction submission with higher security
execution:
strategy: "reliability_first" # Prefer most reliable providers
max_concurrent_connections: 2
health_check_interval: "15s"
failover_enabled: true
providers: ["chainstack_arbitrum", "quicknode_arbitrum"]
# Testing Pool: Anvil forked instances for safe dry-run testing
testing:
strategy: "anvil_preferred" # Use Anvil instances first
max_concurrent_connections: 3
health_check_interval: "60s"
failover_enabled: true
providers: ["anvil_local_fork", "anvil_staging_fork"]
# Individual Provider Definitions
providers:
# Chainstack (current primary)
- name: "chainstack_arbitrum"
type: "arbitrum"
http_endpoint: "https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57"
ws_endpoint: "wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57"
priority: 1
rate_limit:
requests_per_second: 50 # Free plan limit
burst: 100
timeout: "30s"
retry_delay: "1s"
max_retries: 3
features:
- "archive_data"
- "websocket"
- "trace_api"
health_check:
enabled: true
interval: "30s"
timeout: "10s"
# Alchemy (backup)
- name: "alchemy_arbitrum"
type: "arbitrum"
http_endpoint: "https://arb-mainnet.g.alchemy.com/v2/YOUR_API_KEY"
ws_endpoint: "wss://arb-mainnet.g.alchemy.com/v2/YOUR_API_KEY"
priority: 2
rate_limit:
requests_per_second: 100 # Free tier: 100 RPS
burst: 200
timeout: "30s"
retry_delay: "2s"
max_retries: 3
features:
- "archive_data"
- "websocket"
- "enhanced_apis"
health_check:
enabled: true
interval: "45s"
timeout: "15s"
# Infura (tertiary)
- name: "infura_arbitrum"
type: "arbitrum"
http_endpoint: "https://arbitrum-mainnet.infura.io/v3/YOUR_PROJECT_ID"
ws_endpoint: "wss://arbitrum-mainnet.infura.io/ws/v3/YOUR_PROJECT_ID"
priority: 3
rate_limit:
requests_per_second: 10 # Free tier: 100k requests/day (~1.15 RPS)
burst: 20
timeout: "30s"
retry_delay: "3s"
max_retries: 2
features:
- "archive_data"
- "websocket"
health_check:
enabled: true
interval: "60s"
timeout: "20s"
# QuickNode (backup)
- name: "quicknode_arbitrum"
type: "arbitrum"
http_endpoint: "https://YOUR_ENDPOINT.arbitrum-mainnet.quiknode.pro/YOUR_TOKEN/"
ws_endpoint: "wss://YOUR_ENDPOINT.arbitrum-mainnet.quiknode.pro/YOUR_TOKEN/"
priority: 4
rate_limit:
requests_per_second: 25 # Free tier: varies
burst: 50
timeout: "30s"
retry_delay: "2s"
max_retries: 3
features:
- "archive_data"
- "websocket"
- "debug_api"
health_check:
enabled: true
interval: "45s"
timeout: "15s"
# Ankr (public endpoint - lowest priority)
- name: "ankr_arbitrum"
type: "arbitrum"
http_endpoint: "https://rpc.ankr.com/arbitrum"
ws_endpoint: "" # No WS support on free tier
priority: 5
rate_limit:
requests_per_second: 5 # Public endpoint - very conservative
burst: 10
timeout: "45s"
retry_delay: "5s"
max_retries: 2
features:
- "basic_rpc"
health_check:
enabled: true
interval: "120s"
timeout: "30s"
# Anvil Local Fork (for testing)
- name: "anvil_local_fork"
type: "anvil_fork"
http_endpoint: "http://127.0.0.1:8545"
ws_endpoint: "ws://127.0.0.1:8545"
priority: 1
rate_limit:
requests_per_second: 1000 # Local instance - very high limits
burst: 2000
timeout: "5s"
retry_delay: "100ms"
max_retries: 2
features:
- "fork_testing"
- "state_snapshots"
- "debug_api"
- "trace_api"
health_check:
enabled: true
interval: "30s"
timeout: "5s"
anvil_config:
fork_url: "https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57"
chain_id: 31337
port: 8545
block_time: 1
auto_impersonate: true
state_interval: 1000 # Save state every 1000 blocks
# Anvil Staging Fork (for staging tests)
- name: "anvil_staging_fork"
type: "anvil_fork"
http_endpoint: "http://127.0.0.1:8546"
ws_endpoint: "ws://127.0.0.1:8546"
priority: 2
rate_limit:
requests_per_second: 1000
burst: 2000
timeout: "5s"
retry_delay: "100ms"
max_retries: 2
features:
- "fork_testing"
- "state_snapshots"
- "debug_api"
health_check:
enabled: true
interval: "45s"
timeout: "10s"
anvil_config:
fork_url: "https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57"
chain_id: 31338
port: 8546
block_time: 2
auto_impersonate: true
state_interval: 2000
# Provider rotation and failover settings
rotation:
strategy: "round_robin" # Options: round_robin, weighted, priority_based
health_check_required: true
fallback_enabled: true
retry_failed_after: "300s" # 5 minutes
# Global rate limiting settings
global_limits:
max_concurrent_connections: 10
connection_timeout: "30s"
read_timeout: "45s"
write_timeout: "30s"
idle_timeout: "120s"
# Monitoring and metrics
monitoring:
enabled: true
metrics_interval: "60s"
log_slow_requests: true
slow_request_threshold: "5s"
track_provider_performance: true
# Provider-specific rate limits by plan type
# This allows for easy upgrade when moving to paid plans
rate_limit_profiles:
free_tier:
requests_per_second: 10
burst: 20
daily_limit: 100000
basic_paid:
requests_per_second: 100
burst: 200
daily_limit: 10000000
premium:
requests_per_second: 500
burst: 1000
daily_limit: 100000000
enterprise:
requests_per_second: 2000
burst: 4000
daily_limit: 1000000000
# Provider Comparison Chart - Ranked by MEV Bot Profitability
# Factors: Rate limits, latency, reliability, cost, archive data, MEV-specific features
# Rating: 1-10 (10 = best for MEV operations)
provider_comparison:
# TIER 1: Premium MEV-Optimized Providers
chainstack:
overall_rating: 9.5
mev_suitability: 10 # Excellent for MEV
pros:
- "Highest free tier rate limits (50 RPS)"
- "Low latency infrastructure"
- "Archive data included"
- "WebSocket support"
- "No daily request limits on paid plans"
- "MEV-friendly ToS"
cons:
- "Higher cost for premium plans"
free_tier: { rps: 50, daily: 3000000, cost: "$0" }
paid_plans:
developer: { rps: 100, daily: 30000000, cost: "$49/month" }
startup: { rps: 200, daily: 300000000, cost: "$299/month" }
business: { rps: 500, daily: 1000000000, cost: "$999/month" }
best_for: "High-frequency MEV bots, professional trading"
quicknode:
overall_rating: 9.0
mev_suitability: 9
pros:
- "Excellent performance and reliability"
- "Advanced APIs (trace, debug)"
- "Global edge infrastructure"
- "MEV-specific features"
- "High free tier requests"
cons:
- "Premium pricing"
- "Complex pricing tiers"
free_tier: { rps: 25, daily: 50000000, cost: "$0" }
paid_plans:
discover: { rps: 100, daily: 500000000, cost: "$20/month" }
build: { rps: 200, daily: 2000000000, cost: "$99/month" }
scale: { rps: 500, daily: 10000000000, cost: "$399/month" }
best_for: "Production MEV bots, enterprise applications"
# TIER 2: Mainstream Providers
alchemy:
overall_rating: 8.5
mev_suitability: 8
pros:
- "Excellent documentation and tools"
- "Enhanced APIs and webhooks"
- "Good reliability"
- "Strong developer ecosystem"
- "Archive data access"
cons:
- "Lower free tier rate limits"
- "Can be expensive for high-volume"
free_tier: { rps: 5, daily: 100000, cost: "$0" }
paid_plans:
basic: { rps: 25, daily: 40000000, cost: "$49/month" }
growth: { rps: 100, daily: 150000000, cost: "$199/month" }
scale: { rps: 330, daily: 300000000, cost: "$499/month" }
best_for: "Development and testing, medium-scale operations"
infura:
overall_rating: 7.5
mev_suitability: 7
pros:
- "Reliable and stable"
- "Good free tier daily limits"
- "Wide network support"
- "Enterprise-grade infrastructure"
cons:
- "Lower rate limits"
- "Basic feature set"
- "Higher latency for some regions"
free_tier: { rps: 10, daily: 100000, cost: "$0" }
paid_plans:
developer: { rps: 100, daily: 100000000, cost: "$50/month" }
team: { rps: 200, daily: 400000000, cost: "$225/month" }
growth: { rps: 700, daily: 1500000000, cost: "$1000/month" }
best_for: "Backup provider, basic MEV operations"
# TIER 3: Budget/Backup Options
ankr:
overall_rating: 6.5
mev_suitability: 5
pros:
- "Public endpoints available"
- "No registration required for basic use"
- "Decent reliability"
- "Multi-chain support"
cons:
- "Very low rate limits"
- "No WebSocket on free tier"
- "Limited features"
- "Higher latency"
free_tier: { rps: 5, daily: "unlimited", cost: "$0" }
paid_plans:
premium: { rps: 1500, daily: "unlimited", cost: "$250/month" }
best_for: "Emergency backup, development testing"
llamarpc:
overall_rating: 6.0
mev_suitability: 4
pros:
- "Free public endpoint"
- "No registration required"
- "Open source friendly"
cons:
- "Very low rate limits"
- "Unreliable performance"
- "No SLA or support"
- "Not suitable for production"
free_tier: { rps: 3, daily: "unlimited", cost: "$0" }
best_for: "Development only, emergency fallback"
# MEV-Specific Performance Metrics (based on testing)
mev_performance_rankings:
latency_ranking: # Lower latency = better for MEV
1: "chainstack" # ~15ms average
2: "quicknode" # ~20ms average
3: "alchemy" # ~25ms average
4: "infura" # ~35ms average
5: "ankr" # ~50ms average
reliability_ranking: # Uptime and consistency
1: "quicknode" # 99.9% uptime
2: "chainstack" # 99.8% uptime
3: "alchemy" # 99.7% uptime
4: "infura" # 99.5% uptime
5: "ankr" # 98.5% uptime
cost_efficiency_ranking: # Best value for money
1: "chainstack" # Best free tier
2: "quicknode" # Good paid plans
3: "infura" # Reasonable pricing
4: "alchemy" # Premium pricing
5: "ankr" # Good for basic use
mev_features_ranking: # MEV-specific capabilities
1: "quicknode" # Trace API, debug tools
2: "chainstack" # Archive data, low latency
3: "alchemy" # Enhanced APIs, webhooks
4: "infura" # Basic features
5: "ankr" # Limited features
# Recommended Configuration by Use Case
recommended_configs:
development:
primary: "chainstack" # Good free tier
backup: "alchemy" # Good docs and tools
emergency: "ankr" # Public endpoint
production_low_volume:
primary: "chainstack" # Best free tier
backup: "quicknode" # Reliable paid backup
emergency: "infura" # Stable fallback
production_high_volume:
primary: "quicknode" # Best performance
backup: "chainstack" # Good secondary
emergency: "alchemy" # Enterprise backup
enterprise:
primary: "quicknode" # Premium features
backup: "chainstack" # High performance backup
tertiary: "alchemy" # Additional redundancy
# Known provider rate limits for reference
# Updated as of 2024 - check provider docs for current limits
provider_defaults:
alchemy:
free: { rps: 5, daily: 100000 }
basic: { rps: 25, daily: 40000000 }
growth: { rps: 100, daily: 150000000 }
scale: { rps: 330, daily: 300000000 }
infura:
free: { rps: 10, daily: 100000 }
developer: { rps: 100, daily: 100000000 }
team: { rps: 200, daily: 400000000 }
growth: { rps: 700, daily: 1500000000 }
quicknode:
free: { rps: 25, daily: 50000000 }
discover: { rps: 100, daily: 500000000 }
build: { rps: 200, daily: 2000000000 }
scale: { rps: 500, daily: 10000000000 }
chainstack:
free: { rps: 50, daily: 3000000 }
developer: { rps: 100, daily: 30000000 }
startup: { rps: 200, daily: 300000000 }
business: { rps: 500, daily: 1000000000 }

View File

@@ -1,228 +0,0 @@
global_limits:
connection_timeout: 30s
idle_timeout: 300s
max_concurrent_connections: 50
read_timeout: 60s
write_timeout: 30s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 60s
slow_request_threshold: 5s
track_provider_performance: true
provider_pools:
execution:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 20
providers:
- Alchemy WSS
- Alchemy WSS 2
- Chainstack WSS 1
- Chainstack WSS 2
- Chainstack WSS 3
- Arbitrum Public HTTP
- Chainstack HTTP
- Ankr HTTP
strategy: reliability_first
read_only:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 25
providers:
- Alchemy WSS
- Alchemy WSS 2
- Chainstack WSS 1
- Chainstack WSS 2
- Chainstack WSS 3
- Arbitrum Public HTTP
- Ankr HTTP
strategy: websocket_preferred
providers:
# HTTP Providers - Load distributed across multiple endpoints
- features:
- execution
- transaction_submission
- reading
health_check:
enabled: true
interval: 60s
timeout: 30s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
name: Chainstack HTTP
priority: 1
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 30s
type: standard
ws_endpoint: ""
- features:
- execution
- transaction_submission
- reading
health_check:
enabled: true
interval: 60s
timeout: 30s
http_endpoint: https://rpc.ankr.com/arbitrum
name: Ankr HTTP
priority: 3
rate_limit:
burst: 60
max_retries: 3
requests_per_second: 30
retry_delay: 1s
timeout: 30s
type: standard
ws_endpoint: ""
- features:
- execution
- transaction_submission
- reading
health_check:
enabled: true
interval: 60s
timeout: 30s
http_endpoint: https://arb1.arbitrum.io/rpc
name: Arbitrum Public HTTP
priority: 1
rate_limit:
burst: 20
max_retries: 3
requests_per_second: 10
retry_delay: 2s
timeout: 30s
type: standard
ws_endpoint: ""
# WebSocket Providers - Real-time data streams with HTTP fallback
# Alchemy - Premium provider (Priority 1)
- features:
- reading
- real_time
- execution
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arb-mainnet.g.alchemy.com/v2/d6VAHgzkOI3NgLGem6uBMiADT1E9rROB
name: Alchemy WSS
priority: 1
rate_limit:
burst: 1000
max_retries: 3
requests_per_second: 330
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arb-mainnet.g.alchemy.com/v2/d6VAHgzkOI3NgLGem6uBMiADT1E9rROB
# Alchemy 2 - Secondary premium provider (Priority 2)
- features:
- reading
- real_time
- execution
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arb-mainnet.g.alchemy.com/v2/Qpf70Ii5GojW2pD14601r
name: Alchemy WSS 2
priority: 2
rate_limit:
burst: 1000
max_retries: 3
requests_per_second: 330
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arb-mainnet.g.alchemy.com/v2/Qpf70Ii5GojW2pD14601r
# Chainstack Endpoint 1 (Priority 3)
- features:
- reading
- real_time
- execution
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/5d4d7ef9a15d34c16a5d566c4d077d9d
name: Chainstack WSS 1
priority: 3
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/5d4d7ef9a15d34c16a5d566c4d077d9d
# Chainstack Endpoint 2 (Priority 4) - Original endpoint
- features:
- reading
- real_time
- execution
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
name: Chainstack WSS 2
priority: 4
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/53c30e7a941160679fdcc396c894fc57
# Chainstack Endpoint 3 (Priority 5)
- features:
- reading
- real_time
- execution
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arbitrum-mainnet.core.chainstack.com/f69d14406bc00700da9b936504e1a870
name: Chainstack WSS 3
priority: 5
rate_limit:
burst: 100
max_retries: 3
requests_per_second: 100
retry_delay: 1s
timeout: 60s
type: standard
ws_endpoint: wss://arbitrum-mainnet.core.chainstack.com/f69d14406bc00700da9b936504e1a870
- features:
- reading
- real_time
health_check:
enabled: true
interval: 30s
timeout: 60s
http_endpoint: https://arb1.arbitrum.io/rpc
name: Arbitrum Public WS
priority: 10
rate_limit:
burst: 20
max_retries: 3
requests_per_second: 10
retry_delay: 2s
timeout: 60s
type: standard
ws_endpoint: wss://arb1.arbitrum.io/ws
rotation:
fallover_enabled: true
health_check_required: true
retry_failed_after: 5m
strategy: priority_based

View File

@@ -1,83 +0,0 @@
# Simplified Runtime Provider Configuration - Free Public Endpoints Only
# This config uses only free Arbitrum public endpoints for testing
global_limits:
connection_timeout: 30s
idle_timeout: 300s
max_concurrent_connections: 20
read_timeout: 60s
write_timeout: 30s
monitoring:
enabled: true
log_slow_requests: true
metrics_interval: 60s
slow_request_threshold: 5s
track_provider_performance: true
provider_pools:
execution:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 10
providers:
- Arbitrum Public HTTP
- Arbitrum Public WS
strategy: reliability_first
read_only:
failover_enabled: true
health_check_interval: 30s
max_concurrent_connections: 15
providers:
- Arbitrum Public WS
- Arbitrum Public HTTP
strategy: websocket_preferred
providers:
# Free public HTTP endpoint
- name: Arbitrum Public HTTP
type: standard
http_endpoint: https://arb1.arbitrum.io/rpc
ws_endpoint: ""
priority: 1
features:
- execution
- transaction_submission
- reading
rate_limit:
requests_per_second: 5
burst: 10
timeout: 30s
max_retries: 3
retry_delay: 2s
health_check:
enabled: true
interval: 60s
timeout: 30s
# Free public WebSocket endpoint
- name: Arbitrum Public WS
type: standard
http_endpoint: https://arb1.arbitrum.io/rpc
ws_endpoint: wss://arb1.arbitrum.io/ws
priority: 1
features:
- reading
- real_time
rate_limit:
requests_per_second: 5
burst: 10
timeout: 60s
max_retries: 3
retry_delay: 2s
health_check:
enabled: true
interval: 30s
timeout: 60s
rotation:
strategy: priority_based
fallover_enabled: true
health_check_required: true
retry_failed_after: 5m