Skip to content
Gallery
Blockchain One Pager
Share
Explore
Advanced Knowledge

icon picker
MEV

MEV stands for "Miner Extractable Value" or "Maximal Extractable Value."
It refers to the extraction of value from Ethereum users by reordering, inserting, and censoring transactions within blocks.
MEV is one of Ethereum's biggest issues, with more than $689 million extracted from users of the network year-to-date.

As miners, validators, and sequencers optimize for profit, they tend to select and order transactions by the highest gas price or transaction fees.
However, the protocol does not require transactions to be ordered according to fees.
Miners can leverage their discretionary ability to reorder transactions to extract additional profits from users. This “irregular” stream of revenue is MEV.
MEV exists on all smart contract-enabled blockchains with a party responsible for transaction ordering, including validators in Proof-of-Stake-based systems like Ethereum 2.0 and rollup providers on Optimistic Rollups.

Parites

Miners, searchers, users, decentralized applications, and protocol developers.

The miners or block producers

They are responsible for sequencing transactions and deciding which transactions to include in blocks and in what order.
Miners can profit from the MEV game in two ways:
by selling scarce block space to non-miner MEV extractors through so-called Priority Gas Auctions (PGA) in exchange for exorbitant(expensive) transaction fees
by capturing MEV directly through reordering, including, or censoring transactions to profit from on-chain liquidation or arbitrage opportunities for themselves.

End-users

People taking out on-chain loans or trading on decentralized exchanges.
Users are the most exploited party in this game as they emit some amount of value that can be captured by miners and non-miner MEV extractors.

Developers

Decentralized applications and protocol developers play an auxiliary role.
The former create MEV opportunities through their design and the incentives they produce, while the latter establishes the game’s base rules such as giving block producers power to sequence transactions, which is what makes MEV possible.

Searchers/DeFi traders/bot operators

They seek to identify MEV opportunities and capture them in different ways.
The two primary ways searchers participate in the MEV game are
by bidding exorbitant gas prices in on-chain PGAs to have their transactions strategically placed at specific positions within blocks by miners
by expressing transaction ordering preferences to miners off-chain using novel MEV extraction tools like Flashbots

The Searchers’ Typical MEV Extraction Process

Monitoring the Ethereum blockchain using bots and automation tools for potential profit extraction opportunities.
When they spot an opportunity, searchers analyze the logic behind the trade, conceptualize the attack vector, and create a bundle—one or more transactions grouped and executed in the order they’re provided—designed to materialize its MEV extraction goal when mined.
Searchers’ transaction bundles can refer to other users’ pending transactions in the mempool and target specific blocks for inclusion.
Once a bundle is created, a searcher will usually send it to a miner using off-chain networks like Flashbots’ MEV-Geth. This allows them to avoid the public transaction pool and express their transaction ordering preferences fast and risk-free (they save on gas fees when their transactions are rejected) directly to miners.
As searchers in aggregate submit a huge amount of bundles and block space is limited, miners auction their block space through a Flashbots Auction — an off-chain where searchers can privately communicate their bid and granular transaction order preference directly to miners without paying for failed bids—and only include the most profitable transactions in their block.
When a miner includes a searcher’s bundle or a transaction in their block, the MEV extraction process is complete.
The searcher’s transaction gets confirmed on-chain and, if the MEV strategy was well-designed, the searcher would have extracted some amount of value from other traders on Ethereum.

The Most Common Attacks

Front-Running

Front-running involves getting a transaction first in line in the execution queue ahead of a known pending transaction.
In Ethereum, searchers run specialized front-running bots that scan the network for large orders on decentralized exchanges and submit competing transactions with higher gas fees to get them mined before the victim’s transaction.

Sandwich Attacks

A sandwich attack is a variation of front-running whereby a predatory trader places two transactions, one before and another right after a pending victim transaction.
Searchers typically use sandwich attacks to extract MEV from unsuspecting traders on decentralized exchanges by manipulating the price of an asset.
For example, a trader can identify a token a victim is about to buy and make a trade to push the price up, then sell the token straight after the victim’s buy order has further increased the price. 【Market price order?】

Back-Running

Back-running is the practice of getting a transaction ordered second in line or immediately after a known pending target transaction.
Searchers typically employ back-running bots to monitor the mempool for new token pair listings or liquidity pools created on decentralized exchanges like Uniswap. When a bot finds a new token pair listing, it can place a transaction order immediately after the initial liquidity and buys as many tokens as possible, leaving only a small amount for other traders to buy later.
The bot can then wait for the price to go up after other traders have purchased the tokens and sell at a higher price for a profit.

Liquidations

Liquidators are searchers that specialize in extracting MEV through liquidations of over-collateralized loans on decentralized on-chain protocols like Compound, Maker, Aave, and dYdX.
Liquidators run specialized bots to monitor the network for transactions presenting liquidation opportunities and act to either front-run or back-run transactions to be the first to liquidate a loan.
Liquidators extract MEV from unsuspecting borrowers by liquidating their loans before they can repay the debt, then profit by selling the borrowers’ collateral.

Time-Bandit Attacks

Time-bandit attacks are a novel type of attack only miners can execute that retroactively reorganize blocks to capture MEV opportunities in previously mined blocks.
When MEV is high enough compared to block rewards, it can be rational for miners to destabilize the consensus to capture MEV in older blocks.
For example, suppose a miner with significant mining power spots a $20,000 arbitrage opportunity in block 100 that is three blocks deep. Instead of mining the latest block to earn a much smaller block reward, they may decide to re-mine block 100, as well as blocks 101 and 102, to capture the arbitrage opportunity and have a longer chain than the miner who originally mined the block.

How Bad Is MEV?

In addition to scaling and attacks, MEV is one of the biggest issues Ethereum and similar smart contract blockchains face today.
The biggest one is that MEV represents an invisible tax that miners and searchers collect from users. Every dollar extracted through MEV is a dollar lost for users. Some would go as far as to describe it as theft.
MEV also leads to network congestion and puts upward pressure on gas prices. The game theory involved generates a self-reinforcing loop of circular dependencies: arbitrage and liquidation opportunities create MEV opportunities, MEV-extracting bots compete for the opportunities via gas price bidding wars, and fee estimators use these bot-inflated gas prices as a reference, leading to users overpaying for transactions.
MEV also destabilizes Ethereum on a protocol level because it puts transaction finality and immutability to question. If MEV is bigger than the block rewards, miners are incentivized to destabilize consensus. If miners can reorder transactions in previous blocks for profit, the entire premise of blockchains as secure, predictable, and permissionless ledgers falls apart.
In light of the recent debate in the U.S. Senate on whether miners and validators should be defined as brokers, if these instances become commonplace, it will become increasingly more difficult to defend the role of miners as mere “passive and neutral transaction processors” on blockchain networks.
MEV erodes the usability, neutrality, transparency, decentralization, security of Ethereum today.
Ethereum recently launched and plans to move to Proof-of-Stake, but neither update will solve MEV.
In fact, some MEV researchers worry that the upgrades may exacerbate the problem.
While EIP-1559 is primarily designed to improve the predictability of transaction fees, the upgrade also features a fee burn function that negatively affects miners’ profitability, which, in turn, may lead miners to ramp up MEV extraction to compensate for the reward reduction.

Bibliography:
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.