Choose your rollup settlement type

Settling transactions on Ethereum requires anchoring rollup data to Layer 1, but the method you choose dictates your speed and cost. The two dominant architectures—ZK-Rollups and Optimistic Rollups—use different mechanisms to guarantee validity. Selecting the right one depends on whether you prioritize immediate finality or lower upfront computational costs.

ZK-Rollups generate zero-knowledge proofs (validity proofs) for every batch of transactions. These mathematical proofs are verified directly on Ethereum, offering near-instant finality. This model is ideal for applications requiring rapid settlement, such as high-frequency trading or real-time gaming. However, generating these proofs is computationally intensive, which can lead to higher overhead costs for the sequencer.

Optimistic Rollups assume transactions are valid by default, similar to how legal systems operate. They only require fraud proofs if a challenger disputes a transaction within a specific window, typically seven days. This approach reduces computational overhead, making it cheaper to operate for general-purpose smart contracts. The trade-off is the delay in finality, as users must wait for the dispute period to expire before withdrawing funds to Layer 1.

The following comparison highlights the structural differences that impact your rollup settle strategy:

Rollup Settle
FeatureZK-RollupOptimistic Rollup
Finality TimeNear-instant (minutes)7-day challenge period
Security ModelValidity proofs (ZK-SNARKs/STARKs)Fraud proofs (dispute-based)
Gas CostHigher (proof generation)Lower (no proof generation)
Data AvailabilityCompressed on L1Compressed on L1

Both models inherit Ethereum's security for settlement and data availability because all transaction data is anchored to Layer 1 [src-serp-1]. Sovereign rollups, which settle on their own chains, do not share this direct security guarantee [src-serp-5]. For most developers aiming to minimize gas fees while maintaining security, choosing between ZK and Optimistic architectures is the foundational step in the rollup settle process.

Prepare the transaction batch

Before submitting data to the settlement layer, you must aggregate individual user transactions into a single, efficient batch. This process is the primary mechanism for lowering per-unit gas costs, as the fixed overhead of posting a single transaction is spread across many users. Early ZK rollups often face higher fees due to limited activity, but optimizing your batch preparation can significantly mitigate this.

1. Aggregate transactions via your SDK

Most rollup providers offer an SDK that handles the heavy lifting of transaction aggregation. Instead of submitting transactions one by one to Layer 2, use the SDK to pool them into a single batch. This reduces the number of state updates required, directly lowering the computational cost before the batch is even posted.

2. Compress data with efficient encoding

The cost of posting data to Ethereum’s mainnet is driven by the byte size of the calldata. Use efficient encoding formats for your transaction data. For ZK rollups, ensure your proof generation circuit is optimized to minimize the size of the state root and proof data. Smaller batches mean lower data availability costs.

3. Generate and verify proofs

For ZK rollups, you must generate a cryptographic proof that validates the state transition of your batch. This proof is computationally expensive but essential for security. Use optimized prover infrastructure to minimize the time and cost of proof generation. For optimistic rollups, this step is replaced by the fraud-proof window, but you still need to post the state root.

4. Submit the batch to the settlement layer

Once the batch is aggregated, compressed, and proven (if applicable), submit it to the Ethereum settlement layer. This transaction includes the state root, the proof, and any necessary calldata. The settlement layer verifies the proof and updates the global state. Ensure you monitor gas prices on Ethereum mainnet to choose the optimal time for submission, avoiding peak congestion periods.

Rollup Settle
1
Aggregate transactions via SDK

Pool user transactions into a single batch using your rollup provider's SDK to reduce state update overhead.

Rollup Settle
2
Compress data with efficient encoding

Use compact encoding formats to minimize the byte size of calldata posted to Ethereum, leveraging EIP-4844 blobs if supported.

Rollup Settle
3
Generate and verify proofs

Compute the cryptographic proof for the state transition using optimized prover infrastructure to keep computational costs low.

4
Submit to the settlement layer

Post the final batch, including the state root and proof, to Ethereum mainnet during low-gas periods to minimize fees.

Submit the rollup settle request

Submitting the rollup settle request is the final step in anchoring your Layer 2 activity to the main chain. This process transforms aggregated transaction data into a single, verifiable entry on Layer 1, ensuring that all state changes are permanently recorded and secure. The method of submission depends on whether your rollup uses an optimistic or zero-knowledge architecture, but the goal remains the same: minimize gas costs while maximizing security.

1. Prepare the Transaction Batch

Before submission, the sequencer must aggregate individual user transactions into a single batch. This batch includes the new state root, which represents the updated balance and contract states of all participants. The sequencer also packages the transaction calldata or the validity proof (for ZK-rollups) required for verification. Preparing this batch efficiently is critical; larger, well-structured batches distribute the fixed gas cost of the settlement transaction across more users, significantly lowering the per-transaction fee.

2. Choose Your Submission Path

The actual submission to the L1 settlement layer follows one of two primary paths, depending on your rollup type:

Optimistic Rollups In this model, the sequencer submits the transaction calldata to L1 without an immediate validity proof. The state root is posted, and a dispute window (typically 7 days) begins. During this time, anyone can challenge the state if they detect invalid transactions. If no challenges are raised, the state is considered finalized. This approach is cheaper to submit but requires users to wait for the dispute period to expire before withdrawing funds with certainty.

Zero-Knowledge (ZK) Rollups ZK-rollups require the sequencer to generate a cryptographic proof that the batch of transactions is valid. This proof, along with the state root and calldata, is submitted to the L1 verifier contract. Because the proof mathematically guarantees validity, the state is finalized immediately upon successful verification. While generating the proof is computationally expensive for the sequencer, the L1 submission is fast and final, eliminating the need for a waiting period.

3. Execute the L1 Transaction

The sequencer (or a dedicated batch submitter) sends the prepared batch to the L1 settlement contract. This transaction includes the state root and either the calldata or the ZK proof. The L1 contract verifies the input—checking the proof for ZK-rollups or simply recording the data for optimistic rollups—and updates its internal state. This is the moment the rollup settle request is officially recorded on Ethereum, inheriting its security and immutability.

4. Verify Finality

After the transaction is mined, you should verify that the state root was accepted by the L1 contract. For optimistic rollups, you can monitor the dispute window. For ZK-rollups, finality is immediate once the transaction confirms. Confirming this step ensures your assets are securely anchored to Layer 1, allowing you to proceed with withdrawals or further interactions with confidence.

Verify finality and confirm state

Settlement is not complete until the Layer 1 blockchain acknowledges the Layer 2 batch. This step locks the state in Ethereum’s history, making it irreversible. How you confirm this depends on whether you are using a ZK or Optimistic rollup, as their finality guarantees differ significantly.

Check the L1 receipt

Every settled batch generates a transaction on Ethereum. Locate the transaction hash from your rollup provider or block explorer. Verify that the transaction status is Success and that the gas fee was paid. This receipt proves the data was posted to Ethereum. Without this on-chain anchor, the rollup state remains unsecured.

Match the state root

The rollup publishes a state root—a cryptographic hash representing the current state of all accounts and contracts. Compare this root against the one stored in the rollup’s smart contract on Ethereum. If they match, the data posted is valid. This is the primary check for ZK rollups, which post validity proofs alongside the state root. The proof verifies that the state transition was computed correctly, offering immediate finality.

Wait for the dispute window

Optimistic rollups work differently. They assume transactions are valid unless proven otherwise. When a batch is posted, it enters a dispute window, typically 7 days. During this time, anyone can submit a fraud proof if they detect an invalid state transition. You must wait for this window to expire before considering the settlement final. If no fraud proof is submitted, the state is confirmed as canonical. This delay is the trade-off for lower computational costs compared to ZK proofs.

  • Confirm L1 transaction status is Success
  • Verify state root matches on-chain contract
  • For Optimistic rollups: wait 7 days for dispute window expiry

Common rollup settle mistakes

Even with automated tools, human error in the settlement process can lead to lost funds or failed proofs. The most frequent pitfalls involve timing errors, invalid data submissions, and ignoring the economic reality of who pays for settlement.

Timing out during dispute windows

Rollup operators must submit their state roots within specific timeframes. If an operator misses the submission window, the protocol may flag the batch as stale, forcing a resubmission or triggering a dispute window that delays finality. This often happens when network congestion on Layer 1 slows down transaction inclusion. Always monitor Layer 1 gas prices before attempting to post your settlement data.

Submitting invalid or incomplete proofs

A single invalid proof can cause the entire batch to revert. For ZK rollups, this means the zero-knowledge proof itself is malformed or doesn't match the transaction state. For Optimistic rollups, it might mean submitting a state root without sufficient fraud-proof readiness. Always run local verification checks against your execution layer before broadcasting to the settlement layer. An invalid proof wastes gas and delays user withdrawals.

Underestimating settlement costs

Many operators assume rollup settlement fees are negligible. As activity on early ZK rollups increases, settlement fees can become the dominant cost. If you don't account for these Layer 1 fees in your pricing model, your margins will erode quickly. Treat settlement fees as a primary variable in your cost analysis, not an afterthought.

Frequently asked questions about rollup settle