How abdullah-a-qazi/mev-project works
MEV Monitor is a historical Ethereum MEV research pipeline: sampled blocks are collected and normalized, V2 swaps are decoded and checked for verified pools, arbitrage and sandwiches are detected, then victim loss and bundle-level realised profit are measured for analysis. The graph also includes RPC budgeting and caching, which support data collection and later lookups. Several subsystem links follow the README’s documented workflow; unsampled implementation details are not inferred beyond the provided references.
Main entry points: rpc.py RPC client · load.py Swap loading · pipeline.py Block collection · sandwich.py Sandwich detection
Components 21
Collection
- Block sample
sample_blocks.csv - Block sampler
collector/sampling.py - Block collection
collector/pipeline.py - RPC client
collector/rpc.py - RPC response cache
collector/cache.py - Credit ledger
collector/credits.py
Shared infrastructure
- Configuration
common/config.py
Detection
- Pool verification
collector/pools.py - Swap loading
detectors/load.py - V2 swap decoding
detectors/swaps.py - Arbitrage detection
detectors/arbitrage.py - Sandwich detection
detectors/sandwich.py
Measurement
- Victim loss
mitigation/victim_loss.py - MEV bundle grouping
profit/bundles.py - Realised profit
profit/realised.py - ETH pricing
profit/pricing.py - V2 AMM maths
profit/uniswap_v2.py
Analysis
- Research analysis
analysis/summary.py - Summary statistics
analysis/stats.py
Other components
- Researcher
- Ethereum RPC providers
Connections 23
- Researcher → Block sampler: chooses sample
README.md - Block sampler → Block sample: writes blocks
README.md - Block sample → Block collection: feeds blocks
README.md - Block collection → RPC client: fetches blocks
collector/pipeline.py - RPC client → Ethereum RPC providers: sends requests
README.md - RPC client → RPC response cache: reads and writes
collector/rpc.py - RPC client → Credit ledger: checks credits
README.md - Configuration → RPC client: configures providers
common/config.py - Block collection → Swap loading: provides tables
README.md - Swap loading → Pool verification: verifies pools
detectors/load.py - Pool verification → RPC client: reads pool metadata
collector/pools.py - Swap loading → V2 swap decoding: decodes logs
detectors/load.py - V2 swap decoding → V2 AMM maths: reconstructs reserves
detectors/swaps.py - Swap loading → Arbitrage detection: supplies swaps
README.md - Swap loading → Sandwich detection: supplies swaps
README.md - Sandwich detection → Victim loss: identifies victims
mitigation/victim_loss.py - Arbitrage detection → MEV bundle grouping: contributes events
README.md - Sandwich detection → MEV bundle grouping: contributes events
README.md - MEV bundle grouping → Realised profit: groups transactions
README.md - Realised profit → ETH pricing: prices residuals
README.md - ETH pricing → V2 AMM maths: uses swap maths
profit/pricing.py - Realised profit → Research analysis: feeds results
README.md - Research analysis → Summary statistics: summarizes data
analysis/summary.py