Logo

Blockchain Ecosystem

ZkRollup and Optimistic Rollup

There are new ways to optimize and make a blockchain scalable. ZkRollup and Optimistic Rollup are among these solutions.

 3 min

Jump to


We are hearing more and more about Rollups. But what exactly are they? Rollups are a way to evolve Ethereum’s capacities in order to solve the scalability problems encountered by the network.

The blockchain trilemma states that a network can only achieve two of the three pillars (decentralisation, security and scalability). And Ethereum has reached its limits in terms of scalability (number of transactions per second and fees).

triangle blockchain trilemma

How to solve the scalability problem?

A blockchain can be designed with higher transaction capacities. However, the main drawback of this technique is that blockchains with “larger blocks” are more difficult to verify and risk becoming more centralised.

To avoid this risk, developers can make client software more efficient or use technologies such as sharding to help spread the work of construction and validation of the chain across multiple nodes. The Ethereum 2.0 project is attempting to implement this solution.

It is also possible to change the way the blokchain is used. Instead of putting all their activity directly on the blockchain, users do most of their activity off-chain via so-called “layer 2” protocols.

There is then a smart-contract on the main chain that has only two tasks: to process deposits and withdrawals, and to verify the evidence that everything that happens off the main chain is compliant with the rules. There are several ways to achieve this proof, but they all have one thing in common, namely that validating the proof on the main chain is much cheaper than the original calculation off the chain.

Several solutions are available and different types of rollups exist, the most notable being ZkRollups and Optimistic Rollups.

ZkRollup

ZkRollups, also known as Zero-Knowledge Rollups, make it possible to aggregate hundreds of off-chain transactions while publishing a cryptographic proof of the state of the account balances at the end of these transactions on the main chain.

ZkRollup solutions process transactions off chain and batch them together before posting it to the blokchain. They also generate a cryptographic validity proof used to verify the authenticity of transaction data.

The validity proof called SNARK (succinct non-interactive augment of knowledge), is generated without needing to know all the transaction data; only some key details. That is why it is called a “zero knowledge rollup.”

The major ones are Starkware, zkSync, ImmutableX, Aztec and Hermez.

Optimistic Rollup

As part of this technology, funds are held on an on-chain smart contract while transactions that are off-chain are aggregated and published in a compressed manner on the Ethereum main chain.

Optimistic Rollups do not generate a validity proof to authenticate transaction data. There is a certain waiting period of time, during which it’s possible to be disputed by network participants.

If any network user posts valid proof that a transaction is fraudulent, the transaction will get rejected. The initial presumption of transaction liquidity without proof is the reason why these roll ups are called “Optimistic.”

The most prominent are Arbitrum, MetisDAO and Optimism.

Differences between ZkRollups and Optimistic Rollup

Differences: The key advantage of ZkRollups over Optimistic is the speed of on chain transactions. Since there isn’t a waiting time for the ZkRollups during which the authenticity of a transaction may be challenged; they are posting to the Ledger faster than Optimistic.

However, the cryptographic validity proofs used by ZkRollups rely on significant wash power to compute. Therefore, programs that have limited on-chain activity may find it easier/more beneficial to use Optimistic Rollup solutions.

They currently enjoy greater scalability because of the absence of validity proof computation. A big spike in transactions is unlikely to affect an app using an Optimistic Rollup rather than ZkRollup.

A further difference is smart contract interactions, Optimistic rollups are able to directly execute on the L1 whereas a ZkRollup isn’t able to.

What are the limitations of Rollups?

There are still many uncertainties regarding the design of rollups and many challenges to be overcome. These include

Pre-confirmation security: many rollups offer a notion of ‘pre-confirmation’ for faster user experiences. However, the economic security of this model is limited due to the limited ability to make promises to many players at the same time.

User integration: few decentralised applications use rollups and few users are aware of them so few platforms support them;

Conclusion

Rollups therefore represent a new paradigm for solving Ethereum’s scalability problem. They will certainly be the cornerstone for scaling Ethereum.

The Ethereum community has been very enthusiastic about them because, unlike previous attempts to move to the second layer of Ethereum, this one can support generic Ethereum Virtual Machine (EVM) code, which allows existing applications to easily migrate to new solutions.

To do this, they made a key compromise: instead of trying to exit the main chain completely, they left a small amount of data per transaction on it.

There are many types of rollups and many choices in their design: from Optimistic Rollups that use proof of fraud, to ZK Rollups that use proof of validity. This bodes well for the Ethereum blockchain, which will gradually see its exorbitant fees disappear.

Keep in touch

© 2018 - 2022 NonFungible Corporation

All rights reserved.