Zero Knowledge (ZK) Rollups: Definition, Working, and Examples

Zero-Knowledge Rollups are a Layer-2 scaling solution for Ethereum that processes transactions in batches to reduce the gas consumed during validation.

Zero-Knowledge Rollups are a Layer-2 scaling solution for Ethereum that processes transactions in batches (rather than individually) to reduce the gas consumed during transaction validation. As a result, they are significantly cheaper to use and can scale to handle very high transaction volumes per second.

However, they do have their downsides too.

In this article, we will discuss the technology behind the creation of Zero-Knowledge Rollups and compare them with alternatives, such as OP Rollups. Although other blockchains have their own scaling solutions, such as the Lightning Network for Bitcoin, we will restrict this article to the Ethereum ecosystem.

Definition

Zero-Knowledge Proof states that a network can maintain its state with valid proof without recording each and every transaction. Rather, the hashes of the transaction summaries (of batches) can be used to establish the new state. If any past transaction is tampered with, it will change the hash of the batch summary, and therefore will get caught by other validators.

They are called Zero-Knowledge because they retain no information about individual transactions and only keep a summary of the batches. In contrast, Ethereum retains all information about every transaction, including the sender’s address, receiver’s address, validator details, block hash, and so on.

Rollups built using this Zero-Knowledge Proof concept are called Zero-Knowledge Rollups or ZK Rollups.

Working with an Explanation of All Steps

ZK Rollup with Blobs
ZK Rollup with Blobs

1. User Initiates a Transaction on the ZK Rollup

A user initiates a rollup transaction from their wallet by selecting the rollup chain (like Polygon zkEVM). Almost all wallets can do this, whether custodial or non-custodial. Once the user signs the transaction and pays the required gas, the transaction begins its journey.

2. The ZK Rollup Validators Verify the Transaction

Each zk rollup chain has its own set of validators, which verify transactions and add them to the Rollup chain. For example, the StarkNet ZK Rollup has around 100 validators.

3. The Validated Rollup Transactions are Put into Batches

All validated transactions are put into batches. The total size of each batch, which is a rollup block, is fixed. However, due to the varying sizes of the transactions, each batch has a different number of transactions in it.

These blocks are created in the same way as a Layer-1 block. However, they differ in one aspect. Each layer-1 block gets created as soon as the last one is validated. In the case of rollup blocks, they have to wait for finalization from Layer-1.

4. The Batches are Summarized

The summary of each batch of transactions is the Merkle Tree hash of the entire set of transactions. This Merkle Tree is the critical security factor that secures the roll-up transactions. If a single transaction is tampered with, it will change the block’s hash.

5. The Summarized Data is Fed into Layer-1 (Ethereum) Chain

The summary, i.e., the block’s hash, is processed as a single transaction on Layer-1. This is done to keep the hash permanent in the Layer-1 chain. If any unauthorized change is made in the ZK Rollup, it will create a new hash for the block, which will then clash with the old hash present in the Layer-1 chain.

6. The Summary is Finalized in Layer-1 (Ethereum)

The batch of transactions is finalized on the Layer-1 chain (Ethereum), and the individual transactions are deleted permanently. The batch summary(hash) is then considered permanent on the Ethereum Blockchain.

7. The Zero Knowledge Solutions Attains a New State

Finally, the Zero Knowledge Solution updates its latest state to include the summary of the last batch. It then prepares a new batch with the hash of the old batch in its header.

Top Zero-Knowledge Solutions

  1. zkSync
  2. Loopring
  3. Polygon zkEVM
  4. StarkNet
  5. StarkEx
  6. ImmutableX

Advantages

  1. Lower Cost
  2. Fast Transactions
  3. Versatility

Drawbacks

  1. Lower Security
  2. Less Decentralized
  3. Lower Resilience to Failure

Alternative Scaling Solutions

  • Optimistic Rollups
  • Validium

Das Crypto publishes information for knowledge. Please consult your financial advisor before trading or making any investment decisions. Cryptocurrencies are subject to uncertainties and market volatility.

Das Crypto
Das Crypto
Articles: 7