Define your settlement layer

Before configuring gas parameters or batch submission intervals, you must identify which chain serves as the settlement layer. This distinction is critical because it determines the finality guarantee and the primary cost center for your rollup operation.

In a modular stack, the execution layer handles transaction processing off-chain, while the settlement layer records the final state on a Layer 1 blockchain. The settlement layer provides the cryptographic proof that validates the rollup's state. It does not execute transactions; it only verifies them. This separation allows the execution layer to scale throughput, but the settlement layer remains the source of truth.

Choosing the wrong settlement layer can lead to unnecessary gas costs or delayed finality. Most rollups settle on Ethereum, but some operate on alternative L1s or specialized settlement layers like Celestia. The choice depends on your need for security, cost efficiency, and speed. Understand that settlement is where your data is ultimately anchored, making it the most expensive and critical part of the rollup lifecycle.

For a deeper understanding of how settlement fits into the broader modular architecture, refer to Celestia’s explanation of the modular stack.

Choose between optimistic and zk rollups

Selecting the right rollup architecture depends on your specific requirements for transaction finality, security guarantees, and operational costs. Optimistic rollups and zero-knowledge (zk) rollups represent the two primary paths for Layer-2 scaling, each with distinct trade-offs in how they validate transactions and settle them on Ethereum.

Optimistic rollups assume transactions are valid by default and only require computation if a fraud proof is submitted during a challenge period. This model offers lower upfront computational costs but introduces a delay in finality, typically requiring a 7-day window for withdrawals to be secure. It is well-suited for applications where users can tolerate longer settlement times in exchange for lower fees.

Zero-knowledge rollups, or zk-rollups, generate cryptographic proofs that mathematically verify the validity of transactions before they are committed to the main chain. This approach provides near-instant finality and higher security assumptions, as validity is proven rather than assumed. However, generating these proofs can be computationally intensive, often resulting in higher gas costs for transaction execution compared to optimistic models.

The table below compares the core mechanics of each settlement model to help you align your choice with your latency and cost constraints.

Rollup Settle
FeatureOptimistic RollupZK Rollup
Finality Time~7 days (challenge period)Minutes to hours
Proof MechanismFraud proofsValidity proofs (ZK-SNARKs/STARKs)
Security ModelDepends on challenger availabilityCryptographic guarantees
Gas Costs (Execution)LowerHigher (proof generation overhead)

For most high-frequency trading or DeFi applications requiring immediate finality, zk-rollups are the superior choice despite the higher execution costs. Conversely, for general-purpose smart contract platforms where cost efficiency is paramount and finality delays are acceptable, optimistic rollups provide a more economical settlement layer.

Configure shared sequencer routing

Shared sequencers allow multiple rollups to batch transactions together before submitting data to the settlement layer. By pooling these transactions, you reduce the per-user cost of data availability and increase throughput without sacrificing finality. This configuration shifts the burden of sequencing from individual operators to a specialized service that aggregates intent across chains.

1. Select a shared sequencer provider

Choose a provider that supports both the rollups you operate and the settlement layer you use. Look for providers with proven uptime and low latency, as sequencing delays directly impact user experience. Popular options include specialized infrastructure providers like Conduit or decentralized networks like OP Stack’s shared sequencer proposals. Verify that the provider offers the specific data availability guarantees your rollup requires.

2. Configure the sequencer endpoint

Update your rollup node configuration to point to the shared sequencer’s HTTP or WebSocket endpoint. This replaces the local sequencer instance. Ensure your node is configured to accept batches from the shared sequencer and validate them against your consensus rules. Test the connection by submitting a small batch of transactions to confirm the sequencer accepts and processes them correctly.

3. Set up cross-rollup transaction batching

Define the logic for which transactions are eligible for batching. Typically, this involves grouping transactions from different rollups that share a common settlement layer. You may need to implement a custom relayer or use the provider’s API to aggregate these transactions. Ensure that the batch size and frequency align with your gas cost optimization goals. Smaller, more frequent batches may reduce latency, while larger batches maximize cost efficiency.

4. Validate finality and gas savings

Monitor the settlement process to ensure that batches are being submitted to the settlement layer and that finality times meet your expectations. Compare the gas costs of your new setup against the previous local sequencing model. Use block explorers to verify that transactions are being included in the correct batches and that no data is being dropped. Adjust the batching parameters if you observe significant delays or excessive gas fees.

5. Implement error handling and fallbacks

Shared sequencers can experience downtime or technical issues. Configure your rollup to handle sequencer failures gracefully. This may involve falling back to a local sequencer or switching to an alternative provider. Implement monitoring alerts for sequencer health and batch submission failures. Regularly test your fallback mechanisms to ensure they work as intended during outages.

Monitor gas fees and L1 congestion

Before submitting a settlement transaction, check current Ethereum L1 gas prices. Settlement costs fluctuate based on network activity, so timing matters. High congestion periods increase your final cost significantly.

Use a live gas tracker to view real-time data. Look for the "base fee" and "priority fee" components. The base fee changes with each block, while the priority fee goes to validators. Aim to settle when the base fee is low. Avoid settling during peak hours or major NFT mints. These events spike demand and drive up prices. If your transaction isn't urgent, wait for off-peak times. This simple step can reduce settlement costs by 50% or more.

Keep an eye on L1 block utilization. When blocks are near capacity, gas prices rise. Set alerts for when gas drops below your threshold. This proactive approach ensures you pay the minimum required for finality.

Verify proof generation and submission

Before the settlement transaction reaches the Layer 1 blockchain, you must rigorously validate the cryptographic proof. This step ensures the L1 contract accepts the rollup state without error. A malformed proof will cause the transaction to revert, burning gas and leaving the rollup state out of sync.

1. Validate proof correctness locally

Run the proof verification circuit against the generated proof data. For ZK-rollups, this means checking the SNARK or STARK proof against the public input (the state root). For optimistic rollups, verify that the fraud proof correctly identifies the invalid state transition. Use the official verifier contract code or a local simulation environment to confirm the proof passes all constraints.

Rollup Settle
1
Generate the proof

Execute the prover to generate the cryptographic proof. Ensure the output matches the expected format for your chosen verification method, whether it is a ZK-SNARK or a fraud proof.

Rollup Settle
2
Run local verification

Test the proof against a local instance of the L1 verifier contract. This catches syntax errors or invalid state roots before you spend real gas on the mainnet.

Rollup Settle
3
Submit to L1 contract

Once verified, broadcast the proof to the settlement layer. The L1 contract will execute the verification logic and, if successful, update the global state root.

2. Check gas limits and contract readiness

Verify that the L1 contract is ready to accept the new proof. Some contracts have pause mechanisms or require specific state conditions. Ensure your gas limit is sufficient to cover the verification cost, which can be high for complex ZK proofs.

Common rollup settlement: what to check next

Understanding the mechanics of rollup settlement helps clarify how Layer 2 solutions secure funds and finalize transactions on Ethereum. Below are answers to frequent questions about rollup definitions, settlement processes, and architectural layers.