MEV (Maximal Extractable Value) Explained
MEV is profit made by reordering, inserting or excluding transactions in a block. Learn how MEV works, who captures it, how it affects you and how to reduce it.
MEV, or maximal extractable value, is the profit that can be made by choosing which transactions go into a block and in what order — for example by inserting a trade just before and after someone else's swap. It exists because blocks are built by parties who can see pending transactions and decide how to arrange them, and some arrangements are worth more than others.
For everyday users, MEV mostly shows up as worse prices on DEX swaps. For the wider system, it shapes how blocks are built and who earns what. Understanding it helps you trade more safely and makes sense of terms like "sandwich attack" and "private RPC."
Where MEV Comes From
When you submit a transaction on a public blockchain such as Ethereum, it typically waits in a public mempool where anyone can see it. That visibility, combined with the ability to pay for a specific ordering, creates opportunities:
| MEV type | What happens | Effect on users |
|---|---|---|
| Arbitrage | Buying on one DEX and selling on another to close a price gap | Keeps prices aligned; mostly neutral |
| Liquidations | Racing to liquidate unhealthy loans for a bonus | Keeps lending protocols solvent; costly for the borrower |
| Sandwich attack | Buying before a user's swap and selling right after | User gets a worse price |
| Front-running | Copying or pre-empting a profitable transaction | Original sender loses the opportunity |
| Back-running | Trading right after a large transaction to capture price impact | Usually neutral to the original user |
Our guide to front-running and sandwich attacks shows exactly how a sandwich works with numbers.
How a Sandwich Attack Works
- 1You submit a swap to buy a token, allowing, say, 3% slippage.
- 2A bot sees your pending transaction and buys the same token first, pushing the price up.
- 3Your swap executes at the higher price, within your slippage limit.
- 4The bot sells immediately after you, pocketing the difference.
You still get your tokens, but fewer than you would have without the bot. The wider your slippage tolerance and the thinner the pool, the more the bot can take.
Who Captures MEV on Ethereum
After Ethereum's move to proof of stake, the supply chain for blocks became specialized:
- Searchers run bots that look for MEV opportunities and submit "bundles" of transactions.
- Builders combine bundles and ordinary transactions into the most valuable block they can.
- Relays pass blocks from builders to validators while hiding contents until the block is committed.
- Validators (proposers) choose the highest-paying block, commonly through software such as MEV-Boost.
This arrangement, known as proposer-builder separation, spreads MEV revenue across participants. MEV payments can make up a meaningful part of validator income, which is why it matters for network economics and for concerns about centralization among a small number of builders.
MEV infrastructure exists on other networks too. On Solana, for example, Jito runs a widely used validator client and block-engine system for MEV bundles.
How to Tell If You Were Sandwiched
You can check a past swap yourself on a block explorer:
- 1Open your swap transaction and note the block number and the pool or pair it traded in.
- 2Look at the transactions immediately before and after yours in the same block.
- 3If the same address bought the same token right before your swap and sold it right after, in the same pool, you were very likely sandwiched.
- 4Compare the price you received with the quote you saw before signing. A fill at or near the edge of your slippage tolerance is another sign.
Some explorers and analytics sites label known MEV bot addresses, which makes the pattern easier to spot. If it happens often, revisit your slippage settings and consider private routing.
Why MEV Matters Beyond Your Own Trades
- Centralization pressure. If a few builders produce most blocks, they gain influence over which transactions get included.
- Censorship risk. Builders and relays can choose to exclude certain transactions.
- Network congestion. Competition between bots can fill blocks and raise fees.
- Fairness. Ordinary users are at an information disadvantage compared with professional bots.
Researchers and developers continue to work on designs that reduce harmful MEV, including encrypted mempools, batch auctions and changes to block building.
How to Reduce MEV When You Trade
- 1Set sensible slippage. Use the lowest tolerance that lets your trade succeed. Our guide on how to avoid slippage on DEX trades covers this.
- 2Use private transaction routing. Some wallets and RPC services send your transaction directly to builders instead of the public mempool, so bots cannot see it in advance.
- 3Use aggregators or intent-based protocols with MEV protection. Some match orders off-chain or in batches; see intent-based trading in DeFi.
- 4Split large trades or trade in deeper pools to reduce price impact.
- 5Prefer limit orders where available, which avoid paying above a set price.
MEV-Related Scams
MEV attracts scammers as well as traders. A common scheme is the YouTube or social media video promising a "MEV bot" smart contract you can deploy for passive profits. In reality the contract sends your deposit to the scammer. See our warning on MEV bot scams.
Bottom line
MEV is a structural feature of blockchains where transaction ordering can be bought. Some of it helps markets function; some of it, like sandwich attacks, quietly takes value from regular traders. Protect yourself with tight slippage, private routing where available and deep liquidity — and treat any offer of an easy-money MEV bot as a scam.
Frequently asked questions
What does MEV stand for?
MEV stands for maximal extractable value. It was originally called miner extractable value, because miners controlled transaction ordering on proof-of-work Ethereum. After Ethereum moved to proof of stake, the term shifted to maximal extractable value, since validators and specialized block builders now capture it.
Is MEV always bad for users?
Not always. Some MEV, such as arbitrage that keeps DEX prices in line with other markets or liquidations that keep lending protocols solvent, plays a useful role. Other forms, especially sandwich attacks on ordinary users' swaps, directly take value from traders by giving them worse prices.
How do I protect myself from sandwich attacks?
Set a tight but realistic slippage tolerance, avoid very large trades in thin pools, and consider a wallet or RPC setting that sends transactions privately instead of to the public mempool. Some DEX aggregators and intent-based protocols also include MEV protection features.
Does MEV exist on blockchains other than Ethereum?
Yes. MEV can arise on any blockchain where someone controls transaction ordering and there is value from ordering trades in a particular way. It appears on EVM chains, layer 2 networks and Solana, among others, although the mechanics and tools differ by network.
