Advanced MEV: Navigating the Dark Forest

Welcome to Advanced MEV. This course progresses from theory to practice across five sessions: fundamentals, extraction mechanics, infrastructure, opportunity discovery and risk management, and finally an end-to-end arbitrage bot implementation. It is designed for advanced builders with Solidity, JavaScript, Ethereum transaction mechanics, and DeFi knowledge.

Module 0: Introduction

Course overview and expectations. What MEV is, who this course is for, how the modules fit together, and how to get the most out of the material.

Module 1: MEV Fundamentals

What MEV is and why it exists as an emergent property of public blockchains. Ecosystem actors and incentives.

Key Concepts include:

  • Searchers, builders, relays, validators
  • Public mempool dynamics
  • Positive vs negative externalities

Slides here.

Module 2: Extraction Mechanics

Arbitrage foundations and more controversial strategies: sandwiches and frontrunning; impacts, defenses, and responsibility.

Key Concepts include:

  • Arbitrage math and routing
  • Atomic execution with flash loans
  • Ethical considerations and mitigations

Slides here.

MEVS2 Code1: Arbitrage Calculator

Module 3: Infrastructure & Relay Ecosystem

How Flashbots, MEV-Boost, builders, and private orderflow work. Why private submission changes the risk profile.

Key Concepts include:

  • Block building and relay architecture
  • Privacy vs censorship tradeoffs
  • Integrations for private tx submission

Slides here.

MEVS2 Code1: Flashbots

Module 4: Opportunity Discovery & Risk

Mempool monitoring and filtering at scale; profitability calculations; failure modes and legal considerations.

Key Concepts include:

  • High-throughput mempool monitoring
  • Profitability with gas, fees, and competition
  • Technical, financial, and legal risk

Slides here.

Module 5: End-to-End Arbitrage Bot

Bringing it all together: on-chain contracts, off-chain monitoring, private submission, and safe deployment practices.

Key Concepts include:

  • Atomic execution and failure handling
  • Monitoring pipelines and queues
  • Operational guardrails and observability

Slides here.

MEVS5 Code1: Flashloan Arbitrage

MEVS5 Code2: Mempool Monitor