The “Merge” marks the transition of the Ethereum network to Proof-of-Stake consensus. Alongside sharding, the crypto community is months before a much-anticipated development that addresses scaling challenges. State channels is another interesting proposition that operates as Layer 2.
However, it requires an ETH deposit into a multi-sig contract, while open participation is not supported. With the “Merge” being delayed for a while now, and other scaling solutions either lacking the security of the mainnet or being time and cost-inefficient, a significant part of the crypto community is looking towards the solution of Rollups.
What are the Ethereum Rollups?
Rollups rely on the security of the Ethereum mainnet, while also facilitating scaling mechanisms that provide network efficiency. Furthermore, it looks that Rollups can possibly integrate with the “Merge” for maximum scalability.
The two main types of Rollups are Optimistic Rollups and Zero-Knowledge (ZK) Rollups. Before we dive into each type, let’s look at what Ethereum Rollups have in common.
Rollups rely on off-chain transactions (on a separate chain) but still post batches of data on the mainnet. Therefore, Rollups combine transaction efficiency with network security. Rollups compress data and roll it on the main Ethereum chain – yes, that’s where they got their name from. The way that this “compression and roll” is being executed, depends on the type of Rollups. Both types provide proof to the network that the data is valid. Optimistic Rollups provide fraud proofs and ZK-Rollups provide validity proofs.
Time to dive deeper into each type of Rollups…
Optimistic Rollups
The term “optimistic” derives from the point that with Optimistic Rollups, a party posts transaction data to the mainnet, and the network assumes it is valid. There is an assumption that aggregators are not fraudulent. The transaction remains valid unless there is a dispute from another party in the network. In such a case, the dispute resolution system runs computation, via a fraud proof, and penalizes the party that attempted to post malicious transaction data. At the same time, the system will penalize parties if they submit wrong fraud proofs. Therefore, the network incentivizes good network behavior between parties.
The process is as follows:
- After a transaction, a new state is submitted to the mainnet in batches. The party must also provide a bond, usually in ETH.
- If another party notices a fraudulent transaction, the Rollup will execute a fraud proof on the mainnet and run the transaction’s computation, using the available state data.
- The penalty is usually the slashing of the bond by the malicious party. The party executing the fraud proof might also have its bond slashed if its claim is incorrect.
- Transactions are written to the Ethereum mainnet as call data.
Optimistic Rollups can achieve up to 10x-100x improvement in scalability. Arbitrum and Optimism are the two popular types of Optimistic Rollups, with some differences in their dispute resolution models.
Besides the incentive mechanism, Optimistic Rollups are mostly EVM and Solidity compatible. Therefore, any computation that is feasible on Ethereum Layer 1, is also feasible with Optimistic Rollups. The mainnet stores all transaction data, thereby enhancing security and decentralization. In addition, even if only one party is not malicious and submits a fraud proof within a network, the mechanism can still identify fraudulent transactions.
Challenges
The parties of the network need some time to submit their fraud proofs. The network gives time for disputes to detect fraudulent transactions. Consequently, participants cannot immediately withdraw their funds to the mainnet. The waiting period can be a week long. Connext is a project that works to solve this issue by enabling the transfer of value and call of contracts across Ethereum-compatible chains and Layer 2s.
ZK-Rollups
ZK-Rollups implement Zero-Knowledge proofs at every batch. This means that the network can immediately verify valid and reject invalid batches. Therefore, ZK-Rollups do not face extensive withdrawal periods, as in the case of Optimistic Rollups. Withdrawals are available soon after the batch and the validity proof is posted on the mainnet. This also implies that there are no delays when moving funds between layers.
Basically, ZK-Rollups like zkSync run computation off-chain and submit a validity proof (SNARK) to the chain. The smart contract holds the state of all transfers on Layer 2. State updates occur only with validity proof. Therefore, ZK-Rollups only need the validity proof and not all the transaction data.
The fast finality time is the major advantage of ZK-Rollups against Optimistic Rollups. At the same time, the network is highly secure as the essential data to recover the state resides on Layer 1. StarkWare is probably the most notable project working on ZK-Rollups as it has already integrated with projects like dYdX and Immutable X that brings Layer 2 for NFTs on Ethereum.
Challenges
It is computationally intensive and challenging to produce validity proofs, due to the complexity of the technology. Therefore, it may not be the optimal solution for applications with limited on-chain activity. Nodes that compute ZK proofs require high-spec capabilities. The challenge of launching an EVM-compatible ZK-Rollup might be the hardest one, but there are some attempts by the community in that direction.
Comparing both Rollup technologies to sidechains, the fees are a bit higher as a batch requires a fee for its block space on Ethereum.
Conclusion
The debate around Ethereum scaling is probably the most popular point of discussion among the crypto community at the moment. The scaling challenges initiate operational barriers for existing and potential Ethereum users. High gas fees and slow transaction times from network congestion are certainly significant barriers to wider crypto adoption.
Optimistic Rollups and ZK-Rollups represent a technology that is actively gaining momentum among the community with more projects integrating their networks with them. Actually, the upcoming Ethereum update increases the available space through sharding. In combination with Rollups, we could arrive at a point where Ethereum’s transaction speed reaches approximately 100k transactions per second!
The degree of interoperability of Rollups between multiple projects requires several blockchains to integrate on the same Rollup. Having this in mind, do you think that interoperability is feasible with Rollups, and if only one solution will prevail, which one would it be?