# MEV Bot Project - Qwen Code Context This file contains context information for Qwen Code about the MEV Bot project. **Note:** For a comprehensive understanding of the project structure, development guidelines, and AI assistant configuration, please refer to [CLAUDE.md](CLAUDE.md), which contains the complete project documentation. For Qwen Code-specific configuration, commands, and development guidelines, please refer to the [.qwen/](.qwen/) directory which contains: - [.qwen/QWEN.md](.qwen/QWEN.md) - Complete Qwen Code configuration and context - [.qwen/commands/](.qwen/commands/) - Slash commands for Qwen Code - [.qwen/config/](.qwen/config/) - Configuration files for Qwen Code - [.qwen/prompts/](.qwen/prompts/) - Qwen Code specific prompts - [.qwen/scripts/](.qwen/scripts/) - Scripts for Qwen Code development workflow ## Project Overview This is an MEV (Maximal Extractable Value) bot written in Go 1.24+ that monitors the Arbitrum sequencer for potential swap opportunities. When a potential swap is detected, the bot scans the market to determine if the swap is large enough to move the price using off-chain methods. ## Project Structure - `cmd/` - Main applications - `cmd/mev-bot/main.go` - Entry point for the MEV bot application - `internal/` - Private application and library code - `internal/config` - Configuration management using YAML files with environment variable overrides - `internal/logger` - Logging functionality - `internal/ratelimit` - Rate limiting implementations for RPC calls - `internal/utils` - Utility functions - `pkg/` - Library code that can be used by external projects - `pkg/events` - Event parsing and processing for DEX interactions - `pkg/market` - Market data handling, pool management, and pipeline processing - `pkg/monitor` - Arbitrum sequencer monitoring with concurrency support - `pkg/scanner` - Market scanning functionality with concurrent worker pools - `pkg/test` - Test utilities and helpers - `pkg/uniswap` - Uniswap V3 specific pricing functions and calculations - `config/` - Configuration files (YAML format with development and production variants) - `@prompts/` - AI prompts for development assistance - `docs/` - Documentation - `scripts/` - Scripts for building, testing, and deployment - `.qwen/` - Qwen Code specific configuration and tools ## Qwen Code's Primary Focus Areas As Qwen Code, you're particularly skilled at: 1. **Mathematical Computations** - Implementing precise Uniswap V3 pricing functions - Ensuring numerical stability and precision - Working with liquidity and fee calculations 2. **Algorithmic Implementation** - Creating efficient algorithms for arbitrage detection - Implementing accurate tick and sqrtPriceX96 conversions - Calculating price impact with proper precision handling When working on this project, please focus on these areas where your strengths will be most beneficial. For complete development guidelines, system architecture details, and comprehensive configuration information, please refer to [CLAUDE.md](CLAUDE.md).