The Ethereum blockchain is undoubtedly a game-changer in the decentralized economy, but despite being around since 2015 it is still plagued by several challenges such as scalability, speed limitations and high network costs. Fortunately, the rise of layer 2 scaling networks such as Optimistic and Zero-knowledge Rollups has brought a solution to these problems.
Rollups offer a faster and cheaper alternative to traditional blockchain transactions by processing them on a separate, faster blockchain (known as a Layer-2) and then returning the transaction data to the parent blockchain (the Layer-1 or mainnet) at a fraction of the cost.
In essence, Layer-2 scaling solutions allow users to enjoy the best of both worlds: The speed and affordability of Rollups combined with the security of the underlying Layer-1 blockchain.
In this article, we will explore the two main types of Rollups, optimistic and zk-rollups, and delve deeper into how these two scaling solutions differ in terms of network consensus and other fundamental factors.
Optimistic vs ZK Rollups
Optimistic rollups are a layer 2 protocol designed to increase the throughput of Ethereum’s base layer. They achieve this by processing transactions off-chain, which leads to a significant improvement in processing speed while decreasing the computation on the primary Ethereum chain. Optimistic rollups differ from other scaling solutions, such as sidechains, in that they derive their security from the mainnet.
They are called “optimistic” because they assume that off-chain transactions are valid and do not publish proofs of validity for transaction batches posted on-chain. Instead, they use a fraud-proving scheme to detect incorrect computations in transactions. When a rollup batch is submitted on Ethereum, there is a challenge period during which anyone can challenge the results of the transaction by computing a fraud proof.
Similarly, Zero-knowledge rollups bundle transactions into batches that are executed off-chain. ZK-rollup operators submit a summary of the changes representing all the transactions in a batch, rather than transmitting each transaction individually. However, unlike optimistic rollups, ZK-rollups produce validity proofs to demonstrate the accuracy of their changes. The validity proof offers cryptographic assurance that the proposed changes to Ethereum’s blockchain are the result of executing all the transactions in the batch.
That said, it is pretty obvious that these Layer-2 solutions differ to an extent. Here is a brief breakdown on how they compare in the most fundamental factors that determine the efficiency and effectiveness of any Layer-2 scaling solution.
- Transaction Finality and Costs
One of the most important factors to consider in this comparison is transaction finality. Zero-knowledge rollups enable immediate withdrawal of funds, while optimistic rollups feature a one-week delay in the challenge period. Users must wait through the challenge period before withdrawing funds, causing a delay in transaction finality.
However, it is worth noting that Optimistic rollups have lower costs because they don’t require proof for transactions unless challenged. Meanwhile, Zero-knowledge rollups have higher network costs due to the computational proof required for each transaction block, as well as the need for high-end hardware.
- DeFi Compatibility
Optimistic rollups, such as Optimism and Arbitrum, offer greater compatibility with DeFi applications due to their EVM-compatibility. The Ethereum Virtual Machine (EVM) is a virtual CPU used by Ethereum to execute smart contract code. EVM-compatibility allows for the creation of an EVM-like code execution environment, making it easy for developers to migrate smart contracts to an EVM-compatible chain without having to write the code from scratch.
In contrast, Zero-knowledge rollups face more limitations in terms of DeFi compatibility. However, the emergence of ZK-EVM projects, such as ZKSync, Polygon, and Scroll, is showing promising results in general-purpose support for DeFi smart contracts.
- Network Security
When comparing optimistic rollups to zk-rollups, one of the most crucial factors to consider is security. Optimistic rollups rely on incentives and rewards to encourage users to ensure the security of the rollup. Validators receive compensation for submitting successful fraud-proof evidence, which incentivizes them to act honestly.
Conversely, zk-rollups use cryptographic proofs to ensure security. Both types of rollups compete against each other on the basis of security, with each utilizing different methods to provide users with the highest level of protection.
- Programming Efficiency
Ease of programming is particularly important for DApp developers, and Optimistic rollups have an advantage here. This is because they offer data compression flexibility and EVM compatibility, making programming easier. In contrast, Zero-knowledge rollups don’t require publishing transaction data on Ethereum, but they require clear cryptographic proof, making programming more difficult.
Optimistic roll ups are easier to use, less costly, and have lower programming complexity, but they have a delay in transaction finality and rely on users to ensure correctness. Zero-knowledge rollups guarantee authenticity, have immediate withdrawals, but have higher costs and require clear cryptographic proof.
Rollups, despite leveraging Ethereum’s core security guarantees, still present certain risks compared to Ethereum’s mainnet.
One major concern is the potential for bugs in rollup smart contracts, which are not uncommon in any program built on Ethereum. While audits and fail-safes can help prevent attacks, relying on an external program to handle transactions always entails some level of risk.
Moreover, both types of rollups are relatively new and operate on networks that are often centralized. In some cases, the rollup’s development team retains partial control over the network and can potentially pause or shut it down.
Many rollups still depend on centralized “sequencers” to efficiently coordinate transactions on the layer 2 chain. While a sequencer cannot falsify or modify transactions, it could censor or re-order them to gain some advantage.
On the brighter side, these upcoming rollups intend to decentralize in some form. For example, Optimism has begun the transition to community governance, and improvements to rollup technology should address some of the concerns around centralized network control.
Latest Highlights in the Rollups Ecosystem
The Layer-2 ecosystem has grown rapidly in recent months due to its value proposition in DeFi innovations. There is a lot of activity happening in infrastructure development and network integrations, particularly in optimistic rollups such as Optimism and Arbitrum.
In April, Optimism will release Bedrock, a major update promising modularity, simplicity, and Ethereum equivalence for L2 solutions. This update is expected to bring significant performance improvements, such as lower transaction costs, higher throughput, and faster sync speeds.
Additionally, Coinbase’s recently launched L2 solution, Base, will use Optimism’s technology, and Coinbase is joining Optimism as a core dev to build the open-source OP Stack that powers Optimism. Both companies share a vision for a network of interoperable layer 2 solutions or rollups that can scale Ethereum together.
On the other hand, Reddit chose Arbitrum Nova for its community points, demonstrating that hubs for specific purposes are already a reality. “We found Arbitrum optimistic rollups to be the most promising scaling technology for Community Points,” stated an earlier Reddit post on scaling the platform’s community points with Arbitrum.