What is MEV

MEV stands for maximal extractable value, referring to the highest value that can be captured from block production beyond the standard block reward and gas fees by including, excluding, and reordering transactions within a block.

The concept of “MEV” was first introduced by Philip Daian et al. in their 2019 research paper “Flash Boys 2.0.” At that time, MEV originally meant “miner extractable value” because the paper focused on miners on PoW chains. However, MEV exists in both PoS and PoW networks. Additionally, third parties (MEV bots), rather than block producers, now capture most types of MEV. Therefore, the meaning of MEV has gradually evolved to maximal extractable value, i.e., the maximum value that can be extracted.

How it works

In most blockchain networks, pending transactions are pre-stored in a public waiting area called the “mempool.” Miners or validators select transactions from the mempool, order them, and include them in new blocks. The entire blockchain network then verifies the newly produced block. Only after verification is the new block considered final. MEV bots can profit from this process.

Who are “miners”? What is the significance of mining? Please refer to the “What is Mining” entry.

Sandwich Attack Profit Scenario

When an MEV bot detects a large pending transaction in the mempool and chooses to perform transactions before and after it, it is called a sandwich attack. Sandwich attacks reduce the amount of cryptocurrency the original trader receives and allow the MEV bot to pocket the difference.

For example, Wayne plans to buy 10 ETH at $1,000 each on Uniswap, totaling $10,000. The transaction is waiting in the mempool to be executed. When the MEV bot detects Wayne’s transaction, it can immediately place two additional orders to include in the same block. The resulting sandwich in the block would be:

Level 1: The MEV bot buys $10,000 worth of ETH at $1,000, pushing the ETH price up to $1,005.

Level 2: Wayne buys 10 ETH at $1,005, paying $10,050 instead of $10,000.

Level 3: The MEV bot sells 10 ETH at $1,005, earning a $50 profit.

Wayne’s (the MEV victim’s) additional cost depends on the slippage he set for the order. Slippage refers to the percentage difference between the price at order submission and execution—the lower the slippage, the lower the potential return from a sandwich attack.

Just-in-time (JIT) Liquidity

JIT liquidity refers to LP providing and removing liquidity on DEX immediately before and after a trade. When an MEV bot observes a large pending transaction in the mempool, it can instantly add liquidity to the DEX and concentrate within the swap range where the pending transaction will occur. After completing the trade and earning LP fees through JIT liquidity, the MEV bot then immediately removes the LP position from the DEX.

JIT liquidity is like a reverse sandwich attack on traders, allowing the original trader to benefit from better trading conditions.

What is liquidity? What is an LP? What do they mean for DEXs? Please refer to the “What is Liquidity and LP (Pool)” entry.

DEX Arbitrage

Cryptocurrencies often have different prices across various decentralized exchanges. When the price difference between exchanges is significant, MEV bots can buy on the lower-priced exchange and sell on the higher-priced one to profit. Through continuous arbitrage by MEV bots, prices across exchanges become more aligned, making the DeFi market more efficient.

Liquidation

When a borrower cannot repay a loan on a DeFi lending protocol, the protocol allows anyone to liquidate the undercollateralized borrower’s collateral and earn liquidation fees. MEV bots often seize this opportunity.

What is the mechanism of liquidation? What is its significance? Please refer to the “What is Liquidation” section.

Gas Fee Competition

The main way MEV bots compete for MEV opportunities is by bidding up gas fees. Transactions with higher gas fees are prioritized and executed before those with lower fees. Therefore, MEV bots can manipulate the transaction order within a block by changing the transaction fees paid to block producers. In other words, the only way to ensure an MEV transaction is included is by submitting the highest gas price.

As a result, although miners and PoS validators do not actively seek MEV arbitrage, they can capture most of the MEV profits. For example, some MEV bots pay 90% or more of their total MEV profit in gas fees to beat other bots and secure potential MEV opportunities.

Impacts

Some forms of MEV extraction are harmful to blockchain networks and their users, while others are beneficial. For example, victims of sandwich attacks suffer from price increases. On the other hand, DEX arbitrage MEV provides more accurate prices for users, and rapid liquidations in lending protocols better protect lenders’ assets. **$MEW **$ME **$MET **

ETH1,3%
UNI1,97%
DEFI3,84%
MEW0,57%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
0/400
No comments
  • Pin

Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate App
Community
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)