A Comparison of Rollups

Ethereum is the most actively used blockchain by transaction rate and activity; however, its rapidly growing user base has caused scalability issues in recent years. The primary problems are the high cost of gas fees from transaction congestion and decreased transaction throughput rate across the network. Although the rollout of the Merge seeks to resolve these issues through on-chain techniques, off-chain solutions have been the immediate solution to scalability. While there are many techniques for off-chain scaling, the method with the best combination of versatility and security is rollups.

Rollups have been one of the most effective solutions for addressing scalability on Ethereum. Even in a post Merge environment, Ethereum co-founder Vitalik Buterin believes that scaling solutions implementing rollups will still be widely used on the platform. As an investor in the DeFi landscape, understanding the technical aspects of rollups is essential for operating in the Ethereum ecosystem as it rapidly grows. This article will explore what a rollup is, what kinds of rollups there are, and how to use rollups as a user on the Ethereum blockchain.

Rollups

Scaling aims to increase transaction speed while decreasing costs; however, any scaling technique must also maintain decentralization to support the blockchain’s security. Maximizing these characteristics is called the scalability trilemma. Specifically, no scalability solution can excel in decentralization, scalability, and security simultaneously. Every scalability solution must address all three challenges while minimizing decreases in any category.

Rollups try to maximize the three characteristics of the scalability trilemma by creating a general-purpose solution that maintains the security of the Ethereum protocol. Rollups execute a bundle of transactions outside the Layer 1 blockchain and then transfer the data to the Ethereum blockchain when a consensus has been reached. Each rollup has smart contracts already deployed on Layer 1 that facilitate data transfer from off-chain to on-chain. Some form of transaction data is posted in a Layer 1 block, keeping the security provided by the mainnet Layer 1 chain.

Rollups address scalability by compressing the transaction data of multiple transactions outside the blockchain. Compression significantly reduces the amount of data that needs to be processed on the main Ethereum blockchain. As a result, the gas fees of an Ethereum rollup are reduced considerably and split across the multiple users using the rollup for their transactions. Additionally, the rollup significantly increases transaction throughput. Rather than processing each transaction independently, multiple transactions are posted to Layer 1 in a single block.

Rollups provide the most versatility while maintaining a high degree of security compared to other scalability solutions. For example, state channels are a scalability solution that involves multisig channels that settle transactions off the mainchain and send the transaction state to the main blockchain. While this ensures that the Ethereum blockchain fully secures state channels, this solution is severely hampered by its limited use cases. Another example is sidechains, a scalability solution that implements Ethereum-compatible blockchains that connect to the main Layer 1 chain through bridges. While this solution is compatible with many of Ethereum’s functionalities, the transaction consensus model is performed entirely off-chain and does not implement Ethereum’s mainnet security. Rollups provide an effective balance between these tradeoffs, performing a wide-range of transactions off-chain and posting the final result to the Layer 1 mainnet to ensure the rollup’s security.

However, different rollups use different transaction validity mechanisms to ensure the transactions within the rollup are not fraudulent. Two types of rollups implement different validity mechanisms: Optimistic rollups and ZK-rollups.

Optimistic Rollups

Optimistic rollups assume that all transaction data posted to Layer 1 are valid upon submission. To counter fraudulent transactions, optimistic rollups provide a set time period for other users in the rollup to submit a dispute resolution. If another user finds a fraudulent transaction, that user submits a fraud proof against that specific transaction. When a fraud proof is submitted, the suspicious transaction is executed again except on the Layer 1 Ethereum blockchain to confirm whether or not the transaction is valid. Both parties in this situation have staked Ethereum in the rollup that will be lost if either party acts dishonestly.

ZK-Rollups

ZK-rollups or Zero-Knowledge rollups implement Zero-Knowledge proofs to confirm transaction validity. Rather than having a fraud proof system like Optimistic rollups, each bundle of transactions submitted to the Layer 1 chain includes a cryptographic SNARK (Succinct Non-Interactive Argument of Knowledge) proof. The proof is verified by a smart contract deployed on the Ethereum mainnet which maintains the state of all transactions within the rollup. The state of these transactions can only be modified by a validity proof, meaning that only the validity proof needs to be stored on Layer 1 as opposed to all transaction data.

Optimistic Rollups vs ZK-Rollups

Both optimistic and ZK-rollups move the computation of transactions off-chain while keeping important transaction-related data on-chain. However, the different methods of transaction validity result in pros and cons with each system. Below are some of the key differences between using optimistic and ZK-rollups.

Scalability

Optimistic rollups provide higher scalability than ZK-rollups regarding computational work. Specifically, optimistic rollups do not require additional computations to put transactions on chain. In contrast, ZK-rollups require the calculation of validity proofs before creating transaction state changes on the Layer 1 chain. However, optimistic rollups need longer periods to confirm validity in exchange for less computational work. This is because of the week-long challenge period where other users in the rollup can submit fraud proofs. ZK-rollups validate transaction consensus immediately upon submission, resulting in quicker validation rates. While the time to finality for optimistic rollups is usually a week, the time to finality for ZK-rollups is only 20 minutes.

Cost

A rollup can split its costs into fixed and variable costs. Fixed costs are the amount of gas required for any rollup, whereas variable costs increase with each additional transaction added. ZK-rollups have significantly higher fixed costs than optimistic rollups since submitting a validity proof requires a large amount of computational work. However, the variable costs for optimistic rollups are higher than ZK-rollups. This is because ZK-rollups only post the validity proof of each transaction in the rollup. Optimistic rollups post all transaction data to the blockchain, substantially increasing with each additional transaction. Because of the low variable costs, ZK-rollups are used when there are many transactions.

Security

In regards to privacy, optimistic rollups can only provide privacy solutions available on the base layer of the Ethereum blockchain. This is because optimistic rollups provide all transaction data on the Layer 1 blockchain, meaning that this data can only be privatized by Ethereum Layer 2 solutions. However, ZK-rollups have a greater degree of privacy due to the nature of their transaction data. Rather than posting the entire transaction data to the chain, the ZK-rollup only provide a validity proof. In terms of transaction security, the different mechanics of each rollup determines how accurately transactions are validated. For optimistic rollups, the crypto-economic incentive for users to participate in fraud proofs ensures that users pay attention to fraudulent transactions. For ZK-rollups, the security of each transaction is based on the effectiveness of the zero-knowledge validity proof in finding fraudulent transactions.

Risk of Rollups

While rollups implement the security of the Ethereum Layer 1 blockchain, there still exists general use risks. The first is that the smart contracts that determine the transfer of rollup data can contain programming bugs. While there exist fail safes and audits that prevent bug exploits, relying on an external platform to handle transactions can carry risks. Additionally, because both optimistic rollups and ZK-rollups are in their infancy of implementation, the networks that host rollups are still centralized. The development teams of these rollups maintain partial control over the network of their implementations, which this team could pause or switch off at their discretion. Rollups also still depend on centralized sequencers to assist in the transaction coordination of rollups in the Layer 2 chain. This sequencer is unable to modify transactions but could censor them to extract benefits from this authority. To address these centralization issues, networks that provide rollups are beginning to implement decentralization efforts, such as Optimism which has been incorporating community governance systems.

How to use Rollups

Using rollups is similar to transactions on any other network or DeFi platform. The general outline of the process is the user bridges funds to the Layer 2 network and completes transactions that the investor wants to be added to the rollup. Once the transactions have been completed, investor funds can be transferred back to Ethereum. In order to bridge funds to the Layer 2 network, the user must pay transaction fees depending on the network. Networks like Optimism charge transaction fees for each transaction, which are significantly cheaper than gas fees used for normal Ethereum transactions. Other networks like Loopring require minimal gas fees due to its unique token ecosystem. Some protocols that provide rollup solutions also have tokens that rely on the technology. For example, Loopring and Boba have tokens whose value is determined by the growing use of rollups as a scaling solution.

Despite the Merge being the first step in on-chain scaling solutions, rollups are still highly utilized in the Ethereum ecosystem as an instant solution. In the next coming years, optimistic and ZK-rollups will battle for supremacy to determine which type will be best for the rapidly growing Ethereum user base. Ultimately, rollups will only increase as Ethereum and DeFi applications continue growing and require optimized scaling solutions to maintain network efficiency.

Thanks for your time — Juanbug.

--

--

Thoughtfully Apeing in DeFi @pennblockchain

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store