Miner Extractable Value (Explained)

What it is, why it worries people and how much of a threat it poses.

Miner Extractable Value (MEV) is a catch all term for all the ways miners can leverage their control over inclusion/ordering of transactions to capture revenue for themselves. Recently MEV moved from academic discussion to active controversy when Edgar Arout released (and then subsequently withdrew) a body of code designed to automate particularly aggressive MEV logic for Ethereum miners. Here we explore what MEV is, where it causes problems and how people are adapting to the threat it poses.


In this issue:

  • What is Miner Extractable Value (MEV)?

  • Why is Miner Extractable Value a concern?

  • How big a threat is Miner Extractable Value?


What is Miner Extractable Value (MEV)?

Bitcoin is a relatively simple system - you can use it to send bitcoin. You can send that bitcoin urgently by paying a high transaction fee, or you can send it in a sort of leisurely way with a low transaction fee. There is only limited space for transactions in each block, so any miner that creates a new block decides which transactions are included and in which order.1

Hypothetically miners could be generous and prioritize transactions that were good for society in some way but typically they don’t. They mostly just prioritize the transactions that pay them the highest fees. That’s perfectly reasonable! Miners are mercenaries not charities. The whole point is you aren’t supposed to trust them.

The laws that govern the network are ironclad but within those laws miners (and validators in Proof-of-Stake systems) have a certain amount of discretion. The revenue that they are able to generate for themselves using that discretion is called Miner Extractable Value (or MEV). MEV exists in any cryptocurrency - if there was no extractable value for miners, there would be no miners. But the implications of MEV vary quite a bit depending on what transactions are trying to do.

Unlike Bitcoin, Ethereum is a fairly complicated system - you can use it to do a lot of different things. Because there are more things that Ethereum can do, there are more opportunities for Ethereum miners to use their discretion to extract value. We talked a little about this back in March when we wrote about sandwich attacks in The Blockchain is a Dark Forest. Put simply, there is a lot of potential MEV in Ethereum:

So for example Ethereum miners can front run trades on decentralized exchanges by putting their transaction ahead of yours to buy whatever you were going to buy and sell it back to you at a higher price.2 They can notice you adding collateral to avoid getting liquidated on a DeFi loan and put a transaction ahead of yours liquidating your contract before you can get to it. They can cut in line if there is a race to mint a limited number of NFTs from a famous artist. Basically if there is an element of importance to who goes first in a given block miners can sell off the rights to ordering in much the same way they can auction off space in the block at all. It’s theirs to sell.


Why is Miner Extractable Value a concern?

The first and most common concern is that MEV is a form of market manipulation and is therefore fundamentally unfair. I’m not very sympathetic to this perspective. The whole point of decentralized platforms is to allow self-interested players to rationally cooperate. If a system fails because its users act in self-interested ways the failure lies with the system. There is a coherent argument to be made that front-running DEX trades and NFT auctions is short sighted since it might limit market growth by discouraging new users and/or attracting regulators. But a normative declaration that certain miner choices are "unsavory" is not good mental model for reasoning about cryptocurrency networks.

There are good reasons to be concerned about MEV though. One concern is about how difficult it becomes to operate as a miner. Maximizing MEV for a Bitcoin miner is pretty simple: just rank the transactions by fee/byte and take the most valuable transactions off the top. But to maximize MEV for an Ethereum miner requires ongoing and updated knowledge about the newest smart contracts on Ethereum and how to arbitrage their transactions. Maintaining that kind of specialized knowledge is expensive, but since mining is competitive it will also be necessary. Miners will respond to that pressure by combining into larger and more centralized pools to split the costs of MEV extraction.3

The MEV in Ethereum is also more variable - in some blocks nothing exciting will happen but in others there will be a spike or a crash and lots of opportunities to collect liquidations or arbitrage between markets. Greater variability in rewards between blocks means greater variability in rewards to miners - which in turn increases the pressure to join larger mining pools better positioned to smooth out the variance in revenue across a larger share of the hashrate. Complexity and variance both punish smaller miners, effectively centralizing the network.

More worrying is the risk that MEV could destabilize the game theory that powers the Ethereum network itself. For a cryptocurrency to be secure it needs to be more profitable to defend the network (by mining on the most recent block) then it is to attack the network (by trying to rewrite history by mining from an older block). If MEV creates wildly different rewards from block to block it may become more profitable for miners to compete over a particularly high value recent block than to compete for the next one. The network could stall out or even break down.

Attacks like this where a miner seeks to change history instead of continuing to advance it are known somewhat colorfully as "time-bandit" attacks and while they were at one point hypothetical there is now a codebase, designed to let anyone trustlessly pay miners for the service of rewriting Ethereum history:

If the market for rewriting Ethereum’s history becomes too lucrative, it may eclipse the market for actually establishing that history in the first place.


How big a threat is Miner Extractable Value?

A lot of people have attacked @0xbunnygirl and Edgar Arout for releasing codebases capable of more aggressive extraction, but I think that approach is fundamentally misguided. Anyone who is open-sourcing MEV code is giving up their competitive edge to help empower independent miners. They should be applauded for defending the system, not punished for attacking it. Blaming the developers who notice and document weakness in your system is just a modern take on killing the messenger. Driving a security problem underground does not solve it.

I’ve also seen some people make the argument that proof-of-stake will solve this problem by making validators more well known and thus more accountable to community pressure. As Tom Schmidt puts it:

"If other PoS blockchains like Cosmos are any guide, ETH 2 PoS pools will be heavily comprised of known actors with reputations to carry and regulations to follow. Based on deposit contract addresses, ETH 2 seems to be heading this way as well. Will Coinbase risk an SEC investigation to skim a few bps from Uniswap traders, or worse, tank the value of the assets of ETH that they exist to facilitate the trading of? By moving miners out of the shadows, the market for re-organizing blocks shrinks dramatically."

That sounds great on the surface but to be clear the shadowy unknown miner is also the decentralized independent miner. If your solution to MEV is to make miners known and accountable, then your solution is basically to centralize the network. Large, complex and variable MEV (as is the case for Ethereum today) is a heavily centralizing force and therefore a threat to the health of the network.

That said, I don’t think that MEV poses a very serious threat to Ethereum or any other blockchain in the long run. The reason that there is so much MEV available on Ethereum right now is because the systems built on top of it are almost childlike in their innocence. Liquidation points are public, trades sit passively in the mempool waiting to be frontrun. These are problems with today’s DEXes, not really problems with Ethereum. Being angry at miners for extracting that value is like throwing away steak and then being angry at bears for digging through your trash. As markets evolve and mature they will stop carelessly leaving behind value to extract.

The biggest danger from MEV is in the short run. The amount of value available for extraction today is large and still growing. If markets don’t evolve to produce better privacy and protections for traders miners may eventually be able to extract enough value to unbalance the ecosystem or damage the game theory of the network. It may not matter that markets will eventually make time-banditry unprofitable if it is profitable enough to kill Ethereum in the meantime.


Places to learn more:

  • An interview with Vitalik Buterin about MEV:

1

Bitcoin is simple enough that transaction ordering mostly doesn’t matter. You don’t care if your transaction is ahead or behind of someone else’s in the block in the same way you don’t care if the post office delivers mail to your neighbor’s house before or after your own.

2

You can see for yourself how often this has happened to you at https://sandwiched.wtf/

3

One group trying to balance out this asymmetry is Flashbots, an open source effort to release high-end value extraction code for any miner. Unfortunately the Flashbots network itself is now a source of centralization, with ~85% of the hashrate using it at time of writing.