🚀 A modular Rust pipeline for simulating MEV strategies via Ethereum mempool observation.
Built for educational, research, and prototyping use cases — showcasing high-performance mempool processing, strategy detection, and bundle orchestration.
- 📡 Listens to real-time Ethereum mempool (pending txs) via WebSocket
- 🧠 Detects MEV opportunities:
- Arbitrage across AMMs (Uniswap V2/V3)
- Sandwich attacks
- Liquidation opportunities
- 📦 Builds and simulates bundles for submission to MEV relays (Flashbots, bloXroute, Eden)
- 🧪 Simulation-first: run full strategy logic without executing on-chain
- 🖥️ Rich CLI with colorized logs, address formatting, and tx limits
- 🛠️ Extensible design for new strategies, relays, and config systems
cargo run --release -- [OPTIONS]| Flag / Option | Description | Default |
|---|---|---|
--verbose |
Enable verbose logging (DEBUG level) | false |
--simulate |
Enable simulation mode (no actual relay submission) | false |
--max-tx <N> |
Stop after processing N transactions |
Unlimited |
--rpc-url <URL> |
Ethereum RPC WebSocket endpoint (ETH_RPC_URL env fallback) |
.env or none |
--color <auto|always|never> |
Control ANSI color output in logs | auto |
--addr-style <short|full> |
Address display: • short: checksummed, middle elided• full: full checksummed |
short |
-h, --help |
Show help message | — |
cargo run -- --simulate --verbose --addr-style full --max-tx 25-
Create a
.envfile:ETH_RPC_URL=wss://eth-sepolia.g.alchemy.com/v2/your_api_key
-
Run the MEV pipeline:
cargo run --release -- --simulate
📡 Listening to pending transactions...
🔍 tx: from=0xabc…1234 → to=0xdef…5678, value=0.42 ETH, gas_price=10.2 gwei
📦 [Sim] MEV opportunity detected: arbitrage between UniswapV2 <-> UniswapV3
⏱️ Bundle created: UUID=123e4567-e89b-12d3-a456-426614174000
✅ Simulated submission to relays [Flashbots, bloXroute]
Planned for future versions:
- ✅ Integration test harness for strategy simulation
- 📊 Metrics system with Prometheus-compatible
MEVMetrics - ⚙️ Config loading from JSON /
.env - 🛠️ Live relay auth and real bundle submission
- 🧠 Strategy evaluation cost/profit/risk thresholds
MIT