The Tie Research
MEV: An Intro to Value Extraction
Ethereum’s nature to forever grow increasingly complex is also its curse. This complexity is facilitated by its core development: smart contracts. This new, radical tool enabled developers to chart boldly into the realm of decentralized finance, where we’ve witnessed explosive growth and volatility. However, novel systems bring novel risks. Maximal/Miner Extractable Value (MEV), is one such byproduct.
- MEV refers to the total amount of Ether miners can extract from manipulation of transactions. This manipulation can come in a few forms, but most tend to be through re-ordering of transactions within blocks produced and generalized frontrunning.
- The three most common examples of MEV are: DEX arbitrage, liquidations, and sandwich trading
- MEV-Geth, a proof-of-concept for permsisionless MEV extraction, was recently designed and implemented by Flashbots with the goal of relieving network congestion caused by frontrunning and backrunning bots.
- MEV-Boost separates the role of PoS validators: block building and block proposal. Searchers will send bundles to block builders, or they may be block builders themselves.
- OpenMEV is a platform for facilitating aggregation and direct communication between block producers and validators. The goal is to allow users to partake in MEV revenue opportunities.
What is MEV?
At its core, MEV refers to the total amount of Ether miners can extract from manipulation of transactions. This manipulation can come in a few forms, but most tend to be through re-ordering of transactions within blocks produced and generalized frontrunning. This results from the miner’s control of the ordering transaction in a particular epoch. MEV stems from two basic sources:
- Pure revenue opportunities created as a result of DEX arbitrage
- Priority Gas Auction (PGA)
The term MEV can be misleading, as many assume the value extracted solely belongs to miners. In reality, most of the MEV today is captured by traders using various arbitrage strategies. Its popularity stems from the fact that value is accrued consistently, regardless of market conditions.
Let’s look at an example of how pure revenue arbitrage opportunities and PGAs enable MEV. Suppose there is an arbitrage opportunity present on a DEX as a result of a large trade. An arbitrage bot will then submit a transaction to capture the discrepancy in the price of the asset, paying x gwei in gas. A miner will then either copy and censor the arb bot’s transaction to capture the value for themselves, or other arbitrage bots will spot the opportunity and bid higher gas, leading to a Priority Gas Auction. The difference between the final gas paid and total MEV would be the arbitrage bot’s profit. This is just one example of how MEV can be obtained, and later we will go through other MEV strategies implemented today.
The MEV Supply Chain
In order to better understand how MEV works, let’s break down its supply chain. There have been two basic players since the dawn of MEV in 2017: Miners and MEV Searchers.
MEV searchers can be thought of as “blockchain plumbers”. They try to find all extractable value on-chain through different methods. Searchers work with miners, as searchers are willing to pay high gas fees in order to have their transaction included. In some instances, searchers may pay 90% or more of their total MEV revenue in gas fees to miners.
Now let’s put the MEV searchers and miners in the context of the supply chain.
The user here is anyone who wants to interact with a blockchain. Users then access their wallet UI, which in turn encodes the user's desire into a transaction for the blockchain to understand. This is where everything at the application layer comes together to express the user intent. Developers at this layer make decisions on behalf of users on how to deal with MEV. For instance, developers could decide to route user transactions to a public transaction pool where they can be picked by searchers, or to a private routing system like the Flashbots Protect RPC, which restricts what searchers can do.
The searcher then proceeds to extract all the MEV possible by taking user transactions from all sources and converting them into a transaction type called a bundle. Bundles are one or more transactions that are grouped together and executed in the order they are provided. In addition to the searcher's transaction(s), a bundle can also potentially contain other users' pending transactions from the mempool, and bundles can target specific blocks for inclusion as well.
This is important because the liquidity, arbitrage, and liquidations performed by searchers are what keeps the markets going, though searchers are liable to extract disproportionate value relative to the services they provide. Builders then aggregate bundles and construct a block.
Finally, validators perform consensus roles to validate the blocks. In the past, validators and builders have been considered the same, though this will change post-merge, as the introduction of a separation between block proposer and builder will be introduced. More on this later.
The three most common examples of MEV are:
- DEX arbitrage
- Sandwich Trading
DEX arbitrage was covered in an example earlier, so let’s focus on liquidations and sandwich trading.
Liquidations are prime MEV opportunities. If/when a borrower is liquidated, there is usually a significant liquidation fee associated with it. This is where the MEV opportunity comes in. Searchers determine which borrowers can be liquidated and compete to be the first to submit a liquidation transaction in order to collect the liquidation fee for themselves.
Sandwich trading is another common form of MEV extraction and often seen as the most notorious. This strategy is most akin to the high frequency trading done in traditional finance. At its heart, a sandwich exploits the mempool, scanning for large DEX trades. The two main components of a sandwich attack are:
- Price Slippage
For example, if the MEV extractor can see a pending transaction of 100,000 USDC worth of ETH on Uniswap, it's only logical to conclude that the price of ETH would go up after the transaction has been executed. The economically sound maneuver would be to buy ETH immediately before the transaction is executed, and sell it immediately after the transaction is executed.
One can calculate the approximate price effect of any given trade in this manner, giving this method a critical advantage over frontrunning in TradFi. Each trade on a DEX has a deterministic nature, allowing one to calculate optimized trade sizes to front run a purchase.
2021 gave way to a MEV extraction explosion, leading to extremely high gas prices for a few months. The emergence of an altruistic research and development organization called Flashbots enabled the discussion of creating a permissionless, transparent, and fair ecosystem for MEV extraction. As a result, generalized frontrunners are no longer as effective and PGAs are off-chain (aka, low gas fees for users).
MEV-Geth, a proof-of-concept for permissionless MEV extraction, was recently designed and implemented by Flashbots with the goal of relieving network congestion caused by frontrunning and backrunning bots.
The idea is that adoption of a neutral, public, open-sourced infrastructure for permissionless MEV extraction will remove the risk of it becoming an insider’s game. At the same time, MEV-Geth also seeks to create an ecosystem for MEV extraction that preserves Ethereum’s properties. In fact, MEV-Geth introduced the concept of “searchers” and “bundles” to Ethereum.
Note that MEV-Geth is a proof of concept, and, while it is compatible with any regular Ethereum client, It is still a work in progress.
Though MEV is not restricted to Ethereum, it contains the most volume of any chain. As such, it's important to discuss the implications of MEV post-merge.
Earlier, we introduced the topic of block proposer-builder separation (PBS), but why is this necessary and crucial to MEV or Ethereum? MEV introduces risk to ongoing efforts of decentralization of consensus networks. MEV also compounds as it encounters economies of scale. For example, a pool that is 10x bigger will have 10x more opportunities to extract MEV. In addition, MEV complicates decentralized pools, as there would still be one entity building and proposing the blocks. This would allow them to easily and discreetly extract MEV without sharing the revenue with the pool.
PBS solves this by creating a separation between the role of proposer and builder. Instead of a block proposer generating a revenue-maximizing block by themselves, they cooperate with a market of third parties called block builders. The block-builders produce bundles that contain block contents and a fee for the proposer. It is up to the proposer to choose the bundle with the highest fee.
After the merge, block time will be fixed to 12 seconds, rather than being a Poisson distribution, as it currently is. Additionally, block proposers will be known ahead of time. This combination of fixed block times and pre-known block proposers will allow searchers to submit their bundles just before a block is going to be proposed. Searchers will tend to colocate to areas near large validators and best performing block builders. In fact, some block builders may offer colocation as a service to searchers (e.g. AWS data centers).
An implementation of PBS, called MEV-Boost, is currently being developed by Flashbots for post-merge Ethereum validators. Validators who elect to run MEV-Boost will maximize their staking rewards (up to 60%!) by selling blockspace to the open market, while preserving the decentralized aspect of Ethereum.
So how does it work? PoS node operators must run three pieces of software: a validator client, a consensus client, and an execution client. MEV-boost can be thought of as a “sidecar” for the consensus client, which queries and outsources block-building to a network of builders. Block builders prepare full blocks, optimizing for MEV extraction and fair distribution of rewards. They then submit their blocks to relays. Relays aggregate blocks from multiple builders in order to select the block with the highest fees. Finally, the Consensus Layer of a validator proposes the most profitable block received from MEV-boost to the Ethereum network for attestation and block inclusion.
In addition to Flashbots, Manifold Finance has introduced OpenMEV: a platform for facilitating aggregation and direct communication between block producers and validators. This allows protocols to leverage MEV to their advantage. For instance, users can communicate where they prefer their transaction order to be within a block. The heart of OpenMEV comes from its establishment of credible neutrality. This means having a mechanism or rule book that can regulate off-chain behavior and activities.
The goal of OpenMEV is to enable protocols to be more efficient in terms of value capture and distribution, as currently operating as an MEV extractor has an extremely high barrier of entry. With OpenMEV any trader can reap OpenMEV “rewards” through SushiSwap.
This report is for informational purposes only and is not investment or trading advice. The views and opinions expressed in this report are exclusively those of the author, and do not necessarily reflect the views or positions of The TIE Inc. The Author may be holding the cryptocurrencies or using the strategies mentioned in this report. You are fully responsible for any decisions you make; the TIE Inc. is not liable for any loss or damage caused by reliance on information provided. For investment advice, please consult a registered investment advisor.
Sign up to receive an email when we release a new post