🎰 Maximal Extractable Value MEV
The extra profit that whoever orders the transactions in a block can earn by choosing which ones go in, which get left out, and what order they sit in — on top of the normal block reward and gas fees.
🛒 The simple version — a cashier who can move the line
Imagine a checkout line. A cashier who controls the order could let their friend cut ahead of your big order, or slot themselves in right before or right after you to profit from what you're buying. On a blockchain, whoever assembles the next block — a validator, or a bot called a searcher working with them — has that same power over transactions. The money they squeeze out by choosing the order is Maximal Extractable Value.
⏳ How the order gets decided
Before a transaction is confirmed, it sits in a public mempool — a waiting room that anyone can watch. Searcher bots scan it for profitable openings, then pay high gas fees to get their own transaction placed in exactly the spot they want. Sometimes a searcher pays almost all of their MEV gain back out in gas just to win that position.
🏷️ Wait — why "Maximal" and not "Miner"?
MEV first meant Miner Extractable Value, back when proof-of-work miners ordered transactions on Ethereum. After Ethereum moved to proof-of-stake, validators order blocks instead of miners, so the term was widened to Maximal Extractable Value. Same acronym, broader meaning.
🎲 The main kinds of MEV
| Type | What happens | Harmful? |
|---|---|---|
| 🔁 DEX arbitrage | Buy a token cheap on one exchange and sell it dearer on another in one shot, closing the price gap | Usually neutral / helpful |
| ⚖️ Liquidations | Spot an undercollateralized loan and collect the fee for closing it | Neutral — keeps lending solvent |
| 🏃 Front-running | See a big pending buy, jump in first, sell into the price bump it causes | Often harmful |
| 🛬 Back-running | Place a transaction right after a big trade to ride its price impact | Mixed |
| 🥪 Sandwich attack | A buy before and a sell after your trade, wrapped around it to skim your slippage | Harmful — takes value from the trader |
📊 Numbers float around for how much sandwich activity happens daily, but treat any exact figure as illustrative — the point is it's common and mostly invisible.
🛡️ How beginners can protect themselves
- 🎚️ Set a tight slippage tolerance — a smaller allowed gap gives a sandwich attack less room to work
- 🔒 Use an MEV-protected connection — some wallets and RPCs send your trade privately instead of through the open mempool
- 🧮 Check the quote vs. what you got — a price slightly worse than expected on a swap can be MEV at work
- 🧠 Don't assume it's all theft — much of it is harmless plumbing; only predatory forms target you directly
🧰 What's being done about the harmful kind
Tools like Flashbots let searchers submit transactions privately to block builders instead of broadcasting them in the public mempool, which cuts down predatory front-running. Proposer-Builder Separation goes further: validators just propose blocks while specialized builders compete to order the transactions, spreading the power out so no single party hoards MEV.
❓ FAQ
- Is MEV always an attack or theft?
- No. A lot of MEV is neutral or even helpful. Arbitrage MEV keeps a token's price consistent across exchanges, and liquidations keep lending markets healthy. Only certain forms, like sandwich attacks and predatory front-running, take value directly from an ordinary trader.
- Where would a beginner actually run into MEV?
- Most often when swapping tokens on a DEX like Uniswap and getting a slightly worse price than the quote you saw. That gap can be MEV. Setting a tight slippage tolerance and using an MEV-protected connection both help reduce it.
- Why did the name change from Miner to Maximal Extractable Value?
- It started as Miner Extractable Value when Ethereum used proof-of-work and miners ordered transactions. After Ethereum switched to proof-of-stake, validators order blocks instead of miners, so the term was widened to Maximal Extractable Value. The acronym stayed the same.