Skip to content
Finance Lessons
🥪

MEV & Transaction Ordering

On a blockchain, the person who decides the order of transactions can quietly rob the people in them. That power has a price, an auction, and a multi-billion-dollar supply chain. Take it apart.

Why the order of transactions inside a block is worth money — and who fights to control it. Maximal Extractable Value (MEV) from the mempool up: how ordering is auctioned, front-running and back-running, sandwich attacks on AMMs, arbitrage and liquidation MEV, and how Proposer-Builder Separation (PBS), MEV-Boost and private orderflow try to tame it.

Every transaction you send sits for a few seconds in plain sight, in a mempool anyone can read, and whoever builds the next block decides not just which pending transactions go in but in what order. On a chain where a swap’s outcome depends on what came right before it, that ordering power isn’t a clerical detail — it’s money, with a name: Maximal Extractable Value (MEV), the dark matter of DeFi that’s invisible in the UI but enormous in aggregate.

This course builds the whole machine from the mempool up:

This sits at the top of the crypto ladder, assuming you already know how Ethereum orders and prices transactions and how an AMM walks a curve. By the end, “I made a swap” stops being a single click and becomes a transparent, adversarial pipeline you can reason about, price, and defend against.

In this topic

  1. 1 What MEV Is Maximal Extractable Value is the profit a block producer can capture purely by choosing which transactions to include, exclude, and reorder — the hidden tax of public blockchains. 9 min
  2. 2 The Mempool & How Ordering Is Auctioned Pending transactions wait in a public mempool, and block builders order them to maximize revenue. How priority fees turned transaction ordering into a live, competitive auction — the priority gas auction. 9 min
  3. 3 Front-Running & Back-Running The two primitive ordering attacks: slipping a transaction in just before a victim to act on their pending move, or just after to capture the price change it causes. Displacement, insertion, and suppression attacks. 9 min
  4. 4 Sandwich Attacks The signature DeFi MEV attack: front-run a victim's swap to push the price against them, let them fill at the worse price, then back-run to bank the difference. The exact constant-product math of the victim's loss and the attacker's profit. 10 min
  5. 5 Arbitrage & Liquidation MEV The load-bearing side of MEV: DEX arbitrage that keeps prices aligned across pools and exchanges, and liquidation MEV that keeps lending protocols solvent. Why some extraction is a feature, not a bug — and where it shades back into harm. 9 min
  6. 6 PBS, MEV-Boost & Mitigations How Ethereum tries to tame MEV: Proposer-Builder Separation, MEV-Boost and relays, private orderflow, MEV-aware routers and protection RPCs, fair-ordering and encrypted mempools, and MEV redistribution (MEV-Share/SUAVE). 10 min
  7. 7 MEV & Transaction Ordering — Final Exam The graded final exam for MEV & Transaction Ordering: what MEV is, the mempool and ordering auctions, front-running and back-running, sandwich-attack math, arbitrage and liquidation MEV, and PBS / MEV-Boost / mitigations. 15 min

Mark course as finished

Done with every lesson? Lock it in — your progress is saved on this device.