*https://limechain.tech/blog/optimistic-rollups-vs-zk-rollups/*


Dimitar Bogdanov, August 2021

Blog-Article-Images-Rollups-1024x576.webp

Ethereum is arguably the most influential blockchain project ever and the one that has contributed the most to the development and evolution of the DLT space. Of course, we cannot talk about influential blockchain projects without mentioning Bitcoin, which kicked off the whole thing. But between initial coin offerings, DeFi and this year’s NFT boom, Ethereum has basically been the driving force behind all major blockchain and crypto trends of the past few years. Not to mention that the vast majority of crypto tokens today started their life on Ethereum. So, it’s not an exaggeration to say that Ethereum has for years been shaping the blockchain and crypto landscape.

However, the success of the Ethereum blockchain has once again demonstrated the need for ways to improve blockchain scalability. This is especially true for a platform like Ethereum, whose utility comes from its ability to run decentralized applications (dApps) powered by smart contracts.

We already know that one solution to the scalability trilemma problem can be to make a system more centralized. This is the approach the Binance Smart Chain has taken and it has certainly paid dividends in a massive increase in user accounts and activity. But increasing scalability while preserving one of blockchain’s most unique characteristics – its decentralized nature – is where the real challenge lies. This is what Layer 2 solutions are trying to accomplish.

In our previous piece on the subject, we presented a general overview of the most prominent types of Layer 2 solutions, including state channels, sidechains, Plasma and, of course, rollups. In this piece, we’ll zero in on rollups and will examine some of the most promising projects in that Layer 2 solution category.

Rollups come in two distinct flavors

Rollups are one of the most promising categories of Layer 2 solutions. These solutions move transaction computations off-chain, but store transaction data to the Ethereum chain, which means that rollups are secured by Layer 1.

All this is accomplished via smart contracts whose primary function is to bundle, or ‘roll up’, transaction data and move it off chain for processing. This data is handled by network participants typically referred to as sequencers or validators, who then submit batches of highly compressed transaction data back to the main chain. Those batches contain the minimum information needed to verify whether the transactions are valid.

Because rollups move computation off-chain but still submit (highly compressed) data to the Ethereum mainnet, they can produce gains in scalability without creating data availability issues which is sometimes the case with other Layer 2 solutions. Some rollups also come with the option of off-chain data availability (where no data is actually posted on Ethereum), which can lead to significant gains in throughput, but at the cost of reduced security.

The method of verification is the key distinction between the two types of rollups – zero knowledge (ZK) rollups and optimistic rollups. ZK rollups generate cryptographic proofs that can be used to prove the validity of transactions. Each batch of transactions has its own ‘validity proof’ which is submitted to the main chain.

In contrast, optimistic rollups assume that all transactions are valid and submit batches without performing any computation whatsoever, which can lead to significant improvements in scalability. However, they include a challenge period during which anyone can dispute the legitimacy of the data contained in a batch. If a fraudulent transaction is detected, the rollup executes a so called fraud proof and runs the correct transaction computation using the data available on Layer 1. To ensure that they are incentivized to process only legitimate transaction data, sequencers are required to stake ETH. If they perform their duties diligently they receive staking rewards, but if a sequencer submits a fraudulent transaction to the main Ethereum chain, their stake is slashed.

Optimistic rollups

One of the biggest strengths of optimistic rollups stems from the fact that they do not perform computation by default, which can lead to significant scalability gains – estimates suggest that optimistic rollups can offer up to 10-100x improvements in scalability. On the downside, the need to have a challenge period means that withdrawal periods are significantly longer than ZK rollups.

Another big advantage of optimistic rollups is that they are capable of executing smart contracts, whereas ZK rollups are mostly limited to simple transactions.