Written by: helloyyy

I. Introduction

Time flies. According to Optimism, it has been more than a year since the currency was issued. According to Arbitrum, it has been nearly half a year. The currency issuance is only the first step in their long journey. During this period, Optimism implemented the Bedrock upgrade and launched a common module. L2 stack OP Stack, based on which Star Rollup such as Base was born; Arbitrum is committed to exploring L3 to promote the application of Arbitrum Orbit.

Under the leadership of these two giants, the TVL of the entire Rollup track once exceeded US$10 billion and is currently stable at around US$10 billion. Although Rollup is highly talked about as Ethereum’s “signature” expansion solution, they still have non-censorship-resistant and centralized attributes. Mainstream Rollup chains generally run centralized sorters officially. Although Rollup projects such as Arbitrum, Optimism, and StarkNet have included the decentralization of sorters in their roadmaps, they have not been implemented in the short to medium term. As the most important piece of the decentralized puzzle of Rollup, the decentralized sorter has a very important strategic position for Rollup itself and is also what the people want.

2. Rollup transaction fees

Before understanding what a sequencer is, let’s first talk about the composition of Rollup transaction fees. The transaction fee of Rollup is the gas fee incurred by users in L2 transactions such as Arbitrum.

Mainly consists of 2 parts:

1) L2 execution fee

2) L1 data charges

L2 execution fee: The cost of executing a transaction on L2 (each transaction initiated on the L2 chain requires an execution fee)

Transaction gas price = L2 basic fee + L2 priority fee

L2 execution fee = transaction gas price * L2 gas usage

L1 Data Charge: The cost of publishing L2 transactions to L1. Typically, L1 data charges are higher than L2 execution charges.

L2 transaction fee = L2 execution fee + L1 data fee

Sorter’s net revenue = L2 transaction fee revenue – Sorter operating cost – L1 data fee

The centralized sorter operated by the project party has a certain degree of pricing power (for example, the L2 execution fee is charged higher, the L1 data fee is charged higher), which is why several well-known Rollup project parties make a lot of money.

What is a sorter?

The sequencer, as the name suggests, is the role responsible for transaction sorting. In the Bitcoin network, the responsibility for transaction ordering is the responsibility of miners; in Ethereum, it is the responsibility of a collection of nodes. None of them have fixed roles, but more consensus mechanisms to determine who has the right to participate in sequential execution.

Currently, mainstream Rollups all run a centralized single sorter. The user's transactions in L2 enter the mem pool (the transactions in the mem pool are in an unordered state at this time). The sorter sorts and compresses the transactions into a set of ordered batches, and then sends them to the DA layer of Ethereum.

Does Rollup require a sorter?

the answer is negative. Transactions on Rollup can completely bypass the sorter and be submitted to the L1 base layer. L1 is responsible for sorting and settlement, but it will also face higher gas consumption and longer transaction confirmation time.

The rollup sequencer is similar to using a "fast lane" to compress and aggregate hundreds or thousands of L2 transactions into a single L1 transaction, thus greatly reducing gas costs. This is also the reason why the current mainstream Rollups run centralized sorters, providing users with lower gas and faster transaction confirmation, thereby improving user transaction experience.

3. Centralized sorter vs. decentralized sorter

Centralization!

The advantages of centralization are very obvious. You can sort transactions however you want. There is no need to change people to sort, and there is no need to reach a consensus on the sorting results. This means that it has a very fast transaction confirmation speed and a better user experience; but centralization also gives the sorter great autonomy in sorting transactions, and it can sort transactions at will to maximize its own arbitrage Opportunities to capture MEV value, delay user transactions or even completely censor users.

The sequencer can capture the MEV value by changing the order of transactions within a single block; what is more harmful is that because the sequencer controls the ordering of multiple consecutive blocks, it is easy to execute cross-block MEV, resulting in a larger-scale attack. .

The above situations are all caused by the sorter taking the initiative to do evil. Some errors are not intentional by the sorter, but they still damage the user's experience and rights. For example, if the sequencer accidentally re-includes a spent token transaction in the soft commitment and then sends it to L1 for verification, there may be a situation where the transaction cannot be confirmed for a long time; another example is if a single sequencer goes offline , causing the second layer to be unable to produce blocks normally and the network to be down for a long time.

You can't have your cake and eat it too, but optimizing Rollup performance must not come at the expense of decentralization and censorship resistance.

Decentralization?

If centralization is 1, then decentralization is many. The implementation paths of different decentralized sorter solutions are different, but their core concept is the same, which is decentralization.

The sorter no longer has the central authority to sort transactions. The role responsible for sorting is selected from a set of sorters based on a specific election mechanism and rotates at a fixed period.

Decentralization prevents sequencers from continuously grabbing MEV, and also prevents a single sequencer from reviewing user transactions. Coupled with the corresponding punishment mechanism for evildoing, it can also effectively regulate the behavior of the sequencer.

4. Overview of the decentralized sorter track

After wandering around for so long, I finally got to the point. One decentralized sorter is made by the Rollup project itself, and the other is implemented with the help of a third party. Using a third party to implement a decentralized sequencer can actually be called Sequencing-as-a-Service.

Projects such as Espresso, Astria, SUAVE, Radius, etc. all focus on decentralized sorter solutions, and their implementation paths are different.

1. Espresso

Espresso Systems was an early service provider focusing on privacy solutions. In March 2022, it announced that it had received nearly US$30 million in Series A financing from Electric Capital, Sequoia, and Blockchain Capital. Espresso Systems is currently basically transforming into Espresso Sequencer, which specializes in providing decentralized sequencer services for Rollup.

Under the sorting mechanism of Espresso sorter, the life cycle of L2 transactions is generally as follows:

1) User transactions on the second layer are sent to the Rollup server (API);

2) The transaction enters the mem pool, and the sorter (elected through HotShot consensus) sorts the transaction and includes it in a block;

3) The sequencer broadcasts the transaction, and after other nodes reach HotShot consensus, the block is generated and the transaction is executed; soft commitment provides fast transaction confirmation;

4) The sequencer sends the block commitment containing the transaction with the consensus certificate (QC: Quorum Certificate) and stores it in the L1 sequencer contract (proving that the block reaches soft finality through consensus);

5) The Rollup node that has executed the block sends the new Rollup state to L1 (at this time, zkRU needs to be accompanied by a validity certificate, and ORU opens the challenge period);

6) The L1 Rollup contract checks the validity of the status update by verifying the QC sent by the sequencer contract.

This process seems obscure and difficult to understand, but the simple understanding is:

HotShot consensus selects one of a group of sequencers, which is responsible for sorting Rollup transactions and including the transactions in a block; this block must be signed by other Rollup nodes to reach consensus (more than 2/3 HotShot nodes Agree) is "final", and then the relevant block commitment and new Rollup state root are submitted to the L1 base layer for verification.

The "finality" above is in quotation marks. The "finality" with quotation marks and the finality without quotation marks are not the same concept. The "finality" in quotation marks is to allow Rollup transactions to be confirmed faster, with less delay and better user experience; however, Rollup transactions ultimately require the L1 base layer for verification (zkRU needs to verify the validity certificate, ORU needs Waiting for the end of the challenge period) and verifying that there is no problem with the transaction submitted by Rollup, only then will the Rollup transaction become truly final.

This means that if the L1 base layer verification transaction is invalid, the related L2 block that has been produced will face rollback. Therefore, "finality" is to allow transactions to be confirmed quickly, and finality is to inherit the security of Ethereum.

Espresso + EigenLayer

Espresso solves the problem of sorter rotation and the determination of transaction "finality" based on HotShot consensus, and solves the issue of sorter access by introducing EigenLayer.

EigenLayer's re-pledge mechanism makes it possible for Ethereum stakers to simultaneously become Espresso sequencers, providing security for the HotShot consensus. In short, Ethereum node pledgers can become Espresso Sequencers (ESQ) through EigenLayer's re-pledge mechanism. Ethereum pledgers not only gain PoS node income, but also capture the value of the second-layer MEV.

The potential income of ETH holders = node rewards of the native network + L2 EVM + node rewards of other PoS chains (using the EigenLayer re-pledge mechanism). The triple buff greatly empowers ETH.

Espresso is a general-purpose decentralized sorter solution. In addition to EigenLayer, Espresso's ecological cooperation projects also include Arbitrum, OP Stack, Caldera, AltLayer and other star modular projects.

2. Astria

Astria is positioned as a universal, permissionless decentralized sorter, providing out-of-the-box shared sorter services for different Rollups. In terms of financing, Astria announced in April 2023 that it had completed a US$5.5 million seed round of financing led by Maven 11, with participating investment institutions including 1k(x), Delphi Digital, Lemniscap, Robot Ventures, etc. Although the financing scale is small, the institutional lineup is very gorgeous.

Operating mechanism

The operating mechanism of Astria's decentralized sequencer is similar to that of Espresso Sequencer. The purpose is to weaken the privileges of the sequencer by decentralizing transaction sequencing rights. Specifically:

For sequencer rotation, Astria proposes two rotation mechanisms: simple leader rotation (Leader Rotation) and Byzantine Fault Tolerance (BFT) consensus algorithm.

1) Leader rotation

A set is formed through elected sorters, and the set of sorters takes turns sorting Rollup transactions. This method prevents a single sorter from monopolizing the sorting rights of transactions for a long time, and solves the problem of continuous censorship of users to a certain extent.

2) BFT consensus algorithm

Similar to the leader rotation mechanism, the sequencer on its turn has the right to be responsible for transaction sorting, but 2/3 or more of the members in the sorter set must reach a consensus on this sorting.

Both methods have their own advantages and disadvantages: the former has faster transaction confirmation, rapid block generation, and efficiency close to that of a centralized sequencer. But the trade-off is that it is still difficult to constrain the sequencers in their turn not to do evil; the probability of doing evil is even smaller using BFT consensus, and 2/3 of the sequencers in the set need to vote to reach a consensus before a block can be produced. However, it takes a certain amount of time to conduct consensus voting, causing network delay problems.

3. SUAVE

SUAVE is a decentralized, plug-and-play shared sorter solution built by Flashbots. As a general-purpose solution, SUAVE can provide memory pools and decentralized block construction for any L1/L2. The difference between SUAVE and the aforementioned shared sequencer design is that the SUAVE Chain itself is an EVM-compatible chain that implements transaction ordering through block "bidding".

SUAVE architecture

SUAVE's architecture consists of 3 core components: universal preference environment, best execution market and decentralized block construction.

1) Preferred environment

Preferences cover a wide range, from simple transactions to complex events. User preferences are reflected in the mempool in the form of transactions, and the preference environment serves as a public mempool to bring preferences together. The universal preference environment provided by SUAVE makes multi-chain user preferences open and transparent, eliminating information gaps and solving the problem of cross-chain MEV to a certain extent.

2) Execution market

The execution market is a network of participants who listen to the SUAVE memepool and compete with each other, with competition driving them to provide the best execution for user preferences. It can be understood that all executors realize the user's preferences through "bidding" and return as much MEV generated by user transactions to the user as possible.

3) Decentralized block construction

Finally, based on the collected preferences and optimal execution paths, the decentralized block building network includes them in blocks. At this point, the entire process of transaction discovery, transaction sorting, and block creation is realized.

4.Radius

Radius is positioned as a trustless shared ordering layer. Different from the implementation mechanisms of the previous solutions, Radius ensures that Rollup transactions are ordered without trust by enabling an encrypted mempool, thus eliminating effective MEV and user transaction review.

In terms of financing, Radius announced in June 2023 the completion of a $1.7 million pre-seed round of financing led by Hashed, with participation from Superscrypt, LambdaClass and Crypto.com.

Decentralized orderers based on consensus mechanisms such as Espresso and Astria reduce MEV and censorship risks to a certain extent, but at the expense of network scalability and time efficiency, they bring a certain transaction confirmation delay (need to confirm the transaction order to reach consensus). In addition, although transaction sorting is in a decentralized environment, since the relevant transactions of mempool are transparent, the sorter still has room for evil to seize MEV. Radius encrypts mempool, and the relevant transaction information is invisible to the sorter, aiming to Kill the problem of sequencers maliciously grabbing MEV and censoring transactions at the source.

Technology Architecture

The Radius technology architecture can be divided into the following four functional layers: sorting layer (Radius), execution layer (Rollup), settlement layer and data availability layer.

1) Sorting layer

1. The user submits encrypted transactions and certificates to the sequencer;

2. The sequencer verifies the proof and validates the transaction;

3. The sequencer sorts the transactions, and the transactions cannot be decrypted before that;

4. The sorter builds a block;

5. The sorter submits the block to Rollup for execution.

2) Execution layer

1. Rollup receives blocks from the sequencer and executes transactions in the order provided;

2. Rollup submits the transaction status and status certificate to the settlement layer.

3) Settlement layer

1. The settlement layer receives the status and status certificate from Rollup, and is responsible for verifying the certificate and determining the finality of the transaction;

2. The sequencing layer verifies that the execution matches the order.

4) Data availability layer

The data availability layer stores data and ensures that the data is available.

Encryption mechanism of mempool - PVDE

Radius uses a zero-knowledge proof-based encryption scheme called Practical Verifiable Delayed Encryption (PVDE) to create an encrypted mempool.

The specific process is as follows:

When a user submits a transaction to the sequencer:

1. The user generates a time lock puzzle and a symmetric key;

2. The user uses a symmetric key to encrypt the transaction, and the encrypted transaction enters the mempool;

3. The sequencer sorts encrypted transactions, and the sequencer needs to unlock the time lock puzzle to obtain the decryption key;

4. The sequencer calculates the order commitment before unlocking the time lock puzzle and submits the commitment to the settlement layer (used to verify that the sequencer submitted the transaction to the Rollup in order).

Decentralized solution for sorters

The encrypted mempool ensures that the sequencer is trustless, but the risk of a single point of failure still exists. If running a single sorter + encrypted mempool, a sorter failure will cause network downtime. In order to solve this problem, Radius has proposed a variety of decentralized sorter implementation solutions, including secret leader election mechanisms, sorter group sharding mechanisms, etc.

Of course, Radius can also choose to refer to the sorter rotation mechanism of Espresso and Astria, while achieving decentralized and trustless transaction sorting.

Block space optimization

Through block space optimization, Radius aims to achieve the goal of both protecting users and maximizing Rollup profits. Rollup uses a first-come-first-served (FCFS) sorting mechanism. The advantage is that it can effectively prevent MEV, but the disadvantage is that it must sacrifice the potential profits of the block space auction.

In order to solve the above dilemma of transaction ordering, Radius divides the block space into 2 parts: top block space and bottom block space:

The top block space is dedicated to user transactions, encrypting user transactions and eliminating transaction ordering manipulation, thus protecting users from harmful MEV and censorship risks; the bottom block introduces an auction-based trading market where arbitrageurs can bundle transactions and their The bids are submitted to the sorter, which selects the bundled transaction with the highest bid to be included in the block. This method can maximize Rollup profits.

The above is the current mainstream universal decentralized sorter solution. For Rollup, are you faced with running a centralized sorter or a decentralized sorter? Integrate a third-party universal sorter solution or implement decentralization yourself? Which technical implementation solution is used to achieve decentralization of transaction ordering? Weigh the pros and cons in multiple dimensions.

5. Game between Rollups

Tradeoff 1: Is it decentralized?

Several mainstream Rollups, such as Optimism, Arbitrum, zkSync, and Base, make a lot of money by running centralized sorters. Decentralizing the power of transaction sorting will inevitably involve profit sharing. Without taking into account the increasingly fierce competition on the Rollup track, no one is willing to give away this sweet and sour cake. But assuming that Rollup is the first to launch a decentralized sorter, this may be a huge traffic entrance and form a demonstration effect in the Rollup subdivision track, thus forcing other Rollup projects to decentralize their sorters.

Trade-off 2: Integrating generic third-party vs. in-house proprietary solutions

Generally speaking, there are two ways for a sorter to achieve decentralization: one is to take what others have done and use it; the other is to do it yourself. Third parties such as Espresso and Astria can provide Rollup with out-of-the-box decentralized sorter services, so Rollup itself can continue to focus on product differentiation and optimized performance, improving its core competitiveness; in addition, integrating common classes The decentralized sorter solution is also more conducive to interoperability, bringing more possibilities including cross-rollup arbitrage. The disadvantage of this solution may be that it cannot effectively empower the native token of Rollup itself.

If Rollup uses an in-house dedicated solution to implement a decentralized sorter, this is the most time-consuming and expensive solution, but it is indeed the most effective way to empower Rollup's native token. For example, the StarkNet project party can require users to pledge the native tokens of the protocol to become a sorter set to participate in Rollup transaction sorting, and charge a certain service fee to achieve value accumulation.

Trade-off 3: Which technical implementation should be used to achieve decentralized sorting?

As mentioned before, there are many technical implementation solutions to achieve decentralized transaction ordering, including but not limited to solutions based on different consensus mechanisms, FCFS, block bidding, encrypted mempool, etc. Each technical implementation solution has its own advantages and disadvantages: consensus-based mechanism will be limited by time efficiency, encrypted mempool cannot maximize Rollup profits, etc. Of course, you can also refer to Astria to integrate two different technical implementation solutions. The trade-offs between various technical implementations are something that all Rollup projects need to consider carefully.

write at the end

Although Optimism and Arbitrum, the current leaders in the Rollup track, have issued coins, this may be just a starting point, and the real competition may have just begun. At least judging from the current trends, decentralized sorters must be a battleground for military strategists.

The zk series Rollup project is also quietly emerging. In an increasingly competitive environment, one wrong step may cause irreparable losses. But in the face of innovations that affect the life and death of projects, Rollups have no choice but to follow the general trend.