Analysis of MEV prevention technology of Layer2 Rollup scheme

This week, we will further explore the MEV prevention problems of Rollup on Layer 2 from a technical perspective.

The fairness, transparency, and verifiability of the blockchain are the basis for its widespread trust. However, such characteristics also bring a lot of trouble to the entire ecology. Among them, MEV (miner extractable value/maximum extractable value) is the hidden dark forest. It may be behind every transaction. In the DeFi field, MEVs are usually divided into three categories:

  1. Benign MEV mainly occurs in arbitrage trading and clearing. In arbitrage trading, for example, a user initiates a large amount of transaction, which creates a certain amount of arbitrage space. At this time, the arbitrage robot conducts an arbitrage transaction and pulls the price to a normal level. In the process, the robot obtains profits from it. , But the interests of users have not been harmed; in the liquidation business, when the value of the collateral decreases, if the difference is not made up or the asset is sold, liquidation will be triggered, and the liquidator can obtain collateral at a price 3%-5% lower than the market price assets.
  2. Bad MEV mainly occurs in sandwich trading and robot arbitrage. In a sandwich transaction, for example, a user wants to initiate a 1000 A token exchange for 1000 B tokens. After the robot listens to the transaction, the robot initiates the same transaction, so that the user may only exchange 980 B tokens. , And then the robot converts 980 B tokens to 1020 A tokens to earn the difference; in the preemptive transaction, the arbitrage robot sees the arbitrage transaction and submits it with a higher fee, thereby preempting the transaction to obtain the difference.
  3. Catastrophic MEV refers to threats and damages to the blockchain consensus. In the case where the block reward is much smaller than the MEV reward, miners are likely to obtain MEV profits under the condition of harming the consensus, thereby destroying the blockchain consensus.

There are many solutions to alleviate MEV. In the previous section, we mentioned the solution to embrace MEV and eliminate MEV. However, in the Layer 2 solution, how do mainstream projects solve the MEV problem? We focus on the anti-MEV solution used by Optimism and Arbitrum .

Optimism Rollup-MEVA solution

The MEVA (MEV Auction) program was first proposed by Karl Floersch in early 2020. Coincidentally, Karl Floersch is also the CTO of optimism.

The basic idea of ​​MEVA is to split the two core powers of miners, namely mining and sequencing. The miner (Validator) still retains the original mining power, or trading decision power. But once the transaction is confirmed, it cannot be sorted, and the sorting power is determined by the sequencer.

In essence, MEVA’s concept is: instead of eliminating MEV, it is better to auction the power of sorting transactions, allowing the winners in the auction to sort transactions arbitrarily to obtain the maximum benefit. This measure can reduce network congestion caused by bidding to some extent, but it cannot avoid the losses caused by bad MEV to users and even the network.

Analysis of MEV prevention technology of Layer2 Rollup scheme

Why does this MEVA solution bring losses to users and even threaten network security?

Let us think about a question, what are the reasons for miners to join the network for mining? Of course it is for profit. Then when the income decreases, the ROI decreases, the number of miners will also decrease, the number of participants will decrease, the security of the blockchain network will become weaker, and the value of the entire blockchain network will fall. So, no matter what, we need to assume that the miner’s income remains unchanged.

Assume that miners can harvest N coins in each block, including mining rewards, transaction fees, and MEV. Also assume that the value of MEV in each block is M coins. So in order to keep the miners’ income unchanged, we have the following options:

  1. Give the MEV value of M coins to others, and let ordinary users pay N coins to miners;

  2. Leave the MEV value of M coins to miners, and let ordinary users pay NM coins to miners.

The first scheme is the auction scheme, and the second scheme is the ordinary scheme. For the auction scheme, ordinary users need to bear the MEV losses they should not bear to make up for the missing coins of the miners. And the proceeds of these M coins are only given to a very “rich” auctioneer. The MEVA proposal proposes to auction the right to sort transactions for a whole day at a time. This gives the winner absolute monopoly sorting power. The winner has huge power to postpone, reorganize and review transactions arbitrarily within such a time window. This more centralized control will make the network suffer unpredictable losses.

Arbitrum Rollup-FSS solution

FSS (Fair Sequencing Service) is a MEV prevention solution proposed by Chainlink. In short, FSS allows users to first send transactions to a dedicated smart contract SCON. Oracle Network observes these transactions in the memory pool, sorts them according to their arrival time in the memory pool (or other specific order), and then forwards them to SCON after the sorting is completed, as shown in the following figure.

Analysis of MEV prevention technology of Layer2 Rollup scheme

Specifically, how to achieve the fairness of sorting first? Research on the Byzantine fault tolerance consensus has been going on for decades, but it seems that everyone has ignored the issue of “sequencing fairness”. Kelkar et al. recently added the dimension of “ranking fairness” to consensus for the first time in their research. The general goal is: if most nodes receive transaction T1 first, then transaction T2. Then the transaction T1 cannot be ranked behind T2, this kind of agreement is called Aequitas. At present, the operation cost of this agreement is very high. But the future has very great practical value. FSS supports Aequitas when performing transaction sequencing. Of course, it can also support simpler solutions. For example, it can directly encrypt transactions, and nodes can use threshold signatures to decrypt them only after sorting.

What is the life cycle of transactions in the FSS framework? First, the user needs to send the transaction to the memory pool of the SCON contract, and then the oracle replaces the SCON contract to obtain the data in the transaction pool, and sorts the transaction according to the time when the transaction reaches the memory pool, and finally sends it to the SCON contract in order. The advantages of this scheme are as follows:

  • High compatibility: users do not need to adapt to the oracle network, and can be directly transmitted to the blockchain node

  • Low gas fee: the oracle network can package and send transactions to the blockchain in batches, users do not need to log on the chain separately, and the gas fee is lower

But Arbitrum still needs to rely on the external Oracle Network to provide services, and the incentive plan of Oracle Network is uncertain.

EigenNetwork——TEE solution

EigenNetwork has made double guarantees on alleviating MEV problems from the aspects of fair sequencer and privacy mempool.

Eigen Network also relies on Layer2 Sequencer to complete the sequencing, but unlike other solutions, Eigen Network puts the Sequencer in EigenTEE in the Eigen Node for execution, which requires all sequencers to be set in accordance with the given sequencing code. Sequence, the process of sequencing is not allowed to be changed arbitrarily. Once the sequencer publishes batch transactions to Layer 1, the transaction sequence is confirmed, which is the fair sequencer of Eigen Network.

Analysis of MEV prevention technology of Layer2 Rollup scheme

At the same time, Eigen Network supports encrypted rebroadcasting of transactions to ensure the privacy of the mempool, and Sequencer cannot directly obtain MEV information. Users can use appropriate solutions as needed.

EigenNetwork’s anti-MEV solution mitigates MEV to some extent at the lowest cost. It does not introduce risky MEVA solutions or use complex Oracle Network solutions. Instead, it integrates Sequencer naturally into Eigen Node, which is the simplest And one of the reliable ways.

Eigen Network is the first end-to-end private computing network on Layer 2.

Based on TEE and other privacy computing technologies and the unlimited expansion of Layer2 computing power, Eigen can solve two problems currently faced: 1) the problem of on-chain data privacy leakage caused by the openness of the natural data of the blockchain; 2) the insufficient scalability of ETH The problem of high fees. In addition, Eigen will also reform the existing production relationship of data asset circulation on the chain, considering the privacy protection of individuals from application scenarios to technology stacks, and become a developer-friendly and practical privacy protection infrastructure for Web2 to Web3. Contribute to conversion.

Posted by:CoinYuppie,Reprinted with attribution to:
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (1)
Donate Buy me a coffee Buy me a coffee
Previous 2021-10-30 03:58
Next 2021-10-30 04:00

Related articles