What is MEV? Transaction ordering explained
Whoever orders the transactions in a block can profit from the order. Here's how, and how to avoid being the one who pays.
MEV, maximal extractable value, is the profit someone can make by choosing which transactions go into a block and in what order. Some MEV is harmless, like arbitrage that keeps prices in line across exchanges. Some comes straight out of users' pockets, like the "sandwich attack", where a bot buys just before your trade and sells just after it.
Why ordering is worth money
When you submit a transaction, it usually waits in a public queue (the mempool) where anyone can see it. The block producer decides the order, and on Ethereum specialized "searchers" and "builders" compete to create the most profitable order. Researchers first measured this in 2019 in a paper called "Flash Boys 2.0" and called it miner extractable value; after Ethereum moved to proof of stake the name became maximal extractable value.
The main kinds
- Arbitrage. Token X is cheaper on one exchange than another; a bot buys low and sells high in the same block. This keeps prices consistent and doesn't directly hurt the users whose trades created the gap.
- Liquidations. When a borrower's collateral falls too far on a lending app such as Aave, bots race to liquidate it for a reward. Necessary for the app to stay solvent, but the borrower pays a penalty.
- Front-running. Copying a profitable pending transaction and getting yours in first.
- Sandwich attacks. The one that hits ordinary traders.
A sandwich attack, step by step
Example. You submit a swap on a decentralized exchange to buy token X with a 3% slippage limit. A bot sees it pending, buys X first so the price rises about 2.9%, lets your trade go through at that worse price (still inside your limit), and then sells X back. You receive fewer tokens than you would have; the bot keeps the difference minus its fees. Your slippage limit is the most it can take, which is why a tight limit matters.
How Ethereum handles MEV today
Since the Merge, most Ethereum validators don't order transactions themselves. Through software called MEV-Boost, they sell the right to build their block to specialized builders, via middlemen called relays, and take the highest bid. This "proposer-builder separation" (PBS) spreads MEV income to all validators, so small stakers aren't out-earned by sophisticated ones, but it concentrates block building in a few firms. Ethereum developers plan to build PBS into the protocol itself (EIP-7732, "enshrined PBS"); as of November 2026 that upgrade had not yet activated.
How to protect yourself
- Set a sensible slippage limit. Higher limits invite bigger sandwiches. Many apps default to 0.5% for large, liquid tokens.
- Use a private transaction route. Some wallets and services send your transaction directly to builders instead of the public mempool, hiding it from sandwich bots.
- Use a DEX or aggregator with MEV protection. Some match orders in batch auctions or quote a fixed price, so there's nothing to sandwich.
- Split large trades on thin markets, or trade the pairs with the most liquidity.
- Simple transfers are safe. Sending ETH or a stablecoin to a friend can't be sandwiched; MEV mostly affects trades on decentralized exchanges.
Limitations of the fixes
- Private routes require trusting the service not to exploit your transaction itself.
- MEV exists on every chain where someone orders transactions, including rollups, whose single sequencer currently decides order, and Solana.
- Builder and relay concentration raises censorship concerns: a few firms could, in principle, exclude transactions.
Frequently asked questions
Is MEV illegal?
Most MEV, like arbitrage, is ordinary trading. Whether specific strategies break the law is unsettled and depends on the country; this isn't legal advice.
Does MEV affect Bitcoin?
Much less, because Bitcoin has no on-chain exchanges of the same kind. It mainly affects smart-contract chains with decentralized exchanges and lending.
How do I know if I was sandwiched?
Look up your swap in a block explorer and check the transactions immediately before and after it. If the same address bought the same token just before you and sold just after, that's a sandwich.
What does MEV stand for?
Maximal extractable value. It originally meant miner extractable value, from the 2019 research paper "Flash Boys 2.0".
Does a lower slippage setting always help?
It limits what a sandwich can take, but if it's too low your trade may fail when prices move normally, and failed transactions still cost gas.
Where to next
Sources
- Flash Boys 2.0 (Daian et al., 2019)
- Maximal extractable value (ethereum.org)
- Proposer-builder separation (ethereum.org)
- MEV-Boost (Flashbots docs)
- EIP-7732: Enshrined proposer-builder separation
Written for beginners and checked against the sources listed. Last reviewed November 4, 2026. This page is educational and is not financial, tax or legal advice. How we write and check pages.