MEV isn't going away
More people need to pay attention to MEV before it turns into an inevitable crisis.
MEV poses a huge danger to blockchain technology and decentralization. Some forms of MEV make the user experience worse. Users end up paying more, paying a “tax” that goes to MEV operators. More extreme forms of MEV rearrange blocks, cause network congestion, and drive up gas fees.
If the MEV problem isn’t solved, blockchain consensus could be threatened. Operators have the incentive to undermine the security of the blockchain to make a profit.
A lot of you may be familiar with MEV. Many of you may be scratching your heads right now. This article has a little bit for everyone.
In this article, I’ll cover:
What is MEV?
Simple MEV strategies
Negative effects of MEV
Current solutions for MEV
MEV and PoS ETH
What is MEV?
MEV stands for “Miners Extractable Value” or “Maximal Extractable Value.” MEV is the value that can be extracted during block production by miners. It is achieved by inserting, censoring, reordering, or deleting transactions within a block. MEV affects both PoW and PoS blockchains, so even PoS ETH won’t be safe.
A large chunk of MEV is the result of block producers extracting value from unsuspecting users. There’s also a large portion of MEV that is extracted by independent network participants called “Searchers” or “MEV Engineers.”
Searchers use various strategies to detect and act on MEV opportunities. They generally use bots to rapidly capitalize on the opportunity.
Simple MEV Strategies
MEV isn’t all bad. Some MEV is essential for a blockchain ecosystem to function. Many DeFi projects rely on MEV to ensure their protocol is stable and robust. Let’s take a look at some “good” MEV:
DEX arbitrage: This is the simplest and most popular MEV method. It’s not super profitable anymore, as it’s highly competitive. Searchers compete to act on price discrepancies between DEXs. The result is that these price discrepancies are minimized.
Liquidations: Ever wonder how DeFi loans get liquidated? MEV is one major way. Searchers process blockchain data to liquidate debt positions. These searchers are rewarded with liquidation fees. Speedy liquidations of this sort allow lenders to get paid faster.
MEV isn’t all good though. There’s a long list of MEV strategies that are detrimental to innocent blockchain users. Here are a few:
Generalized Frontrunning - a bot watches the mempool to detect profitable transactions. The bot then submits an identical transaction (with a different address) at a slightly higher gas price.
Back-running - involves monitoring the mempool to execute a transaction immediately after a pending target DEX transaction. Aims to follow high price-slippage trades to exploit imbalanced pools on DEXs.
Sandwich attack - a searcher watches the mempool for large DEX trades, a trade that will cause slippage. The searcher takes advantage of this and buys a token at its normal price before the large trade. Immediately after the large trade, the searcher sells the token for a higher price (caused by the slippage).
Time-bandit attack - involves the reordering of blocks in order to maximize profits. Miners are able to destabilize the consensus to reap the maximum profits.
The MEV Problem
Since 2020, nearly $700 million has been extracted because of MEV. Take a look at these stats:
Negative Effects of MEV
Poor User Experience: Blockchain and DEX users are ripped off. They’re the target of malicious searchers. Victims face higher slippage. They often have to pay a premium for trades. A lot of people opt to trade on CEXs as a result.
High Gas Fees: Front-running, back-running, and sandwich attacks are all dependent on executing a transaction at the correct time. This can lead to gas wars as multiple searchers compete for the same transaction. Given that whatever MEV they are competing to extract is guaranteed, bots can use as much as 90% of the MEV to pay gas fees. Bots competing for MEV opportunities cause network congestion and drive up gas fees.
Consensus Attacks
This is an extreme negative effect of MEV. Imagine that MEV rewards surpass block rewards on a network; with this, validators are therefore incentivized to remind previous blocks so they can either capture more MEV or take advantage of opportunities they missed. That poses a threat to both the network’s consensus mechanism and the idea of blockchains in general. This is what’s known as “Time-bandits attack.” Validators may harm the security of the blockchain just to secure profits.
Current solutions to MEV
There are multiple takes on the MEV problem. Some are trying to solve the MEV problem by eliminating it from blockchains. Others believe that MEV cannot be solved; they’re aiming to democratize MEV to reduce its negative effects. Flashbots is one of the prominent projects trying to democratize MEV Some believe that MEV is inevitable.
Some current solutions to MEV:
Chainlink’s Fair Sequencing Service(FSS). Chainlink and Arbitrum developed FSS to mitigate MEV on L2s. The idea behind FSS is to have an oracle network order the transactions sent to a particular contract.
Private mining pools. These mining pools order transactions away from searchers in the mempool. e.g Ethermine, MiningDAO.
Flashbots
Flashbots is the most popular solution. Flashbots is an R&D organization that works to mitigate the negative effects of MEV. Their end goal is to avoid the existential risk that MEV poses to blockchains.
Flashbot’s primary focus is to enable a permissionless, transparent, and fair ecosystem for MEV extraction. They achieve this by democratizing MEV rewards for searchers through Flashbots auctions. Auctions democratize MEV rewards by creating a private communications channel between validators and searchers.
Flashbots introduces the concept of MEV auctions to ensure fair distribution of MEV rewards, minimizing the negative effect on everyday users. Flashbots Auction provides a private channel for searchers and validators to effectively communicate the preferred transaction order within a block.
Here’s how it works:
Validators trustlessly outsource the work of finding optimal block construction to searchers.
Searchers create an order list of transactions from the mempool. This transaction list is called a Flashbot bundle.
The Flashbot bundle is sent to Relayers (a layer of defense against possible Denial-of-Service(DOS) attacks). The bundle is then sent from Relayers to miners.
Miners on Flashbots run the go-ethereum client called MEV-geth. They select the most profitable bundle and mine it in the next block.
MEV and PoS ETH
MEV isn’t going away anytime soon. Following the merge, ETH is moving towards a PoS consensus system. Miners are going to be replaced by validators. Validators will still be able to perform the detrimental activities that miners do today. Alex Obadia, a researcher for Flashbots, estimates that ETH 2.0 validators stand to earn 1.93 ETH per year, 70.9% more than what they are currently earning from network rewards alone, with the addition of MEV income.
The higher validator income will attract more people to stake their ETH to become validators, increasing the security of the Ethereum network. Secondly, there will be an increased difference in revenue between validators who are randomly assigned block proposal responsibilities and validators who are assigned other responsibilities.
A censorship-resistant framework is being proposed to help mitigate MEV exploitation on PoS ETH. This is known as Proposer/Builder Separation (PBS).
Under the current design, miners and validators are able to capture a large portion of MEV by choosing which transactions to include in a block. They are able to front-run other users and perform similar MEV attacks.
PBS would mitigate this problem by separating the block construction process from the block proposal process. PBS separates network actors into two groups: block builders and block proposers (Proposers are the validators post-merge). Block builders build “exec block bodies” and submit bids. Block proposers simply accept the block with the highest bid. In this model, proposers don’t know the content of the exec block. This prevents MEV theft by proposers.
PBS is currently just an idea. It is yet to be implemented on Ethereum
More people need to start thinking about MEV before it undermines the security of our blockchains. MEV poses a huge risk to decentralization and it’s not going away anytime soon.
Great stuff mate - really well explained!