Original article: "A&T View: Current Status, Problems and Improvements of Ethereum MEV Extraction Mechanism"

Author: Liam

01 Overview

TLS;DR

MEV refers to the economic benefits brought to the subject who designs this sequence by executing N transactions in a certain 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 was dominated by the MEV-Boost system proposed by Flashbots. MEV profits flowed to four types of subjects, MEV searchers, block builders, block proposers, and the Ethereum network itself. From the consequences of MEV for 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 to be solved by projects under the MEV track. Existing private RPC solutions are based on trust assumptions. Users' transactions may still be leaked, preempted, or even censored, and the monopoly of some block builders on private order flows will make MEV extraction more opaque and centralized. The MEV profit distribution plan of the MEV-Boost system does not take into account the interests of users. As the role of creating MEV extraction opportunities, it is only the most basic to protect the legitimate interests of users from being infringed. It should not only protect their transactions from being rushed, but also return part of the MEV profits. To solve the "rushing" 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, and then 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." 02 Text ‍1. What 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 entity that designs 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 statistics from mevboost.pics, since November 2022, about 90% of the blocks have been produced by the MEV-Boost system.

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:

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 in the Ethereum network, visible to anyone, storing transactions to be packaged and put on the chain. Private order flow: A trusted privacy transaction pool, open only to specific MEV seekers or block builders, and also storing 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 seeker: Continuously listens to transactions that have been broadcast by users but not yet packaged, searches for MEV opportunities, and packages the user's transactions and transactions that can extract MEV into a set of transaction packages (Bundles) in a certain order, and sends them to the block builder. Block builder: Select a series of transactions from the transactions it can receive, package them into a new block, and send them to the relay. The transaction sources include Mempool, Bundles submitted by MEV seekers, and private order flows. Relay: Select the one that pays the highest fee from the blocks it can receive and send 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: Select the most advantageous block from the blocks it can receive and propose 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 that extract MEV are executed to generate revenue for the MEV searchers who create 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).

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 transaction bundles submitted by MEV searchers minus the Gas cost of the transaction bundles".

For block builders, MEV profit is reflected as "execution layer revenue from blocks submitted by block builders minus fees paid to block proposers."

For block proposers, MEV profits are reflected as “fees from block builders paid.”

For the Ethereum network, MEV profits are 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 MEVs?

2. How to fairly distribute beneficial and neutral MEV?

The current solution is:

Regarding the issue of “prevention”:

The project provides users with private RPCs and promises that transactions broadcast through the RPCs will not be front-run. For example, Flashbots Protect and OpenMEV, which provides services for Sushi Guard. In practice, private RPCs aggregate users' transactions into "private order flows" and broadcast them to specific MEV searchers and block builders. The condition for enjoying "private order flows" is to comply with the MEV extraction method based on the "front-running" strategy, otherwise you will be kicked out of the whitelist.

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, preempted, 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. What is the direction of improvement? To solve the problem of "jumping the gun", 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, 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 profit that users deserve should be returned. As the role of creating MEV extraction opportunities, it is only the most basic to protect the legitimate interests of users from being violated. It should not only protect their transactions from being preempted, but also return part of the MEV profit.