What Is Miner Extractable Value?

Miner Extractable Value (MEV) is a phenomenon costly to trades. Let’s go over MEV and how it affects the average trader’s activities.

Balancer Labs
Balancer Protocol
5 min readNov 11, 2021

--

Miner Extractable Value (MEV) is a measure of profit a miner can make through their ability to arbitrarily include, exclude, or reorder transactions within the blocks they produce. Miners can use these decisions to create additional revenue and often reorder transactions on each block to their benefit. This dynamic plays out in many interactions on the blockchain, commonly on decentralized exchanges (DEX), and can significantly impact the user experience.

How Does MEV Work?

When a new block is created, several things must happen. First, there is the mining process, based on proof-of-work, where nodes on the network record information on the blockchain.

During the mining process, new blocks are created by the miner and validated by achieving consensus. While networks ensure that transactions are valid and new blocks of transactions are produced, there isn’t a guarantee that transactions will be ordered in an exact manner submitted.

Miner Extractable Value collects additional revenue per block by ordering transactions in different ways inside each block. The ability to order transactions has implications for trade settlement, particularly for DEXs that must settle trades in a specified manner.

Most forms of MEV today are taken from third-party bots. To date, more than $730 million has been extracted from users by bots front-running transactions and exploiting the slippage users allow in a trade.

MEV Techniques (Miners)

Front Running

A tactic first seen in traditional finance, front running the practice of closely monitoring and getting in front of a trade right as the price rises or drops.

In a DEX setting, miners monitor all transactions, knowing which ones are large enough to significantly move the price of a token pair. This monitoring allows them to place a transaction before the token’s price rises or drops in value, turning a profit. Since their transaction is mined first, the reserve liquidity pools have changed, and your trade is most likely to fail as the pool can no longer offer the same price. By having their transaction upfront, they can capitalize on new opportunities.

Back Running

On the opposite end, back running is the MEV strategy of placing a transaction directly after a transaction that would benefit the user. An example of this is a liquidation transaction immediately following an oracle price update. If a miner is aware of a transaction with a significant price impact, they will place their transaction in the same block as the target transaction.

Sandwiching

Sandwiching is another sequential strategy. As the name suggests, a miner places a transaction in front of a user, making the token price go up and increasing slippage costs.

When a miner sandwiches their transaction, they are positioning themself to better profit from gas fees. Because they can see a transaction before it executes, they can prepare. One way to do so is to sandwich their own transaction. The act of placing these two orders and surrounding pending transactions results in a manipulation of asset prices.

More MEV Opportunities

Decentralized Exchanges

Decentralized exchange arbitrage presents a simple MEV opportunity called “DEX arbitrage” or “cross-exchange arbitrage.”

The extractable value comes when someone significantly moves the pool price. If a miner is made aware of the situation, they can cash the arbitrage opportunity.

As liquidity grows within DEXs, the occurrence and profitability of these arbitrage opportunities have increased, increasing competition between arbitrage bots. These bots compete in a bidding war, raising the fees to get their transaction processed first.

Liquidation

Liquidation in lending protocols is another opportunity for MEV.

Lending platforms have collateral requirements that change from platform to platform. However, after a borrower provides collateral, the value of that collateral is subject to change from regular price fluctuations.

When the collateral value falls below the accepted level for the loan, the borrower can have their collateral liquidated. Meaning a third party can immediately pay off that borrower’s lender, leaving the borrower stuck with a fee. Liquidation fees are quite large, and while part of it goes to the other lenders, part also goes to the liquidator. The value opportunity arises when the miner catches a public transaction to liquidate. They can front-run the transaction and liquidate to get the asset at a discount.

While a less common tactic than those mentioned above, some searchers specifically look for the best opportunities to quickly liquidate a borrower so they can later collect the liquidation fee.

Consensus Protocol

Before moving on, it’s worth noting that the Ethereum blockchain is phasing out proof-of-work (PoW) in favor of proof-of-stake (PoS) as mining comes to an end. Ethereum 2.0 is on the horizon. The consensus shifts from miners to block producers and increases MEV incentives.

MEV Impact

Unfortunately, many of the side effects of these practices are negative. For the average user, MEV front-running and sandwiching lead to negative executions on transactions and increased slippage.

The negative impacts of MEV may be frustrating at the individual level but are more damaging at the network level. When miners create gas auctions and engage in front-running, they slow down the network and inflate gas prices.

The Bottom Line

MEV affects trading activities at all levels resulting in either failed transactions or transactions executed at a higher cost than expected.

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. MEV erodes the usability, neutrality, transparency, decentralization, and security of Ethereum today, creating an environment where miners who are better at extracting MEV grow at the expense of others.

While a present issue, there are steps to resist MEV. Balancer Protocol and CowSwap came up with a solution that combats MEV, delivering the best experience for traders. The Balancer-Gnosis-Protocol combats MEV by leveraging batch auctions with uniform clearing prices for all trades in the same batch, protecting traders from value extraction. CowSwap uses Coincidence of Wants, an economic phenomenon in which peer-to-peer trades are settled directly without using an AMM, therefore without incurring any slippage and fees. BGP allows users to buy and sell tokens using gas-less orders settled peer-to-peer or into any on-chain liquidity source while providing MEV protection.

--

--

Balancer Labs
Balancer Protocol

Balancer Labs contributes to Balancer Protocol — the leading platform for programmable liquidity.