Blockchain scalability is the bottleneck that keeps the digital ledger from being able to accommodate high demands. Blockchains have struggled to maintain high transaction speed with low costs without sacrificing their decentralization and security. With many developers and investors looking for ways to solve the trilemma of the blockchain, considerable layer-1 and layer-2 solutions emerged to tackle the scalability issues. One evident layer-2 solution to rise is blockchain rollups.
Blockchain rollups might be among the solutions that will put blockchain into a scalable decentralized database that might become the backbone of major sectors. So, let’s see what blockchain rollups are all about, how they work, and the benefits and drawbacks of this layer-2 solution.
What Are Blockchain Rollups?
Blockchain rollups are protocols that aim to increase a network’s throughput at a low cost, without sacrificing its security. How? Let’s take this one step at a time.
Blockchains store transactions in blocks. However, these blocks have limited space in which they can store data. Meaning, each block can hold a certain number of transactions. Therefore, the increase in blockchain users causes network congestion, affecting the speed and efficiency of the digital ledger. This is what is referred to as not scalable.
We can store two types of information on a blockchain mainnet (layer 1): transactions and data. Transaction information can take up a lot of space on the network and on-chain processing can become heavy. However, data resulting from transactions is less heavy and can be processed faster.
Therefore, in order to minimize the large on-chain processing of whole transactions, we can store and process transactions off-chain and only submit the resulting data to the main network. Batching up transactions into a single data is called blockchain rollup.
Blockchain rollups bundle up transactions off-chain on a different network, turn them into one single transaction and then submit them back to the mainnet. This is why blockchain rollups are referred to as off-chain or layer-2 solutions. Any layer-1 solution can implement blockchain rollups to improve network efficiency and increase the number of transactions processed.
There are two types of blockchain rollups: Optimistic rollups and Zero-Knowledge rollups.
Optimistic rollups batch transactions and process them off-chain by assuming that each transaction batch within the rollup is valid. This optimistic assumption is where this rollup got its name. After submitting the optimistic rollup batch to the mainnet, anyone has the ability to challenge these transactions within a certain time window.
This technique is a type of fraud-proof mechanism where transactions are assumed to be valid until proven incorrect. If the fraud-proof succeeds, the protocol will execute the transaction again and update the rollup accordingly. However, if within the 7-day window no one challenged the correctness of transactions, the batch of transactions is said to be valid and is added to the mainnet.
However, since the challenge time window is usually 7 days, this means that withdrawing funds from an optimistic rollup to the mainnet can take some time.
Pros and Cons of Optimistic Rollups
Although optimistic rollups are layer-2 solutions that aim at solving blockchain’s scalability problems, they have their benefits and drawbacks.
- Improve scalability without sacrificing security.
- Fraud proving ensures a trustless waiting period and allows honest validators to secure the blockchain.
- Computing fraud-proof is easy and doesn’t require special hardware.
- Compatible with Ethereum Virtual Machine (EVM) and Solidity programming languages, which makes it easier for developers to deploy Ethereum-based smart contracts to rollups.
- Long waiting period due to potential fraud challenges.
- Rollup operators (sequencers) might become too centralized, affecting transaction ordering.
- The unavailability of honest nodes can allow malicious validators to steal funds by publishing invalid blocks.
Another type of blockchain rollups is the zero-knowledge rollup. This type of blockchain rollup is similar to the Optimistic rollup in terms of bundling up transactions off-chain before submitting a rolled-up version on the main chain. However, ZK-rollups differ in terms of transaction verification.
ZK-rollups are based on zero-proof technology and therefore submit validity proofs instantly to the mainnet. That means users don’t have to wait several days before withdrawing their funds from the layer-2 solution like they have to do with Optimistic rollups.
ZK-proof is a cryptographic method that allows one party (the prover) to prove to another party (the verifier) that a given statement is true, without revealing any additional information beyond the statement’s truth.
In a ZK-rollup, transactions are bundled up off-chain and processed by a smart contract on the main chain. When a user submits transactions to the rollup, a prover generates proof that the transactions are valid using the zero-knowledge proof protocol. The proof is then submitted to the main chain.
Pros and Cons of ZK-Rollups
Let’s see some of the benefits and drawbacks of ZK-rollups.
- Zero-knowledge proof ensures the validity of transactions and prevents validators from submitting invalid data.
- Less to no waiting period as compared to Optimistic rollups, since the validation process is done instantaneously. Users can withdraw funds with no delays.
- Counts on a cryptographic mechanism instead of the honesty of several actors.
- Higher cost to operate than Optimistic rollups.
- Difficult to build EVM-compatible ZK-rollups because of the complexity of zero-knowledge proof.
- Requires expensive hardware to operate.
Are Blockchain Rollups the Future of Blockchain?
So, is there a verdict on which blockchain rollup is the best? Well, ZK-rollups appear to be the more secure version of the Optimistic rollups due to the use of cryptographic proofs. However, Optimistic rollups are much easier to use and facilitate the widespread adoption of blockchain rollups. Also, Optimistic rollups can be the better choice for DeFi projects since they are compatible with the Ethereum Virtual Machine (EVM).
However, both types of rollups are still in their infancy and might carry the risk of centralization from the way they operate. It’s important to note that with the ever-so-growing adoption of blockchain technology, scalability issues will grow proportionally. This might lead developers to rigorously upgrade rollups and innovate new layer-2 solutions that will create a faster and more efficient blockchain.