What Is Maximal Extractable Value (MEV)?

Introduction

MEV, or Miner Extractable Value, is a term used in the cryptocurrency space that refers to the practice of intentionally adjusting the order of transactions or adding and removing transactions when generating new blocks (i.e., those to be added to a blockchain) to maximize profit. It can be viewed as the additional value extracted beyond standard rewards and gas fees from a block by selecting the order in which transactions are added.

MEV is often closely associated with the Ethereum network, which hosts a significant decentralized finance (DeFi) ecosystem. The more complex the transactions in a block (for example, those involving lending or trading through smart contracts), the greater the opportunity for block producers to adjust the order of transactions or modify them to extract additional profits.

What Is MEV?

The concept of MEV was first linked to the Ethereum network when it operated under a Proof of Work (PoW) consensus mechanism. Miners had the authority to reorder, add, or remove transactions when generating blocks, thus extracting additional value.

The term "Miner Extractable Value" emerged to explain how to maximize the extraction of extra profits. However, after Ethereum transitioned to a Proof of Stake (PoS) consensus mechanism in September 2022, new blocks are now generated by validators rather than miners.

Nonetheless, PoS systems also face MEV challenges. Since blocks are still being created, whoever chooses the order of transaction additions will make decisions aimed at maximizing profit. Although the old concept of MEV remains, it now represents "Maximal Extractable Value," which is no longer exclusive to miners.

How Does MEV Work?

To understand how MEV operates, it is essential to grasp the role of block producers, whether miners or validators. Block producers play a critical role in securing and maintaining the blockchain network, responsible for validating transactions and adding them to the network in the form of blocks. Depending on the type of blockchain, this process is referred to as mining or validating.

In simple terms, block producers ensure the integrity of transactions on the network and guarantee its proper functioning. Without block producers, new data cannot be added to the blockchain. They are responsible for collecting users' transaction data and organizing it into blocks for addition to the network.

It is important to note that the inclusion of transactions in a block is determined by the block producer. Typically, they choose transactions based on profitability, meaning that transactions with higher fees are prioritized. This explains why users are willing to pay higher gas fees (or transaction fees) during busy periods to ensure their transactions are processed sooner. Block producers select the transactions with the highest fees to maximize their profits, so transactions with lower fees often have to wait longer for processing.

However, block producers are not required to select or order transactions solely based on fees. When transactions involve more complex information (e.g., transactions supporting smart contracts), block producers can add, remove, or reorder them to gain additional profits beyond the standard block rewards and transaction fees.

For instance, a block producer might choose certain transactions over others and sort them in a specific way to exploit arbitrage opportunities or on-chain liquidation trades, thereby generating extra profits. The essence of MEV lies in the process of selecting and ordering transactions to obtain greater economic benefits.

MEV Searchers

While MEV may seem beneficial only to block producers, in reality, much of the MEV profit is captured by other participants known as "searchers." Searchers analyze network data to identify profitable MEV opportunities and execute corresponding operations.

Typically, searchers pay high gas fees to block producers to ensure their MEV-extractive transactions are executed. In competitive MEV scenarios, block producers can earn up to 99.99% of the gas fees from the potential profits of searchers.

For example, in decentralized exchanges (DEXs), searchers often pay over 90% of their MEV income in gas fees, as this is the only way to ensure their arbitrage transactions are processed before others.

Common Examples of MEV

Arbitrage trading, front-running, and liquidation trading are common opportunities from which searchers and block producers can profit through MEV. Below, we will explore these examples in detail to gain a deeper understanding of the concept of MEV and its operational mechanisms.

Arbitrage Trading

Arbitrage opportunities arise when the price of the same asset differs across different trading platforms. In the cryptocurrency market, a specific token may have varying prices on two different DEXs. When arbitrageurs identify this price discrepancy, they quickly execute trades to capture profit. If a searcher's bot detects a pending transaction and inserts its own transaction before it, thereby extracting the value of the arbitrage opportunity, MEV is created.

Front-Running

Searchers and block producers can leverage their ability to order transactions in a block to execute significant buy orders waiting in the transaction pool ahead of time. MEV occurs when a searcher inserts a similar buy order before a large buy order to secure a better price. This strategy is often referred to as the "sandwich" strategy, where a buy order is placed before a transaction that will cause a price change, followed by a sell order after that transaction to profit.

Liquidation Trading

In DeFi, users can use deposited digital assets as collateral for loans. If market fluctuations cause the value of the collateral to fall below a certain threshold, the position will be liquidated. Transactions that trigger liquidations typically pay rewards or fees to the relevant smart contracts.

When searchers or block producers identify such transactions, they can insert their own liquidation transactions before others, extracting the reward value and creating an MEV opportunity.

Conclusion: Advantages and Disadvantages of MEV

Since participants in MEV primarily seek profit, MEV is viewed as a rational strategy. Some argue that MEV benefits the overall ecosystem by quickly correcting inefficiencies in the market.

For instance, searchers competing to be the first to profit from arbitrage opportunities rapidly correct price differences between DEXs. Similarly, when collateral levels become imbalanced, loan protocols aim to manage risk; thus, promoting MEV liquidations facilitates the swift repayment of lender funds.

However, MEV also brings notable issues. Some front-running and sandwich attack methods can negatively impact other users, causing them to pay excessively high fees, endure greater slippage, or suffer value losses in a zero-sum game.

Additionally, as MEV searchers compete to insert transactions into blocks for related value, this can lead to increased gas fees and network congestion.

Fundamentally, if the value of reordering transactions in a previous block exceeds the rewards and transaction fees offered by the next block, block producers may find it economically rational to reorganize the blockchain for MEV profits. However, such behavior could threaten the network's consensus and integrity.

As the blockchain ecosystem rapidly evolves, finding solutions to address MEV-related issues has become an important area of research and development in the field.