MEV (extractable value)
Value captured by ordering transactions.
MEV (Maximal Extractable Value) is the profit validators/searchers can capture by choosing the order, inclusion or exclusion of transactions in a block - via arbitrage, liquidations or ‘sandwiching’ a user.
It is a hidden cost for users (worse slippage) and a central blockchain-design issue that solutions (mempool encryption, fair-ordering auctions) try to mitigate.
- Profit from transaction ordering
- Arbitrage, liquidations, sandwich
- Hidden cost to the user
A sandwich attack on your swap
You buy ETH with 40,000 USDC in a 1,000 ETH / 2M USDC pool. A bot sees your pending transaction, buys right before you and sells right after.
- 01ETH received without the bot19.608 ETH
- 02ETH received with the bot in front19.225 ETH
- 03ETH lost to the bot0.383 ETH
Your slippage tolerance is the bot’s budget. A pro sets it as tight as possible, splits large orders or uses a private RPC that hides the transaction.
Questions and answers
What is a sandwich attack?
A bot buys just before your swap and sells just after, profiting from the price impact you create.
How do I protect myself?
Limit the slippage allowed and use private transaction submission when the wallet offers it.
Test your understanding with a quick interactive quiz.