TL;DR: MEV (Maximal Extractable Value) is the profit that block producers and searchers can extract by reordering, inserting, or censoring transactions in a block. It's like someone cutting in line at the exchange -- and it costs DeFi users billions per year in worse prices.
What is MEV?
When you submit a transaction to a blockchain, it doesn't execute immediately. Instead, it goes to a waiting area called the mempool (short for memory pool) -- a queue of pending transactions waiting to be included in the next block.
Mempool
The mempool is a temporary holding area where unconfirmed transactions wait before a block producer includes them in a block. On most blockchains, the mempool is publicly visible, meaning anyone can see what transactions are pending -- including the exact tokens being swapped and the amounts involved.
Block producers -- validators on Ethereum, for example -- choose which transactions to include in a block and in what order. This power to reorder transactions creates profit opportunities. If a validator (or a specialized bot called a "searcher") can see your pending trade and rearrange transactions to extract value from it, that's MEV.
The term originally stood for "Miner Extractable Value" when Ethereum used proof-of-work. After Ethereum's transition to proof-of-stake, it was rebranded to "Maximal Extractable Value" because validators, not miners, now control block production. The concept remains the same: whoever decides transaction ordering has the power to profit from it.
MEV is not a fee you see listed anywhere. It does not appear in your wallet's transaction summary. It shows up as a worse price on your swap -- you receive fewer tokens than you should have, and the difference goes to someone else.
Types of MEV
MEV takes several forms, ranging from arguably beneficial (arbitrage that keeps prices aligned across markets) to clearly harmful (sandwich attacks that steal value from individual users).
Front-running
A bot sees your large buy order sitting in the mempool and submits its own buy order with a higher gas fee, ensuring it executes before yours. This pushes the price up before your trade goes through. You get a worse price; the bot profits by selling after your order executes. Front-running exploits the transparency of the mempool -- your pending transaction is visible to everyone, including those who want to trade against you.
Sandwich attack
The most common and most harmful form of MEV. A bot places a buy order just before your trade AND a sell order just after it. Your trade is "sandwiched" between the bot's two transactions. The bot's initial buy pushes the price up, you buy at the inflated price, and the bot's subsequent sell captures the difference. Sandwich attacks cost DeFi users an estimated $1 billion or more per year across all networks.
Back-running
A bot places a transaction immediately after yours to capture an arbitrage opportunity that your trade created. For example, if your large swap on Uniswap moves the price of ETH/USDC, a back-runner might immediately arbitrage the price difference between Uniswap and another DEX like SushiSwap. Back-running is generally considered less harmful than front-running or sandwich attacks because it does not directly worsen your execution price -- the bot profits from the price discrepancy your trade left behind, not from manipulating your trade itself.
Liquidation MEV
In lending protocols like Aave and Compound, positions that fall below their required collateral ratio can be liquidated. When a liquidation becomes available, bots compete aggressively to be the first to execute it and earn the liquidation bonus (typically 5-10% of the liquidated collateral). This competition can drive up gas prices during volatile market periods, as multiple bots bid against each other for the same liquidation opportunity.
Just-In-Time (JIT) liquidity
A sophisticated form of MEV where a bot detects a large pending swap, adds a highly concentrated liquidity position to the relevant pool just before the swap executes, earns the trading fees from that swap, and then immediately removes the liquidity. The bot captures nearly all the fees from the large trade without taking on the typical risks that long-term liquidity providers face. This is a gray area -- it improves execution for the trader (more liquidity means less price impact) but diverts fee revenue away from committed liquidity providers.
Cross-domain MEV
As DeFi expands across multiple chains and Layer 2 networks, MEV increasingly spans across domains. A searcher might exploit price differences between Ethereum mainnet and Arbitrum, or between two different L2s. Cross-domain MEV is harder to detect and harder to mitigate because it involves coordinating across separate consensus systems with different block times and finality guarantees.
How much MEV is extracted?
The scale of MEV extraction is enormous. On Ethereum alone, cumulative MEV has exceeded $600 million or more in extracted value as tracked by Flashbots. But this figure dramatically understates the real total for several reasons:
- Flashbots only tracks MEV on Ethereum mainnet -- it does not capture MEV on Solana, BNB Chain, or other Layer 1 networks.
- MEV on Layer 2 networks (Arbitrum, Base, Optimism) is largely untracked.
- Many forms of MEV are difficult to identify on-chain, especially cross-domain MEV.
- The data only includes MEV that was successfully extracted -- failed MEV attempts (which still cost users gas) are not counted.
The true cost of MEV across all networks since DeFi began is likely in the billions of dollars. And as DeFi grows, so does the MEV opportunity.
MEV on different chains
Ethereum
Ethereum has the most mature MEV ecosystem. The introduction of MEV-Boost by Flashbots created a structured marketplace where validators outsource block construction to specialized builders. Roughly 90% of Ethereum blocks are now built through MEV-Boost, meaning block building and block proposing are largely separated. This system -- called proposer-builder separation (PBS) -- does not eliminate MEV but makes it more transparent and distributes MEV revenue more broadly among validators.
Flashbots
A research and development organization building infrastructure to mitigate the negative effects of MEV on Ethereum. Their key products include MEV-Boost (a protocol that separates block building from block proposing) and Flashbots Protect (a private RPC endpoint that shields users' transactions from the public mempool to prevent sandwich attacks).
PBS (Proposer-Builder Separation)
A design pattern where the role of constructing a block (choosing which transactions to include and in what order) is separated from the role of proposing the block to the network. Builders compete to create the most valuable block, and proposers (validators) simply choose the highest-paying block. This makes MEV extraction more transparent and competitive, though it does not eliminate MEV itself.
Solana
MEV on Solana is rampant, and in many ways more aggressive than on Ethereum. Solana's fast block times (~400ms) and low transaction costs make MEV extraction cheap and rapid. The Jito protocol introduced MEV tips -- a system where searchers pay validators directly for transaction ordering priority. Sandwich attacks are a major and persistent problem on Solana, partly because the network's architecture makes it harder to implement the kind of private transaction infrastructure that exists on Ethereum.
L2s (Arbitrum, Base, Optimism)
On Layer 2 networks, the sequencer -- a single entity that orders transactions before they are submitted to Ethereum -- holds significant MEV power. Unlike Ethereum mainnet where validators are decentralized and use MEV-Boost, L2 sequencers are currently centralized (typically run by the L2 team itself). This means MEV on L2s is less transparent than on L1. While major L2 teams have stated they do not actively extract MEV, the centralized sequencer creates a trust assumption that does not exist on Ethereum mainnet.
How to protect yourself
You cannot completely eliminate MEV, but you can significantly reduce your exposure. Here are the most effective strategies:
Use MEV-protected DEX aggregators
Aggregators like 1inch Fusion, CoW Swap, and Matcha route your trades through private channels or use intent-based systems that prevent bots from seeing your transaction in the public mempool. This is the single most effective defense against sandwich attacks.
Set lower slippage tolerance
A tighter slippage setting (e.g., 0.5% instead of 3%) limits how much a sandwich bot can extract from your trade. The trade-off is that your transaction may fail if the market moves too much -- but a failed transaction with a small gas fee is usually better than a successful one that loses 2% to a bot.
Use private mempools and RPC endpoints
Services like Flashbots Protect and MEV Blocker let you submit transactions through a private channel instead of the public mempool. Your transaction goes directly to block builders who commit to not sandwich you. This is free to use and supported by most Ethereum wallets.
On Solana: use Jito tips strategically
On Solana, adding a Jito tip or priority fee can help your transaction land in a favorable position within the block. While this does not prevent MEV entirely, it gives you more control over your transaction ordering.
Break large trades into smaller ones
Sandwich bots target large trades because the potential profit is higher. Splitting a $50,000 swap into five $10,000 swaps reduces the MEV opportunity on each individual trade. The trade-off is higher total gas costs from multiple transactions.
Use limit orders instead of market swaps
Limit orders let you specify the exact price at which you want to trade. They are not susceptible to sandwich attacks because they execute only at your specified price -- there is no slippage for a bot to exploit. Many DEX aggregators and protocols now support on-chain limit orders.
Is MEV theft?
This is one of the most debated questions in DeFi, and the answer depends on who you ask and which type of MEV you are discussing.
The case that MEV is a natural market mechanism: Arbitrage MEV -- where bots keep prices aligned across different exchanges -- genuinely improves market efficiency. Without arbitrageurs, the price of ETH on Uniswap could drift significantly from the price on SushiSwap, harming everyone. Back-running and JIT liquidity can also be seen as beneficial: they improve execution quality for traders and keep markets functioning smoothly.
The case that MEV is value extraction: Sandwich attacks have no redeeming quality for the user being sandwiched. A bot is making your trade worse to profit from the difference. You are paying more (or receiving less) than you would have without the bot's interference. The user gets a worse outcome, and the bot captures 100% of the benefit. For many people, this is indistinguishable from theft -- even if it is technically legal and enabled by the blockchain's design.
The industry is broadly moving toward solutions that either minimize harmful MEV (especially sandwich attacks) or redistribute MEV value back to the users or protocols that generated it. The consensus is forming that some MEV is healthy for markets, but extraction that purely harms users -- with no offsetting benefit -- should be mitigated.
Solutions being built
The MEV problem has spawned an entire sub-industry of researchers, protocols, and infrastructure builders working on solutions. Here are the major approaches:
Flashbots and MEV-Boost
Already live on Ethereum, MEV-Boost separates block building from block proposing. Specialized builders compete to construct the most valuable block, and validators choose the highest-paying option. This does not eliminate MEV but makes it more transparent, distributes it more fairly among validators, and creates a framework for further improvements.
Encrypted mempools
One of the most promising long-term solutions. If users' transactions are encrypted before being submitted and only decrypted after they are committed to a block, sandwich bots cannot see what you are trading. Several projects are researching encrypted mempools using threshold encryption, trusted execution environments (TEEs), or other cryptographic techniques. This approach would eliminate front-running and sandwich attacks at the protocol level.
Fair ordering protocols
These protocols enforce rules about transaction ordering to prevent manipulation. For example, a fair ordering system might require transactions to be included in the order they were received, preventing validators or builders from reordering them for profit. Chainlink's Fair Sequencing Services (FSS) is one notable effort in this direction.
Intent-based trading
Instead of submitting a specific transaction ("swap 1 ETH for USDC on Uniswap"), users submit an intent ("I want to sell 1 ETH for the best available price"). Specialized solvers then compete to fill the intent at the best possible price. Because the user never submits a public mempool transaction, there is nothing for a sandwich bot to attack. Protocols like CoW Protocol and UniswapX use this approach.
Application-specific solutions
Some protocols are building MEV protection directly into their applications. Uniswap v4's hooks system, for example, allows developers to create custom logic that executes before or after swaps, potentially implementing MEV-mitigation strategies at the pool level. Other protocols are exploring auction mechanisms where MEV is captured and redistributed to liquidity providers or traders.
Key takeaways
- MEV (Maximal Extractable Value) is the profit extracted by reordering, inserting, or censoring blockchain transactions. It is a hidden cost that does not appear in your wallet's fee breakdown.
- Sandwich attacks are the most harmful form of MEV, costing DeFi users over $1 billion per year by manipulating the price of your trades.
- Front-running, back-running, liquidation MEV, JIT liquidity, and cross-domain MEV are other forms of value extraction, ranging from harmful to arguably beneficial.
- On Ethereum, Flashbots MEV-Boost and PBS have brought structure to MEV. On Solana and L2s, the MEV landscape is less mature and often less transparent.
- Protect yourself by using MEV-protected aggregators, private RPC endpoints, tight slippage settings, smaller trade sizes, and limit orders.
- Long-term solutions include encrypted mempools, fair ordering protocols, and intent-based trading systems -- but none have fully solved the problem yet.
For deeper dives into related topics, see our guides on DeFi explained, Uniswap, Ethereum, crypto fees explained, gas fees, and understanding risk in DeFi.
See your full DeFi picture -- every position, every chain, every hidden cost.