Source: Liam,A&T Capital

01 Overview

TL; DR

MEV refers to the economic benefits brought to the subject who designs this sequence by executing N transactions in a specific order. Whenever transaction ordering is involved, the generation of MEV is almost inevitable. How to regulate MEV extraction is crucial to the decentralization and anti-censorship of the blockchain network.

After the Ethereum merger, the extraction and distribution of MEV is dominated by the MEV-Boost system proposed by Flashbots. MEV profits flow to four types of entities: MEV searchers, block builders, block proposers, and the Ethereum network itself.

From the perspective of the consequences that MEV brings to the entire system, it can be divided into three categories: beneficial, neutral, and harmful. How to avoid harmful MEV extraction and how to distribute beneficial and neutral MEV profits are the core issues that projects under the MEV track need to solve.

Existing private RPC solutions are based on trust assumptions, and users' transactions may still be leaked, front-run, or even censored. In addition, the monopoly of some block builders on private order flows will make MEV extraction more opaque and centralized.

The MEV-Boost system’s MEV profit distribution plan does not take into account the interests of users. As users create opportunities for MEV extraction, it is only basic to protect their legitimate interests from being infringed. It should not only protect their transactions from being rushed, but also return part of the MEV profits.

To solve the "jumping the gun" problem, encryption technology should be used. Based on "encryption-sorting-decryption-execution", the user's transaction is encrypted locally, the sorting consensus is completed without anyone reading the transaction content, the content is decrypted, and finally the transaction is executed according to the consensus sorting.

In addition to distributing MEV profits to “seekers who discover MEV opportunities”, “builders who build the highest value blocks”, and “proposers who have the right to produce new blocks”, it should also be distributed to “ordinary users who create MEV opportunities”.

 

02Main content

 

1. Who are the stakeholders of MEV?

* What is MEV? MEV has different meanings in different contexts. To avoid confusion, this article chooses a relatively narrow but most accurate definition: MEV (Maximal Extractable Value) refers to the economic benefits brought to the subject who designed this sequence by executing N transactions in a specific order. Who are the stakeholders of MEV? After the Ethereum merger, the extraction and distribution of MEV is dominated by the MEV-Boost system proposed by Flashbots. According to mevboost.pics, since November 2022, about 90% of the blocks have been produced by the MEV-Boost system.

(Figure 1: Slot Share statistics from mevboost.pics)

Under the current system, the stakeholders of MEV on the Ethereum mainnet include users, wallets and RPC, MEV searchers, block builders and block proposers. In the MEV value chain, it can be broken down into four parts: origin and upstream, midstream and downstream:

(Figure 2: MEV value chain)

Origin: Create MEV opportunities and provide editable space for MEV extraction

User: A general user of the blockchain who initiates a transaction for purposes other than extracting MEV. This can be an end user, project owner, oracle, exchange, etc. These transactions can be considered as the “raw materials” for MEV extraction.

Upstream: Complete the signature and then broadcast the transaction from the local to the network

RPC provider: can first read the content of the user's transaction and decide where the user's transaction is sent Wallet: determines the user's default RPC

Midstream: Auctioning MEV opportunities in a public or private environment and determining how MEV profits are distributed

Mempool: An open and transparent transaction pool within the Ethereum network, visible to anyone, storing transactions to be packaged and uploaded to the chain.

Private order flow: A trusted privacy transaction pool that is only open to specific MEV seekers or block builders and also stores transactions to be packaged and put on the chain. The creation of a privacy transaction pool can be an RPC provider, a block builder, or a third-party project.

MEV searcher: Continuously monitors transactions that have been broadcast by users but not yet packaged, searches for MEV opportunities, packages users' transactions and transactions that can extract MEV into a set of transaction packages (Bundle) in a certain order, and sends them to block builders.

Block builder: selects a series of transactions from the transactions it can receive, packages them into a new block, and sends them to the relay. Transaction sources include Mempool, Bundles submitted by MEV searchers, and private order flows.

Relay: Selects the block with the highest fee from the blocks it can receive and sends it to the block proposer.

Downstream: Propose new blocks so that users’ transactions and MEV extraction transactions are recognized by the network, obtain finality, and realize MEV profit distribution

Block proposer: selects the most advantageous block from the blocks it can receive and proposes it to the chain. The most advantageous block is generally reflected in the ability to charge the highest fee. In practice, blocks with relatively low fees are also proposed for other purposes. The block proposer is also a validator, which is selected according to the blockchain consensus mechanism.

2. How is MEV distributed?

 

Under the MEV-Boost system, MEV flows to four types of entities: MEV searchers, block builders, block proposers, and the Ethereum network itself.

MEV is captured directly by MEV seekers and flows to block builders, block proposers, and the Ethereum network itself in the form of Gas Fee.

Transactions to extract MEV are executed to generate revenue for the MEV searchers who created these transactions. The cost of this revenue is the Gas Fee paid by the MEV searchers. Part of the Gas Fee is burned according to the EIP-1559 protocol, and the other part flows to the block builders in the form of Tips. The block builders transfer most of the Tips directly to the block proposers in the form of MEV Rewards (in most cases, the block builders will retain part of the Tips, but there are also cases where additional subsidies are given to block proposers).

(Figure 3: MEV allocation diagram)

MEV = revenue generated by the execution of transactions in a specific order MEV = MEV searcher profit + block builder profit + block proposer profit + value captured by the Ethereum network MEV = (Bundles income - Gas cost) + (Tip - fee paid to block proposer) + (fee paid to block proposer) + (ETH burned by EIP-1559)

For MEV searchers, MEV profit is reflected as "the revenue generated by the execution of the transaction bundles (Bundles) submitted by the MEV searcher minus the Gas cost of the transaction bundles". For block builders, MEV profit is reflected as "the execution layer revenue in the blocks submitted by the block builders minus the fees paid to the block proposers". For block proposers, MEV profit is reflected as "fees paid by block builders". For the Ethereum network, MEV profit is reflected as "ETH burned according to EIP-1559".

Types of MEV

 

From the perspective of MEV strategy types, it can be divided into "back-running" strategy and "front-running" strategy;

From the perspective of the consequences that MEV brings to the entire system, they can be divided into three categories: beneficial, neutral, and harmful:

In practice, there are endless strategies for extracting MEV profits. For MEVs of different natures, we only give the most common example.

Liquidation transactions in lending protocols:

This is a transaction that extracts MEV based on a "follow-up" strategy. The "follow-up" strategy can only be implemented by following a certain transaction. For example, in an overcollateralized lending agreement, when the change in the oracle feed price causes a borrower's account to reach a state where it can be liquidated, it is profitable to initiate liquidation immediately after the oracle feed price changes.

Timely liquidation can reduce the probability of bad debts and help maintain the stability of the entire lending agreement, so this type of MEV extraction transaction is considered beneficial. Although the source of profit is essentially the borrower's loss, it is also a punishment for the borrower's failure to repay the debt in time, and the borrower also clearly understands this potential risk when lending funds.

Arbitrage trading across DEXs:

It is also a transaction to extract MEV based on the "follow-up" strategy. When a user completes a transaction in DEX, due to the existence of slippage, there may be a price difference between the same token in different DEXs. MEV seekers can make a profit by buying in a low-priced DEX and selling in a high-priced DEX through an arbitrage transaction.

Sandwich attack:

This is a transaction that extracts MEV based on a "front-running" strategy. When the MEV searcher monitors that the user's transaction on the DEX has not been packaged and confirmed, it inserts a transaction before the user's transaction, causing the user's slippage to increase and the execution price to deteriorate. It then inserts another transaction in the opposite direction after the user's transaction, profiting from the user's additional slippage loss.

Although the sandwich attack itself is also an arbitrage transaction, its profit comes from the loss of ordinary users. It makes profits at the expense of other users and is considered harmful.

Most MEVs generated based on the “follow-up” strategy are considered beneficial or neutral, because these transactions will not affect any transactions before them, will not harm the legitimate interests of other users, and some strategies are also beneficial to the stability of the DeFi system; while most MEVs generated based on the “preemptive” strategy are considered harmful, because the benefits of these transactions are often based on putting other users at a disadvantage.

 

4. What problems did the MEV track project solve? What problems did it leave behind?

 

When it comes to transaction sorting, there will be opportunities to extract MEV, and MEV is almost unavoidable. In this context, projects under the MEV track are committed to solving two problems:

1. How to prevent harmful MEV? 2. How to fairly distribute beneficial and neutral MEV?

The current solution is:

Regarding the issue of “prevention”:

The project provides users with private RPC and promises that transactions broadcast through the RPC will not be front-run. For example, Flashbots Protect and OpenMEV, which provides services for Sushi Guard.

In practice, private RPC will aggregate users' transactions into a "private order flow" and broadcast it to specific MEV searchers and block builders. The condition for enjoying the "private order flow" is to comply with the abandonment of the MEV extraction method based on the "front-running" strategy, otherwise they will be kicked out of the whitelist.

(Figure 4: Current solutions of MEV)

Regarding the "allocation" issue:

MEV-Boost creates an off-chain MEV opportunity auction market, where MEV searchers, block builders, and block proposers each perform their duties and share MEV profits together. MEV searchers compete in hardware and algorithms to find opportunities to extract MEV within a limited time, and need to give up enough profits (pay the highest Gas Fee); block builders compete in order flow resources, so that the blocks they build can contain higher execution layer rewards, which are more likely to be accepted by block proposers; block proposers have the right to propose new blocks and can decide which transactions are packaged on the chain, but they may not have as strong MEV extraction capabilities as MEV searchers, nor may they have as rich order flow resources as block builders. Instead of only building blocks through the memory pool itself, it is better to connect to MEV-Boost, "listen" to the plans of block builders, and obtain higher execution layer rewards.

The remaining questions are:

The private RPC scheme is based on the trust assumption, and users' transactions may still be leaked, front-run, or even censored. Private RPC brings private order flow, and the monopoly of some block builders on private order flow will make MEV extraction more opaque and centralized. In the MEV-Boost distribution scheme, the interests of users are not fully taken care of, and users do not get any benefits from MEV extraction.

5. Where are the directions for improvement?

To solve the "jumping the gun" problem, we should use encryption technology. Based on "encryption-sorting-decryption-execution", the user's transaction is encrypted locally, the sorting consensus is completed without anyone reading the transaction content, and then the content is decrypted, and finally the transaction is executed according to the consensus order. This solution not only breaks the trust assumption, but also no longer requires private order flow.

To achieve a fairer distribution, the MEV profits that users deserve should be returned. As users create opportunities for MEV extraction, it is only the most basic thing to protect their legitimate interests from being infringed. It should not only protect their transactions from being preempted, but also return part of the MEV profits.