paint-brush
Roll-ups: Here's Why It's The Ultimate Solution To The Blockchain Scalability Issue by@gloriasilver

Roll-ups: Here's Why It's The Ultimate Solution To The Blockchain Scalability Issue

by Gloria TejuoshoNovember 14th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

What are roll-ups? How do roll-ups efficiently scale the blockchain networks without sacrificing decentralization or security? This article will provide answers to these questions.
featured image - Roll-ups: Here's Why It's The Ultimate Solution To The Blockchain Scalability Issue
Gloria Tejuosho HackerNoon profile picture

Introduction

'What use are the key features of blockchain if it can’t efficiently handle a large number of users at a time?' This question concerns the scalability issue the blockchain ecosystem is currently facing.


Blockchain technology possesses several significant features that have led to its wide adoption across several industries. One of its key features is decentralization, which ensures the blockchain is not controlled by a single entity and provides a trustless system.


Blockchain technology also employs several security techniques, such as digital signatures, hash functions, and public keys, to tighten the network's security. However, as the number of users in the network increases, it struggles to efficiently process their transactions, thereby leading to high fees


This is a result of the limited block space in the blockchain since they can only process a limited number of transactions. If the number of transactions to be processed exceeds the network capacity, the network will become congested. This often leads to slow transaction processing speed, slower confirmation time, and high gas prices.


Resolving this scalability issue is a difficult task because blockchain networks cannot offer decentralization, security, and scalability simultaneously. This is termed the ‘blockchain trilemma’.


The blockchain trilemma refers to the concept that describes the limitations of the blockchain system to possess decentralization, security, and scalability simultaneously. It states that a blockchain network can only possess two of these three critical features. That is, if a blockchain network is decentralized and secured, then its scalability will be sacrificed.


Sacrificing any of these features is not a feasible option; otherwise, the blockchain will not attain its optimality. This challenge raises the need for a solution to efficiently tackle this problem.


This is where the power of Roll-ups comes into play.


What are roll-ups? How do roll-ups efficiently scale the blockchain networks without sacrificing decentralization or security?


This article will provide answers to these questions.

Layer-1 and Layer-2 Network

Before explaining what Roll-ups are, let's understand the concept of layer-1 and layer-2 networks.

Layer-1 Network.

Layer-1 is the foundational layer of the blockchain architecture that executes and validates transactions without the support of additional layers. However, it has a limited number of blocks, which makes it unable to efficiently process large transactions at a time.


An example of a layer-1 blockchain is Ethereum. It can only process about fifteen transactions per second, which means the network gets congested when there is a high demand. Other layer-1 blockchains are Bitcoin, Solana, Avalanche, etc.


Note: Layer-1 can also be referred to as the Base layer and they will be used interchangeably in this article.

Layer-2 Network

Layer-2 is a secondary protocol built on top of Layer-1. It is a solution designed to increase the functionalities and efficiency of the layer-1 blockchain. Think of the layer-2 network as a flyover built on top of a highway(layer-1). The function of a flyover is to reduce congestion on the highway and facilitate faster vehicle movement by providing another route on the highway.


This is similar to the way layer-2 works. It is built on top of layer-1 to reduce network congestion by offloading transactions from the on-chain network and processing them off-chain while still inheriting the underlying security of the layer-1 blockchain. Roll-ups are one of the most popular types of layer-2 scaling solutions.

What Are Roll-Ups?

Roll-ups are layer 2 scaling solutions that help increase the scalability of the blockchain network without sacrificing decentralization and security. They achieve this by offloading transactions from the layer-1 blockchain and processing them off-chain.


Once a user submits a transaction, an operator (entity responsible for processing transactions) picks it up and bundles multiple transactions into a single batch. Then the batch transaction is submitted to the layer-1 network.


The process of offloading transactions from layer-1 and processing them off-chain reduces congestion and increases the transaction processing speed. Transaction costs are also reduced because the fee is now shared among all users in the transaction batch.


This makes Roll-up a viable solution to the blockchain scalability problem, as it increases transaction processing speed and reduces transaction costs.

Roll-ups

Types of Roll-ups

There are two common types of Roll-ups. The difference between them lies in how the roll-up checks the validity of the transactions.


  1. Zero-knowledge Roll-up: This is a type of roll-up that uses zero-knowledge proof (ZKP) to verify transactions processed off-chain. ZKP, also known as validity proof, is a mechanism whereby a party known as a prover proves the validity of a transaction to another party, called a verifier, without revealing all the information.


    A simple analogy of how this proving system works is a scenario where you want to prove that you meet a certain age requirement without revealing your actual date of birth, place of birth, or any other sensitive information. You can achieve this by using your birth certificate to generate proof such as a statement that displays ‘I am over 18 years old’. Then you can tender this proof while the verifier verifies it without knowing any other information about you.


This is similar to the way batched transactions are verified. For each batch transaction processed off-chain, a proof is generated and submitted to layer-1. The prover uses this proof to prove that the transactions processed off-chain were done correctly, while the verifier verifies the validity of the transaction without knowing its entire information. After the verifier confirms that it's valid, the batch transaction is added to layer-1.


The process of using validity proof to verify transactions ensures that the security of the network is not compromised. Therefore, Zk Roll-up provides a solution to the blockchain scalability issue without compromising the security of the network. Examples of Zk roll-ups are Zksync Era, Polygon, and Starkware.


  1. Optimistic Roll-up: In optimistic roll-up, the process of verifying transactions processed off-chain is different from Zk Roll-up. Optimistic Roll-up assumes that the off-chain transactions are valid by default. They operate on the principle of ‘innocent until proven guilty'. This means that they don't publish proof of validity for off-chain transactions.


Once a user submits a transaction, a sequencer (an entity responsible for ordering and processing transactions) picks it up and processes it off-chain. The processed transactions are then submitted with the new layer-2 state (the state of the roll-up after the submitted transactions were executed) back to layer-1.


To ensure the validity of the submitted transaction, the verifier nodes compare the expected state of the transactions with the proposed one submitted by the sequencer. If there's a difference between them, that signifies a potentially fraudulent transaction. A time frame known as the challenge period occurs when the verifier challenges the sequencer that submits the transactions by using fraud-proof.


Note: It is only when they detect potentially fraudulent activities that they initiate fraud-proof.


The fraud-proof will execute the transaction processed off-chain on layer 1 to ensure it is not manipulated. If the result of the fraud-proof is different from the one submitted by the sequencer, the initial bond of the sequencer (the amount staked as a pledge to act honestly) will be slashed and the transaction will be erased and recomputed.


This process helps to ensure that scalability is increased without compromising the security and decentralization of the blockchain network. Examples of blockchains that use optimistic roll-ups are Optimism, Base, and Arbitrum.

Advantages of Roll-ups

Roll-ups offer several benefits, such as:


  1. Increased scalability: Roll-up significantly increases the scalability of the blockchain network by offloading transactions from layer-1 and processing them off-chain.


  2. Reduced Cost: Roll-ups reduce transaction costs by allowing users to split the cost of processing batch transactions instead of paying for each transaction.


  3. Increased user experience: Roll-ups increase user experience by processing transactions faster and enabling faster confirmation time.


  4. Maintaining security and decentralization: Roll-ups still inherit the robust security of their underlying layer-1 network by transferring the responsibility of transaction ordering to Layer-1.

    Disadvantages of Roll-ups

Despite the numerous advantages Roll-ups offer, it's not without its drawbacks. Some of the drawbacks of roll-ups include:


  1. Fraud vulnerability: Roll-ups can be vulnerable to fraudulent activities in cases where there are issues in the roll-up itself or when there are vulnerabilities in the underlying smart contract that the roll-up is interacting with.


  2. Security Tradeoffs: The two main types of Roll-ups have their trade-offs. Zk Roll-up offers enhanced security, but it uses a complex cryptographic computation. On the other hand, Optimistic Roll-ups are simple and flexible, but they require a seven-day challenge period to verify transactions.


  3. Implementation Complexity: Implementing Roll-ups requires complex processes such as processing transactions off-chain, generating cryptographic proof (ZK Roll-up), and using fraud detection mechanisms (Optimistic Roll-up).

Conclusion

Roll-ups offer an ultimate solution to the blockchain scalability problem without sacrificing either decentralization or security. Its ability to process transactions off-chain helps to reduce congestion on the base layer, increase the transaction processing speed, and reduce cost.

References


https://coinmarketcap.com/academy/glossary/layer-1-blockchain


https://www.cyfrin.io/blog/what-are-blockchain-rollups-a-full-guide-to-zk-and-optimistic-rollups


https://www.cyfrin.io/blog/what-is-a-zk-rollup


https://www.alchemy.com/overviews/optimistic-rollups