CoinEx Research releases an interesting Study on Risks of the Sequencer

CoinEx Research: A Study on Risks of the Sequencer New Delhi (India), December 25: If you already know something about why sequencers exist, please skip to the second part of the article. Let’s start with the Layer-1 scaling According to the impossible triangle of blockchain, it is necessary to process multiple nodes, broadcast transactions, and [...]

CoinEx Research releases an interesting Study on Risks of the Sequencer
CoinEx Research releases an interesting Study on Risks of the Sequencer

CoinEx Research: A Study on Risks of the Sequencer

New Delhi (India), December 25: If you already know something about why sequencers exist, please skip to the second part of the article.

Let’s start with the Layer-1 scaling

According to the impossible triangle of blockchain, it is necessary to process multiple nodes, broadcast transactions, and ultimately reach a consensus, which results in a low blockchain but ensures its security. Under this premise, scalability becomes the major challenge.

There are two mainstream scaling solutions available.

Layer-1 Scaling

One well-known project is the EthStorage solution, which is aimed at storage scaling on the native chain.

Layer-2 Scaling

Layer-2 scaling focuses on separating the execution layer and implementing Data Availability (DA) solutions. Common solutions include Rollup (such as Op, Arb, and Scroll) and DA such as Celestia.

By separating Ethereum’s execution layer and processing all transactions in a dedicated environment, independent modules can leverage optimized solutions to further enhance performance. Additionally, the design of Ethereum Layer 2 weakens the solution to the blockchain trilemma. In other words, while scaling its performance, it has also realized security equivalent to that of Ethereum to the greatest extent.

Sequencers are vital to the security of Layer 2. Now, let’s get to know more about Layer-2 sequencers.

About Layer-2 Sequencers

In simple terms, a sequencer is responsible for publishing the state of Layer 2 to participants on Layer 1. Its task also involves determining the canonical order of transactions on Layer 2 and submitting records. Its fees can be earned when users pay for Layer-2 transactions. It should be noted that sequencers do not necessarily exist on Layer 2, and users can choose to submit data independently.

There are two types of sequencers:

  • Centralized sequencers (mainstream one): single and centralized
  • Decentralized sequencers (the focus of the next phase): multi-node and distributed

Sequencers have the following three sources of revenue:

  • Layer-2 gas fees: Similar to gas fees on Ethereum, all transactions executed on Layer 2 require gas and are calculated in the same way.
  • Layer-1 calldata/security fees: To cover the cost of publishing transactions back to Ethereum, sequencers or batch submitters on Layer 2 need gas to pay for this submission process. The cost shared by each user decreases as more users join, which is a major reason behind lower Layer-2 gas fees.
  •  Additional fees: After Ethereum’s EIP-4844 upgrade, a new type of gas will be introduced for the first time. This will enrich the future adjustments to the revenue model.

As mentioned above, sequencers are not mandatory on Layer 2. One primary reason for adopting a sequencer on Layer 2 is to improve the user experience. Specifically, when a reliable, scalable, and cost-effective sequencer is introduced as the transaction layer, users will be able to apply various decentralized applications (dApps) in a safer, more reliable, and more efficient manner. This is conducive to the widespread adoption of Web3 and can minimize user costs.

However, it should be noted that sequencers, especially centralized ones (often operated by the project owner), pose security risks. In the following sections, we will focus on analyzing some risks associated with the two types of sequencers.

Risks and Challenges Faced by Sequencers

Issues Related to Centralized Sequencers

Currently, most Layer-2 solutions rely on centralized sequencers whose risks may come from external attacks and their own vulnerabilities or malicious behaviors driven by economic incentives. The main issues are as follows.

Single Point of Failure (SPOF)

All physical machines are susceptible to failures. While the probability is low, it will extensively affect the huge user base of Layer 2 once it occurs.

Attacks

Any host on the Internet may suffer from various attacks, and single-node sequencers are no exception. If a hacker launches flood attacks or other types of denial-of-service attacks, the single-node sequencer would become unavailable. Compared to attacking multiple machines in a decentralized sequencer, the cost of attacking a single-node sequencer is much higher.

Performance

Both the zk-type and op-type sequencers are inevitably faced with performance issues.

ZK-related Issues:

  • Computational complexity: Utilizing zero-knowledge (ZK) proofs to verify the correctness and validity of transactions requires substantial computational resources and time. This may result in delays in processing transactions and high computational costs. We can only rely on hardware development to address such issues.
  • Verifiable dependency: zk Rollup relies on external entities for contract verification. External contract verification is required to validate the correctness of ZK proofs. This involves the risk of contract attacks.

OP-related Issues:

  • Delay and uncertainty in transactions: While executing transactions, optimistic rollups maintain the optimistic assumption that all transactions are valid and will not result in disputes. However, if there are disputes or invalid transactions, the whole system may need roll-back and re-execution,  leading to a certain level of uncertainty and delay in processing. During the delay, there is also a probability of malicious activities.

Weak Censorship Resistance

Different from the thousands of distributed nodes in Ethereum, centralized sequencers may not guarantee that user transactions will eventually be included on the main chain. Sequencers controlled by different entities may selectively exclude transactions due to relevant policies and laws.

There are also many other mechanisms used to improve censorship resistance, such as forced withdrawal, escape channels, inclusion lists, and threshold encryption. However, weak censorship resistance remains an inevitable issue and also an uncertain risk in future development.

Potential for Bribery

While a single-node sequencer cannot maliciously increase or modify users’ normal transactions, its lack of transparency means that bribery may go unnoticed by users. The results recorded on Layer 2 may not be the same as those recorded simultaneously on Layer 1. During the simultaneous window period, various unexpected events may occur.

MEV

MEV stands for the maximum extractable value of miners. 

Miners (validators or sequencers) can profit from their ability to arbitrarily include, exclude, or reorder transactions from the blocks they produce. MEV is a measure of the profit. Miners must be able to prioritize transactions to protect unauthorized blockchains from spam and DoS attacks. In simple terms, packagers earn money by disrupting the execution of pending transactions. Common methods (employed by sequencer owners or employed in cooperation with third parties) include:

1. DEX arbitrage: Price may vary from one decentralized exchange (DEX) to another. With the atomic transactions of blockchain, one can buy on a DEX with a lower price and sell on another with a higher price, achieving risk-free arbitrage.

2. Lending liquidation: According to the lending protocol, when the collateral ratio falls below a predefined threshold, the protocol typically allows anyone to liquidate the collateral and immediately repay the lender. During liquidation, borrowers often need to pay substantial liquidation fees, part of which goes to the liquidator. It will also present an opportunity for MEV. Sequencer owners or their collaborators can perform liquidations at a lower cost and sell the liquidated assets at a higher price, thus securing profits.

3. Front running: When frontrunners detect a profitable transaction, they submit the same transaction with a higher transaction fee, which allows their submitted transaction to be included in the block prior to the original transaction. By doing so, the frontrunner will gain profits. Front running does not simply mean resubmitting the same transaction. In a broad sense, it involves inserting a transaction before another to gain profits.

4. Back running: For decentralized exchanges (DEXs) adopting the automated market maker (AMM) mechanism, large-scale transactions can result in a significant slippage. After large-scale transactions occur, the market will lose equilibrium. At this point, sequencer owners or their collaborators can add transactions to buy assets at a price below the market equilibrium price.

5. Sandwich trading: Sandwich trading is a mixture of both Front Running and Back Running. Specifically, sequencer owners or their collaborators can buy at a low price before a large-scale transaction. When the large-scale transaction drives up the price, they sell at a high price to secure substantial profits.

In the context of sequencer centralization, sequencer owners can easily manipulate the logic to maximize their profits. The first two MEVs can provide liquidity for the market and help it rapidly return to equilibrium. However, the latter two malicious MEVs come at the expense of user interests. Front running and sandwich trading can lead to a poor user experience and more serious losses. Competitive MEV searchers engaging in gas auctions will cause negative impacts, such as network congestion and higher gas fees.

In summary, all security measures are underpinned by trust in centralized sequencers (typically those operated by project owners), which obviously goes against the spirit of Web3. Therefore, the industry is actively exploring and advancing shared sequencers to reduce reliance on trust.

Challenges Faced by Shared Sequencers

First of all, let’s have a look at how shared sequencers work. As a modular component of blockchains, shared sequencers are responsible for ordering transactions without executing them. This separates the original tasks of ordering, executing, and proving transactions and forms independent sequencing layers, thus reducing the coupling degree. Besides, nodes no longer need to store the full state of all different rollups, and some bottlenecks related to single-node sequencers have been overcome.

This process is briefly described as follows:

  • Users submit transactions to the sequencing layer.
  • The sequencing layer orders transactions and constructs blocks.
  • The block is submitted to the aggregator.
  • The rollup executes transactions in the order provided by the sequencing layer.
  • Finally, the rollup submits transactions to the settlement layer or the Data Availability (DA) layer for final confirmation.

In essence, transitioning from a centralized sequencer to a decentralized shared sequencer can be realized by multiple rollups choosing to use one sequencer. The interoperability and compatibility between different rollups should be also addressed.

Several challenges exist in promoting shared sequencers:

  1. Trade-off by the project owner

If a shared sequencer is used by multiple Layer-2 chains, it means that the project owner has to give up a large portion of the revenue. This is why many project owners have been reluctant to promote the decentralization of sequencers despite their commitment to doing so. Facing the fierce competition in the Layer-2 ecosystem, project owners also need the profits earned from sequencers to sustain their project ecosystems.

2. Compromise in user experience

According to the impossible triangle of blockchain, security and decentralization will improve at the expense of scalability, leading to issues like transaction delays and lower TPS (transactions per second). This also results in some differences in user experience compared to centralization.

3.Greater reliance on resources

It is no longer an unregulated industry. The development of all projects relies on the integration and coordination of various resources. With the implementation of decentralized sequencers, different rollups need to integrate. Without a powerful background and the ability to integrate resources, it can be challenging for other rollups to integrate. The project owner must have the ability to solve various problems such as profit distribution, unified interface protocols, content consistency, and cross-chain coordination.

4. Challenges in rollup compatibility

When different rollups are connected with a shared sequencer, they all need to adapt to corresponding protocols. However, different rollups have different protocols, which will present numerous technical challenges.

In summary, the development of shared sequencers has been sluggish because all stakeholders have not yet reached a consensus on issues such as interests and development goals.

Conclusion

The key to promoting decentralized sequencers lies in preventing user transactions from being censored, minimizing malicious MEVs, and enhancing ecosystem activity by changing the revenue model while maintaining project profitability. As the ecosystem evolves, the promotion of shared sequencers is expected to accelerate. Let’s look forward to a more prosperous ecosystem. In this article, we have discussed in detail some risks associated with centralized and decentralized sequencers. We also hope to inspire more discussions on sequencers and jointly facilitate the development of the industry.

About CoinEx

Established in 2017, CoinEx is a global cryptocurrency exchange committed to making trading easier. The platform provides a range of services, including spot and margin trading, futures, swaps, automated market maker (AMM), and financial management services for over 5 million users across 200+ countries and regions. Since its establishment, CoinEx has steadfastly adhered to a “user-first” service principle. With the sincere intention of nurturing an equitable, respectful and secure crypto trading environment, CoinEx enables individuals with varying levels of experience to effortlessly access the world of cryptocurrency by offering easy-to-use products.

If you have any objection to this press release content, kindly contact pr.error.rectification@gmail.com to notify us. We will respond and rectify the situation in the next 24 hours.