Maximal Extractable Value (MEV) is a concept in blockchain technology that refers to the maximum profit a block producer—such as a miner or validator—can extract from transaction manipulation.
This involves strategically including, excluding, or reordering transactions within a block for monetary gain beyond the standard block reward and transaction fees.
Initially termed "miner extractable value," MEV has grown in relevance with the rise of decentralized finance (DeFi) platforms on Ethereum, where complex smart contracts offer numerous opportunities for such manipulation[1] [2] .
The concept of MEV became particularly prominent with the emergence of DeFi platforms on Ethereum, which allowed for complex financial transactions through smart contracts.
A landmark paper published in 2019, "Flash Boys 2.0," spotlighted how miners could reorder transactions for profit, raising awareness of this practice. Initially associated with proof-of-work (PoW) miners, the term has evolved to encompass blockchain validators following Ethereum's transition to proof-of-stake (PoS) post-2022 merge.
Innovations such as Flashbots—a platform allowing private MEV transactions outside the public mempool—aim to mitigate some adverse effects of MEV by reducing public competition and gas bidding wars[3].
Overall, MEV remains a double-edged sword, balancing the optimization of DeFi markets with potential risks, such as increased transaction costs and network congestion, which could undermine overall blockchain security and fairness[2].
MEV surfaces due to inherent quirks in blockchain transaction processing. Blockchain networks like Ethereum operate via decentralized nodes that validate and add transactions to blocks.
These nodes, also known as block producers, have significant discretion over which transactions to include and in what order, based on the fees offered.
MEV exploits this by allowing block producers to favor transactions that maximize their revenue, often through front-running or sandwich trading in DeFi markets.
While this can diminish user experience by increasing transaction costs and slippage, it also plays a role in financial system efficiency by ensuring price alignment across platforms[2].
The mechanism of MEV involves block producers taking advantage of their role in transaction ordering. When users submit transactions to a blockchain, they enter a mempool—a queue of pending transactions. Block producers can scan this mempool for profitable opportunities created by arbitrary transaction ordering.
This could mean processing high-fee transactions first to maximize immediate profit or strategically placing transactions around large trades to capitalize on price movements, commonly referred to as sandwich attacks[3].
Additionally, MEV searchers—independent operators—can use complex algorithms to identify profitable transaction ordering strategies. These searchers run bots to detect and execute transactions that capture value through methods such as arbitrage across decentralized exchanges or liquidation of collateralized loans before others can act.
Often, these searchers pay high gas fees, which profit validators for prioritizing their transactions[1].
MEV bots can detect large trades in decentralized exchange mempools and insert transactions before and after these trades to profit from price movements, causing users to suffer from increased slippage.
Decentralized exchange (DEX) arbitrage is the simplest and most well-known MEV opportunity. As a result, it is also the most competitive.
It works like this: if two DEXes are offering a token at two different prices, someone can buy the token on the lower-priced DEX and sell it on the higher-priced DEX in a single, atomic transaction. Thanks to the mechanics of the blockchain, this is true, riskless arbitrage. [2]
Bots find price differences for the same asset across various exchanges. By buying low and selling high in a single transaction, these bots help normalize prices but at the expense of original transaction intent.
Blockchain lending protocols rely on searchers to execute timely liquidations of overcollateralized loans. By submitting liquidation transactions ahead of others, bots can capture fees, ensuring lenders are reimbursed but increasing borrower fees[2].
Bots track public mempools, copying potentially profitable transactions and replacing addresses with their own, leading to potential profit if successful[1].
MEV in the NFT space is an emergent phenomenon, and isn't necessarily profitable. [2]
However, since NFT transactions happen on the same blockchain shared by all other Ethereum transactions, searchers can use similar techniques as those used in traditional MEV opportunities in the NFT market too.
For example, if there's a popular NFT drop and a searcher wants a certain NFT or set of NFTs, they can program a transaction such that they are the first in line to buy the NFT, or they can buy the entire set of NFTs in a single transaction. Or if an NFT is mistakenly listed at a low price, a searcher can frontrun other purchasers and snap it up for cheap. [2] [3]