MEV
Whoever orders the transactions in a block can profit from the order they choose. It is not a bug; it is an unavoidable consequence of having to order anything at all.
Transactions wait in a public queue before inclusion. Whoever builds the next block chooses which to include and in what order, and that choice has monetary value. The value extractable this way is called MEV — maximal extractable value.
Why it is unavoidable
If order affects outcome — and in any market it does — then whoever sets the order holds something worth money. This is not specific to blockchains; conventional markets have paid enormous attention to order priority and latency for decades. What is specific here is that the queue is public before execution, which makes the opportunity available to anyone watching rather than only to those with privileged access.
The forms
- Arbitrage. Spotting a price difference between venues and capturing it. Benign and useful — it is what keeps pool prices aligned with the wider market.
- Liquidation. Racing to liquidate an unhealthy position for the discount. Also necessary, and see lending protocols.
- Front-running. Seeing a large pending buy and buying first, ahead of the price impact it will cause.
- Sandwiching. Buying immediately before a victim's trade and selling immediately after, capturing the price movement the victim caused. The victim receives a worse price and usually never knows why.
- Time-bandit attacks. Attempting to reorganise past blocks to recapture extractable value. Rare, and the most corrosive to settlement assurance.
Why the last two are different
Both are called MEV and they are not morally equivalent. Arbitrage would be performed by someone regardless and improves price accuracy. Sandwiching is a transfer from an identifiable person who received a worse execution than they would have alone. Treating the whole category as one phenomenon obscures the part that is genuinely a user-protection problem.
What is done about it
- Private transaction routing. Send transactions directly to block builders rather than the public queue, so there is nothing to observe. Widely available in wallets now.
- Proposer-builder separation. Specialised builders assemble blocks and bid for the right to have them proposed. This professionalises extraction and returns much of the value to validators rather than to whoever is fastest.
- Batch auctions. Execute all trades in an interval at one clearing price, so ordering within the interval carries no advantage.
- Slippage limits. Your own first defence — a tight tolerance caps how much a sandwich can take, at the cost of failed trades in fast markets.
The centralisation concern
Extraction is competitive and rewards scale, so block building has concentrated among a small number of sophisticated operators. That is a decentralisation problem arriving through economics rather than through protocol design, and it is one of the more serious unresolved issues on chains where it applies.
What this means for an ordinary user
Mostly: use sensible slippage settings, prefer wallets that route privately, and be aware that a very large trade against a thin pool is announcing itself to people paid to notice. The effect on a small trade is usually negligible; the effect on a large one at a wide tolerance can be substantial.