Rollup networks like Optimism, Arbitrum, and Base have emerged as high throughput alternatives to the Ethereum main chain as part of the effort to scale Ethereum. These layer 2 protocols execute transactions off-chain, with only the resulting state submitted to the Ethereum network. The success of Ethereum rollup networks is reflected in the $5 billion+ TVL stored in L2 chains.

While layer 2 solutions are not new, little is known about “sequencers,” which are crucial to the functioning of L2 chains. Read on to learn about layer 2 sequencers, how they work, and their benefits.

What Are Layer 2 Sequencers?

Layer 2 sequencers are responsible for organizing transactions on a L2 protocol to make sure transactions are in correct order.

The sequencer node will roll up the transactions into a compressed batch of other transactions and periodically send them to the Ethereum blockchain. 

How Do Layer 2 Sequencers Work?

Layer 2 sequencers act as traffic controllers for L2 on-chain transactions. 

They use two methods of sorting transactions: 

  • First-come, first-served basis, which means priority is given to transactions submitted earlier.
  • Organizing transactions based on gas fees, which means priority is given to transactions with higher fees.

In theory, sequencers are supposed to be honest in execution. However, the power held by a sequencer is significant and can be prone to abuse. This is where the State Commitment Chain works to prevent any malicious action by sequencers through a “challenge window” to validate commitment proofs within the L2 transactions. 

The commitments are considered pending during this window and will only proceed to state commitment proofs if unchallenged. However, if a commitment is challenged, it is deemed invalidated and is discarded to be replaced by another commitment. 

In other words, during the dispute period, if there is no validator proof that the transaction submitted by the sequencer to the L1 is incorrect, the submitted transaction is final and added to the L1 layer. 

Types of Sequencers in Layer 2

Sequencers deployed by Layer 2 chains depend on their architecture and objectives. Let’s look at the types of sequencers. 

Centralized

Centralized sequencers are the most common type and are available in L2 networks like Arbitrum, Optimism, and Base. A sequencer is considered “centralized” if it is run by the core development team of the rollup, operates on a central server, and uses a single instance to broadcast batches to the L1. 

Centralized sequencers are beneficial in offering near-instant finality on the L2 chain and reliably submitting transactions to Ethereum. 

Decentralized

Decentralized sequencers use a network of nodes to carry out their responsibilities. Metis is an example of an L2 chain that uses a decentralized pool of sequencer nodes to sort and publish transactions to Ethereum. Decentralized sequencers have the advantage of not having a single point of failure that centralized sequencers do. 

Shared

Shared sequencers act almost like a decentralized sequencing third party for several rollup networks. Shared sequencers like Espresso and Astria offer decentralized sequencers on their network for other L2 rollups to leverage and have data submitted to L1. Shared sequencing enables interoperability between L2 rollups.

Pros and Cons of Layer 2 Sequencers

Now, let’s take a look at the merits and demerits of L2 sequencers.

Pros 

  • Quick and cheap transactions: They are useful in decongesting Ethereum by processing L2 transactions efficiently and cost-effectively, significantly lowering the cost of L1 transactions. 
  • Implementing cryptographic proofs extends Ethereum security to L2 transactions: Introducing fraud proofs or validity proofs to L2 rollups allows sequencers to leverage the L1’s security apparatus and allows L1 validators to ensure L2 networks are operating as promised.
  • Provide superior user experience: They approve transactions almost instantly, and this enables users to withdraw funds more quickly from L2s as only valid batches are submitted.

Cons

  • Centralization risks leading to a single point of failure: During the inscription craze on Arbitrum’s L2, the sequencer stalled, which resulted in a network outage as the centralized sequencer went down.
  • Sequencers can censor transactions: Centralized sequencers can exclude or blacklist transactions for several legitimate or nefarious reasons. 
  • Earning improper MEV gains: Layer 2 sequencers can manipulate the order of transactions to earn MEV profits.

Conclusion

Layer 2 sequencers are critical to the effectiveness of L2 chains in improving user experience, facilitating fast transactions, and securing the protocols. However, they have certain risks, particularly concerning centralization, that must be addressed. Fortunately, solutions like decentralized or shared sequencers can resolve some of these risks.