Layer 2 networks use “sequencers” to organize transactions into batches, allowing for more efficient submission of user activity to their respective layer 1 networks.

What are blockchain sequencers?

Layer 2 networks

Layer 2 scaling solutions (L2s) have become necessary for large, busy blockchain networks like Ethereum.

L2s like Arbitrum and Optimism use the security of their respective layer 1 chains (L1s)—in these cases, Ethereum—but they decrease the burden on the network by taking some work off-chain. They provide an execution later where transactions can be spared from the expensive, more congested L1 blockchain, while still using the L1 as a data availability layer. In other words, transactions that happen on an L2 don’t add to the burden of the L1, and they can be performed quickly and more cheaply. However, all transactions are still ultimately recorded on L1 in perpetuity.

The “need” for sorting

In most cases, L2s operate by collecting transactions into large batches and then submitting them to the L1. Like wholesale stores offering discounts for products sold in bulk, this is how L2 customers “save.” Technically, L2 users can submit their own transactions to the L1, but this defeats the purpose of using the L2 because it exposes them to the same economic issues of usual L1 network activity.

However, L2s receive transactions in an unordered fashion, and it takes some work to streamline their processing. Therefore, sequencers are entities that take unordered transactions and organize them. They decide which go first, which are included in a batch, and which are reserved for the next batch.

Think of sequencers like automatic mail sorters. After people place their envelopes in a mailbox, the sorter collects them and divides them into trucks for delivery. They streamline what could otherwise be a chaotic process, making sure every piece of mail (transaction) gets where—and when—it needs to go.

How do blockchain sequencers work?

Jobs of a sequencer

Sequencers collect transactions submitted to the L2, order them, group them into batches, and then submit them to L1. All this activity occurs off-chain, so batching does not inherently adopt the security of the L1. It is isolated to the L2 sequencer itself.

By collecting transactions and adding them to the “mempool”, sequencers approximate the jobs of miners (in Proof of Work networks like Bitcoin) or validators (in Proof of Stake networks like Ethereum). They put transactions in order so they can appear on the blockchain in the proper format, and then they batch them together to be submitted to a smart contract on the L1. In doing so, they maintain the ethos of blockchain functionality: ensuring security and disallowing bad actors. The batch is submitted as one transaction, so the fee for this one “larger” transaction can be distributed among all the “smaller” transactions within it.

Types of sequencers

  • Centralized – As the most common type of sequencer, a centralized sequencer is used by networks like Optimism and Arbitrum. This is a single node—usually run by the same developer as the rollup or other L2 solution—that handles all transactions.

  • Decentralized – As opposed to a centralized sequencer, a decentralized sequencer uses multiple nodes/computers to perform the same responsibilities. This is the model used by Metis.

  • Shared – Shared sequencers like Espresso are usually special decentralized sequencers, designed specifically to allow multiple rollups/L2s to operate using its resources. The primary benefit of this is interoperability among L2s.

  • Based – Otherwise known as “L1-sequenced” sequencers, based sequencers attempt to draw maximal security and failure-free operability from L1 networks. The closer relationship to L1, characterized by sequencing on the L1 chain instead of off-chain, has distinct advantages at the cost of less flexibility and efficiency.

Risks of sequencers

Centralization in blockchain networks

Although sequencers make transactions cheaper and faster than those on L1, they often draw criticism for contradicting one of the tenets of crypto: decentralization. This is because the security of blockchain networks is inherited by verifiable, fully decentralized, on-chain activity. Since most sequencers are single entities run by developers of a L2, they introduce the possibility of a single point of failure or manipulation. For instance, multiple nodes in a decentralized network can compensate for a single node experiencing downtime. However, if a centralized (single) sequencer malfunctions, the entire L2 network can grind to a halt.

The draw of maximal extractable value (MEV)

Sequencers earn a portion of the fees paid by users of its L2 network, providing an economic incentive to streamline use of L2s. One of the foundations of crypto-related efforts is that all actors are properly incentivized to act in the best interest of the user-base. However, this particular incentive can be mis-aligned for centralized sequencers. Their ultimate control of L2 transactions means that they can prioritize (or de-prioritize) certain transactions in order to extract the highest fees (the “maximum extractable value”) from the network’s users. Although this tactic doesn’t necessarily break any rules—and its use by miners/validators on L1s is well-described—it can result in higher costs and network congestion.

Blockchain sequencers essentials

  • Sequencers are parts of layer 2 scaling solutions (L2s) that act like miners and validators on layer 1 blockchain (L1s, like Bitcoin and Ethereum).

  • When transactions are submitted to a L2, the sequencer receives them, puts them in order, batches them, then submits the batches to the L1 as a single transaction.

  • Although sequencers provide a vital role for streamlining L2 network activity, centralized sequencers can represent a single point of failure or manipulate how transactions are processed.

Ready to start your crypto journey?