MEV (maximal extractable value) is the extra profit someone can make by choosing which transactions go into a block and in what order, beyond normal block rewards and gas fees. It affects you mainly when you swap on a public decentralized exchange. A bot can see your pending trade, trade just before and after it, and leave you with the worst price your settings allow. Tight slippage limits and private routing reduce that risk.
Where MEV comes from
MEV exists because a blockchain's order of transactions is a choice, not a queue. On Ethereum, a pending transaction usually waits in the mempool, a public waiting room that anyone can read. Whoever builds the next block decides what goes in and where.
Order matters because many transactions change prices. If you make a large swap on an automated market maker, the price moves. Someone who sees your swap first knows which way it will move, and can profit if they get a transaction in ahead of yours.
This problem is specific to on-chain trading. A centralized exchange matches orders on its own private system, so there is no public mempool to watch, though you take on custody risk instead.
The term began as "miner extractable value" in the proof-of-work era. Since Ethereum moved from proof of work to proof of stake, validators rather than miners propose blocks, so "maximal" fits better. The site's MEV topic page collects related explainers.
Who does what in the MEV supply chain
MEV on Ethereum passes through several specialized roles, because proposer-builder separation splits assembling a block from proposing it. Most validators get there through MEV-Boost, open source software that lets them buy finished blocks from an outside market.
| Role | What it does | How it gets paid |
|---|---|---|
| Searcher | Runs bots that scan the mempool and chain state for profitable opportunities | Keeps what is left after paying builders |
| Builder | Orders transactions and bundles from searchers and users into a full block | Keeps the block's value minus its bid to the proposer |
| Relay | Checks builders' blocks and passes the proposer the best bid, without revealing contents until the proposer commits | Varies by operator |
| Proposer | The validator chosen for the slot. It signs the highest-paying block | Receives the winning bid |
As of October 2026, this market is concentrated. Relayscan's seven-day data shows Titan building more than half of MEV-Boost blocks, and the top four builders above 90%. Its block counts imply that roughly nine in ten Ethereum slots go through MEV-Boost.
Relays are a trust point. In April 2023, a malicious proposer exploited a relay flaw that let it see block contents without publishing a valid block, and took about $20 million from sandwich bots. The relay code was then patched.
Enshrined proposer-builder separation (EIP-7732) aims to remove the need for this trusted middleware by moving the auction into the protocol. It is part of the Glamsterdam upgrade. As of October 2026, Glamsterdam was on a testnet and had no mainnet date. It changes who you trust to run the auction. It does not, by itself, hide your swap from a public mempool.
Not all MEV hurts you
The three best-known forms of MEV have very different effects on ordinary users. A common misconception is that all MEV is theft.
| Type | How it works | Effect on you |
|---|---|---|
| Arbitrage | Buy a token where it is cheap and sell it where it is dear, usually in one transaction | Mostly useful. It keeps prices aligned across exchanges |
| Liquidation | Race to close an undercollateralized DeFi loan and collect the fee | Painful if it's your loan, but it keeps lenders solvent |
| Sandwich | Trade just before and just after a victim's swap | Directly harmful. You get a worse price |
Arbitrage can even follow your own trade. A backrun corrects the price your swap moved, and it doesn't change the price you get. Some services return part of that profit to you.
A worked sandwich attack, with numbers
A sandwich attack works because the price you accept is a range, and a bot can push you to the bottom of it. Your range is set by slippage tolerance, the most your price can worsen before the swap cancels itself.
Take a simplified pool holding 1,000 ETH and 3,000,000 USDC, with a 0.3% fee and the constant-product formula. The starting price is $3,000. You want to swap 100,000 USDC for ETH.
Your size alone moves the price, so your honest quote is 32.164 ETH, an average of about $3,109. You set slippage to 5%, so your transaction will accept as little as 30.556 ETH. That transaction sits in the public mempool, where a bot can read both numbers.
- The bot buys first. It spends 79,330 USDC and receives 25.687 ETH. The pool's price rises to about $3,160.
- Your swap runs. You receive 30.556 ETH, an average of $3,273. It just clears your minimum, so nothing cancels.
- The bot sells right after. It sells its 25.687 ETH for 83,995 USDC, because your purchase pushed the price higher still.
You received 1.608 ETH less than your quote, worth about $5,000. The bot grossed 4,665 USDC before gas and any payment to the builder. The small difference stays in the pool as extra trading fees.
Now change only your slippage setting:
| Your slippage setting | ETH you receive | ETH lost to the attack | Bot's gross profit |
|---|---|---|---|
| 0.5% | 32.004 | 0.161 | $468 |
| 1% | 31.843 | 0.322 | $935 |
| 5% | 30.556 | 1.608 | $4,665 |
| 10% | 28.948 | 3.216 | $9,303 |
The takeaway is that slippage tolerance works like a budget you hand to anyone watching the mempool. Real pools use concentrated liquidity and behave differently, but the relationship holds. Below some tolerance, the profit no longer covers gas and the attack isn't worth running.
What it looks like in the wild
On March 12, 2025, a trader swapped about $220,764 of USDC and received about $5,271 of USDT on a Uniswap v3 stablecoin pool. According to EigenPhi's analysis, the swap went through the public mempool with a price limit that accepted any price.
Two details are easy to miss. First, this was a swap between two dollar stablecoins, which many people assume is safe from price moves. Second, the searcher kept only about $8,688 and tipped the builder 100.56 ETH, so competition sent most of the profit up the chain. EigenPhi counted six such sandwiches in five minutes, with total losses of about $714,000.
How to protect your trades
No single setting removes MEV, but each defense blocks a different part of the attack and asks you to trust someone different.
| Defense | What it does | Limit or trust involved |
|---|---|---|
| Tight slippage | Shrinks what a sandwich can take | Too tight and the swap can fail, and a failed on-chain swap still costs gas |
| Private RPC | Sends your transaction to builders instead of the public mempool | You trust those builders not to front-run you |
| Intent-based swaps | You sign the outcome you want, and others compete to deliver it | You rely on the solver or filler network to find a good price |
| Trading on a layer 2 | Some rollups, such as Arbitrum, keep the mempool private | You trust the operator that orders transactions |
Private RPCs
An RPC endpoint is the server your wallet uses to send transactions. Flashbots Protect and MEV Blocker are RPC services you can add to a wallet, and they keep your transaction out of the public mempool. Both can also return some backrun value to you. Flashbots adds that reverting transactions aren't included, so failed swaps don't cost you gas.
Read the trust terms. Flashbots' docs say that when you send to a builder, you trust them not to front-run you. Its fast mode shares your transaction with all registered builders and with searchers running in secure hardware. Some wallets build this protection in: Uniswap says its wallet applies swap protection to all Ethereum mainnet transactions.
A private RPC doesn't fix a bad price. Your trade's price impact stays the same, and a thin pool is still a thin pool.
Intents
An intent is a signed statement of what you want, such as "at least 31.8 ETH for 100,000 USDC," rather than a specific route.
- CoW Protocol settles orders in batches at a uniform price, so order within the batch stops mattering. Solvers compete, and matching two traders directly avoids the pool altogether.
- UniswapX runs an auction where fillers compete to fill your signed order. You pay no gas, and failed fills cost you nothing.
Layer 2s
Rules differ by chain, so check before assuming you're safe. For example, Arbitrum's docs say its mempool stays private, while also describing ordering as rules the sequencer is trusted to follow.
A checklist before a large swap
- Check the quote's price impact. If it's high, split the trade or use a deeper pool.
- Set slippage as low as the swap will tolerate. Be suspicious of a default above about 1% for a liquid pair.
- Never accept "no limit" settings, including in custom scripts or little-known interfaces.
- Use a private RPC or an intent-based swap for anything you would hate to lose 1% on.
- Compare the amount you actually received with your quote afterward, so you learn what your setup costs you.
Key takeaways
- MEV is profit from ordering transactions. It exists because block producers choose the order and pending transactions are often public.
- Searchers find opportunities, builders assemble blocks, relays pass bids along, and proposers sign the winner. A few builders dominate.
- Arbitrage and liquidations serve a purpose. Sandwich attacks directly cost the trader.
- Your slippage tolerance sets the maximum a sandwich can take, so a loose setting is an open invitation.
- Private RPCs and intents reduce exposure, but each moves your trust to another party. Neither repairs a thin pool.
Sources
- Maximal extractable value (ethereum.org)
- Flashbots Protect documentation
- EIP-7732: Enshrined Proposer-Builder Separation
- Glamsterdam testnet announcement (Ethereum Foundation)
- Relayscan builder and relay statistics
- Post-mortem of the April 2023 MEV-Boost relay incident (Flashbots)
- Analysis of the March 2025 USDC/USDT sandwiches (EigenPhi)
Get the weekly commit
New blockchain deep dives every week.

