Understanding Layer 2 sequencers


In the world of blockchain technology, Layer 2 (L2) solutions are becoming increasingly popular for scaling decentralized applications (dApps). One of the core components of an L2 system is the sequencer. In this blog we try to explore the role of sequencers in L2 networks, types, advantages and challenges.
1. What Are Sequencers?
Sequencers are responsible for determining the order of transactions (tx) in a Layer 2 blockchain before they are committed to the Layer 1 (L1) blockchain. The sequencing of transactions is essential because it prevents conflicts, maintains data integrity, and ensures that the blockchain's state remains accurate.
When users submit transactions on an L2 network, these transactions initially stay in a mempool. The sequencer reads these transactions, executes them, batches them together, and then sends the bundled transactions to the Layer 1 blockchain for finality.
2. Types of Sequencers
Sequencers can be categorized into three types based on their architecture and operation:
Centralized Sequencers
Decentralized Sequencers
Shared Sequencers
Centralized Sequencers
Centralized sequencers are currently the most common type used by popular L2 networks such as Optimism, Arbitrum, Linea, and Base.
Why are they popular?
Performance: Centralized sequencers provide better performance because they process transactions in-house, leading to faster execution and lower latency.
Higher Validity: Since the sequencer controls the entire transaction processing flow, the likelihood of invalid transactions is reduced, making the system more efficient.
How do they work?
- Transactions are processed internally by the sequencer, which results in faster batch processing and quicker withdrawals to Layer 1. This is crucial for users who prioritize speed and performance.
Drawbacks:
Centralized Control: The major downside is centralization, which creates a single point of failure. This undermines the decentralized nature of blockchain technology and exposes the system to risks such as censorship and manipulation.
Lack of Cross-Chain Interoperability: Each Layer 2 solution with a centralized sequencer can only process transactions for that specific chain, limiting interoperability with other Layer 2 solutions and Layer 1 networks.
Decentralized Sequencers
Decentralized sequencers offer the opposite of centralized sequencers. They are more aligned with the core values of decentralization but come with their own set of trade-offs.
Benefits:
- Decentralization: The key advantage of decentralized sequencers is that they eliminate the single point of failure inherent in centralized systems. This enhances the security and censorship resistance of the network.
Drawbacks:
Performance Issues: Decentralized sequencers tend to be slower than centralized ones due to the need for consensus and coordination among multiple nodes. This can result in higher latency and reduced throughput.
Current Usage: One example of an L2 using decentralized sequencers is Metis.
[!note] Both centralized and decentralized sequencers currently do not provide cross-chain interoperability. Each operates independently within its own ecosystem.
Shared Sequencers
The Problem:
- As mentioned, centralized and decentralized sequencers suffer from a lack of cross-chain interoperability, which makes it difficult for users and developers to seamlessly interact between different Layer 2 solutions.
The Solution:
- Shared sequencers aim to solve this problem by operating a separate blockchain that provides sequencing services for multiple rollups. This model introduces interoperability between Layer 2 chains.
How do shared sequencers work?
Shared sequencers are typically operated by a protocol that runs a dedicated blockchain. This blockchain manages the sequencing of transactions for multiple Layer 2 networks, providing a way for different L2 chains to interoperate.
By using shared sequencers, different L2 solutions can communicate and exchange value with each other, increasing the overall flexibility of the system.
Challenges with Shared Sequencers:
Loss of Control: When an L2 chain opts to use a shared sequencer, it gives up certain responsibilities and controls, such as:
Control over Maximum Extractable Value (MEV) collection.
Control over censorship resistance.
Control over performance.
Ability to upgrade or modify the operator of the sequencer.
These trade-offs need to be carefully considered, as sacrificing control can lead to governance concerns or performance bottlenecks.
3. Conclusion
Sequencers are a crucial part of the Layer 2 ecosystem, as they dictate the order of transactions and ultimately affect the efficiency and security of the entire system. While centralized sequencers offer superior performance, they come with the risks of centralization and lack of interoperability. On the other hand, decentralized sequencers prioritize decentralization and security but can be slower in performance.
Shared sequencers present a promising solution to the lack of interoperability between different Layer 2 solutions, but they come with their own challenges, particularly regarding the loss of control over various aspects of the network.
As the Layer 2 space continues to evolve, the role of sequencers and the balance between performance, decentralization, and interoperability will play a key role in shaping the future of scalable blockchain applications.
So what's the best?
What's best depends on use-case. No matter what the solution is, it's constricted by the blockchain trilemma. We can only optimize two factors at a time and have to compromise on the third.
In centralized sequencers we give up decentralization but optimize on scalability and security.
In decentralized sequencers we give up scalability but optimize on decentralization and security.
And in shared sequencers we optimize on decentralization but the rest of the terms remain a bit unclear because the L2 chains would have to trust on the company providing shared sequencing services.
All options exists, the reason why centralized sequencers are most widely used is at an L2 level users mainly care about transaction speed and cheap fees. Until that is satisfied the end user stays happy. And the companies get to keep MEV, have control over upgrades, etc.
But ideally do we want centralized systems in a decentralized web? No. Reality is we always have to cut corners and true decentralization doesn't exist yet. As users, we all have to have some amount of trust on the protocol we are choosing to use.
Subscribe to my newsletter
Read articles from tammy directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
