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>
172 lines
5.7 KiB
YAML
172 lines
5.7 KiB
YAML
# 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 |