What is Maximum Extractable Value (MEV)?

Carlos Howard
Carlos Howard
Blockchain architect with 8 years' Ethereum experience; 8年以太坊开发经验的区块链架构师。

Okay, no problem. Let's talk in plain language about what this seemingly complex MEV is all about.


What is Maximum Extractable Value (MEV)?

Imagine you're trying to snag a ticket for a popular concert on a massive online ticketing website. The moment you click the "Buy" button, your request doesn't go through instantly. Instead, it's sent to a "waiting room" where it lines up with thousands of other people's requests.

Now, let's say a "scalper" has an all-seeing view. He can clearly see everyone's requests in this "waiting room," including how much you're willing to pay (i.e., your transaction fee). He realizes you're about to buy a ticket at face value, so he immediately does two things:

  1. He submits his own ticket purchase request, paying a higher "expedited fee" (transaction fee) than you.
  2. The ticketing system prioritizes his request, allowing him to cut in front of you and buy that ticket.

By seeing your intention and leveraging his ability to influence order, he extracts "value" from you (the price difference of the ticket, or rather, the opportunity cost).

In the world of blockchain, MEV (Maximum Extractable Value) is akin to the money earned by this "scalper."


How Does MEV Work in the Blockchain World?

To help you understand better, let's map the roles from the above example to the blockchain:

  • "Waiting Room" -> This is the Mempool. Every time you make a transfer or transaction on Ethereum, your transaction is first broadcast to a public pool, visible to everyone, where it waits to be processed.
  • "Scalper" -> These are the so-called "Searchers" and "Builders/Validators". They are robots or teams who write programs specifically to monitor the mempool.
  • "Expedited Fee" -> This is the Gas fee (transaction fee) on the blockchain.
  • "Ticketing System" -> This refers to the Validators (formerly miners) responsible for packaging transactions into blocks. They have the power to decide which transactions are included and in what order.

So, the entire process is as follows:

  1. You initiate a transaction (e.g., buying 1 ETH on Uniswap).
  2. This transaction enters the public mempool, waiting to be included in a block.
  3. An MEV bot (searcher) monitors the mempool like a hawk and instantly spots your transaction. It analyzes that your large buy order will slightly increase the price of ETH.
  4. The bot immediately takes action, submitting two of its own transactions:
    • First transaction (buy): It pays an extremely high Gas fee to cut in line before your transaction, preemptively buying ETH.
    • Second transaction (sell): It pays a normal Gas fee, placing it after your transaction.
  5. The validator, seeking to earn higher transaction fees, will prioritize the bot's first transaction, then your transaction, and finally the bot's second transaction.

The result is: the bot buys low -> your transaction pushes the price up -> the bot then sells high. In this instant, it extracts profit from you. And you, in turn, buy ETH at a slightly higher price than you anticipated.


Several Common Types of MEV

MEV isn't limited to the scenario above; it has many variations. Here are some of the most common types:

  • Arbitrage: This is the simplest form. A bot discovers that the same token is selling for $1 on Exchange A and $1.01 on Exchange B. It will immediately buy on A and sell on B, pocketing a risk-free $0.01 difference. This type of MEV is actually beneficial to the overall market because it helps equalize prices across different markets.

  • Sandwich Attacks: This is the example we explained in detail above. Your transaction is like the meat in a sandwich, squeezed between two other transactions (a buy and a sell) from someone else. This is the most direct harm to ordinary users.

  • Liquidations: On decentralized lending platforms like Aave or Compound, if the value of your collateral falls below a certain threshold, your loan will be liquidated. Anyone can trigger this liquidation process and receive a reward. MEV bots will scramble to trigger liquidations, vying for this reward.


Is MEV Good or Bad?

This is a complex question, like two sides of a coin.

  • Downsides:

    • Unfair to users: Attacks like "sandwiching" make it more expensive for ordinary users to buy and cheaper to sell.
    • Network congestion: To seize opportunities, MEV bots compete fiercely, paying extremely high Gas fees, which makes the entire Ethereum network expensive and slow.
  • Upsides:

    • Improved market efficiency: Actions like arbitrage quickly eliminate price differences, making the entire DeFi market more stable and efficient.

To Summarize

In plain terms, MEV is the economic value extracted from other users by leveraging the power to order transactions on a blockchain.

It exists because transactions are public and transparent before they are finally confirmed. This gives those with the capability and computing power an opportunity to "peek at the cards" and act preemptively. It is both a lubricant for the DeFi world and a "hidden tax" that troubles many. For us ordinary users, while it's difficult to completely avoid, understanding its existence can help us better comprehend the rules of this decentralized world.