Summary
Maximal Extractable Value (MEV), previously known as Miner Extractable Value, refers to strategies of adding, deleting, or reordering transactions when creating new blocks. MEV aims to maximize additional profits. Since block producers have the ability to select and order transactions, they are best positioned to employ this strategy.
However, other network participants (also called searchers) can also order transactions by paying fees if they discover MEV opportunities (such as arbitrage, front-running, or liquidation transactions). MEV is commonly found in networks supporting smart contracts, where blockchain transactions contain more complex information.
Introduction
MEV is a cryptocurrency term describing the intentional addition, deletion, or reordering of transactions when generating a new block (to be added to a blockchain) to maximize profits. You can think of it as the extra value squeezed out of a block beyond standard rewards and gas fees by choosing which transactions to include and in what order.
MEV is often associated with the Ethereum network due to its highly significant decentralized finance (DeFi) ecosystem. The more complex the transactions in a block (e.g., smart contracts related to lending or trading), the more opportunities block producers have to earn additional profits (extracting maximal value) by deciding to add, delete, or reorder certain transactions.
What is MEV?
When first introduced, the concept of MEV was primarily associated with the Ethereum network, which at the time used a Proof-of-Work (PoW) consensus mechanism. Thus, miners had the authority to reorder or add/delete transactions when producing blocks and could extract additional value through these choices.
The term "Miner Extractable Value" emerged to explain this phenomenon of extracting as much additional profit as possible. However, in September 2022, Ethereum completed the Merge, a technical upgrade that transitioned the network's consensus mechanism from PoW to Proof-of-Stake (PoS).
As a result, new blocks on the Ethereum network are no longer created by miners but by validators. Nevertheless, PoS systems are not immune to MEV. Since blocks are still being created, whoever selects which transactions to include and in what order will make decisions to extract as much profit as possible from the block. While the old MEV concept persists, it now represents Maximal Extractable Value since it is no longer exclusive to miners.
How Does MEV Work?
To understand how MEV works, you need a basic understanding of the role of block producers (whether miners or validators). Block producers play a crucial role in securing and maintaining blockchain networks, as they validate transactions and add them to the network in the form of blocks. Depending on the blockchain, this process is called mining or validating.
In short, block producers ensure the integrity of transactions on the network and keep it running. Without block producers, new data cannot be added to the blockchain. Block producers collect user transaction data and organize it into blocks to add to the chain.
It's important to note that which transactions are added to a block depends on the block producer. Logically, block producers select transactions based on profitability, meaning those with higher transaction fees are prioritized. This is why users pay higher gas fees (or transaction fees) during busy periods to ensure their transactions are prioritized. If block producers choose transactions with the highest fees, they earn more profit. Thus, transactions with lower fees must wait longer to be added to a block.
However, there are no rules requiring transactions to be selected or ordered solely based on fees. When transactions contain more complex information (as in smart contract-enabled blockchains), block producers can add, delete, or reorder transactions to earn extra profits beyond standard block rewards and transaction fees.
For example, block producers may select certain transactions over others and order them in specific ways to gain additional profits from resulting arbitrage opportunities or on-chain liquidations. The essence of MEV is the process of selecting and ordering transactions for greater economic benefit.
MEV Searchers
While MEV may seem like a strategy that only benefits block producers, in reality, a significant portion of MEV is captured by other participants called "searchers." These participants use MEV-specific operations to analyze network data and identify MEV profit opportunities.
Searchers typically pay extremely high gas fees to block producers to ensure their MEV profit transactions and strategies are executed. Rationally, depending on the competition for MEV opportunities, block producers can receive up to 99.99% of a searcher's potential profit in gas fees.
Common Examples of MEV
Arbitrage, front-running, and liquidation transactions all provide opportunities for searchers and block producers to profit from MEV. Below, we examine these examples in detail to illustrate the concept and workings of MEV.
Arbitrage
Arbitrage opportunities arise instantly when an asset's price differs across trading platforms. In cryptocurrency, the same token may be priced differently on two decentralized exchanges (DEXs). When someone (an arbitrageur) notices this, they act to trade and profit from the price discrepancy. MEV occurs when a searcher's bot identifies pending transactions and inserts its own transaction ahead to extract the value offered by the arbitrage opportunity.
Front-Running
Searchers and block producers can use their ability to order transactions in a block to front-run a significant buy order still waiting in the mempool for execution. MEV arises when a similar buy order is inserted ahead of this transaction to secure a more favorable price before the large buy order goes through, thereby driving up the digital asset's price.
A similar MEV strategy is the "sandwich" attack, where buy orders are placed before a specific price-moving transaction and sell orders are placed after it, profiting from the price pressure on both sides.
Liquidation Transactions
DeFi allows users to take out loans using deposited digital assets as collateral. If market volatility causes the collateral's value to drop below a specific price, the position is liquidated. The involved smart contracts usually reward or pay fees to the transaction triggering the liquidation.
This creates MEV opportunities. When any searcher or block producer running bots detects such transactions, they can insert their own liquidation transaction into the block before others to extract the reward value.
Conclusion: Pros and Cons of MEV
Since MEV participants primarily aim to maximize profits, MEV is a rational strategy. Some argue that MEV benefits the entire ecosystem by ensuring inefficiencies are corrected as quickly as possible.
For example, MEV searchers compete to be the first to capture value from arbitrage opportunities, leading to rapid price corrections across DEXs. Similarly, if collateral levels are imbalanced, lending protocols do not want risky loans to remain unchecked, so MEV-driven liquidations help ensure lenders' funds are repaid promptly.
However, MEV also brings issues that cannot be ignored. Some implementations, like front-running and sandwich attacks, negatively impact other users, forcing them to pay excessive fees, suffer higher slippage, or face value losses in what are essentially zero-sum games.
Moreover, as MEV searchers compete to insert their transactions into blocks to capture the resulting value, it can drive up gas fees and cause network congestion.
Fundamentally, if the value of reordering transactions in a previous block exceeds the rewards and fees offered by the next block, it becomes economically rational for block producers to pursue blockchain reorganizations for MEV profits. However, this threatens network consensus and integrity.
As the blockchain ecosystem continues to evolve rapidly, finding solutions to these MEV-related issues has become a core area of research and development in the field.