- Introduction
- Why Does Ethereum Need to be Scaled?
- Ethereum Scaling Solution
- What are Blockchain Rollups?
- Why do we need Blockchain Rollups
- Optimistic Rollups
- zk – Rollups
- Comparing zk-Rollups and Optimistic Rollups
- Conclusion
Introduction
Ethereum has become a household term in the world of cryptocurrency and Web3, and for good reason. Following the successful completion of the Merge last year, Ethereum has been actively implementing a series of upgrades. Ethereum’s meteoric rise in popularity can be attributed to its ability to foster the growth of innovative blockchain products, such as NFTs and DeFi. The continuous development of new applications and innovations within the Ethereum ecosystem has contributed to its sustained growth.
However, one significant challenge that needs to be addressed for further progress is the scalability issue plaguing the Ethereum network. The rapid expansion of Ethereum’s activity has sparked debates about the best scaling solution. Many of these scaling solutions are tailored specifically for Ethereum. The need for these specific scaling solutions has intensified because transactions on the Ethereum network have become increasingly costly. Moreover, Ethereum’s core developers are diligently working to improve the blockchain’s speed and cost efficiency over the next few years through a series of updates, beginning with The Merge. Rollups are the solution that can provide the ideal scalability solutions that the ecosystem demands.
Why Does Ethereum Need to be Scaled?
Every action you take on a blockchain is essentially a transaction. Whether it’s creating NFTs, sending cryptocurrency to someone, exchanging tokens, participating in staking, or engaging in yield farming, each of these actions involves a transaction. On blockchains like Ethereum, these transactions require you to pay gas (in ETH) to cover the transaction fees.
However, when the Ethereum mainnet experiences a high level of activity, it can become congested. This congestion results in slower transaction processing times, increased transaction fees, and in some cases, transactions that fail to go through.
Scalability is the solution to these issues. It involves increasing the speed at which transactions can be processed and reducing the associated transaction fees. Importantly, these scalability improvements are made without compromising Ethereum’s core principles of decentralization and security.
Ethereum Scaling Solutions
Ethereum Scaling is done to increase transaction speed and throughput without compromising Ethereum’s core principle of decentralization. Scaling solutions are being explored in two main directions.
- On – Chain Scaling
- Off – Chain Scaling
On – Chain Scaling
On-chain or Layer 1 scaling solutions involve boosting the capacity of the fundamental blockchain layer by expanding the number of transactions that can be accommodated within a block. In the context of Ethereum, implementing on-chain scaling would entail making alterations to the Ethereum Mainnet protocol itself. However, increasing the volume of data and transactions that a single Ethereum block can handle would also necessitate more robust hardware requirements for running a node. This has the potential to limit the number of nodes in the network and could impact its decentralization.
Nevertheless, Ethereum 2 introduces the concept of Sharding, which involves dividing the Ethereum infrastructure and database. Sharding aims to alleviate the burden on individual nodes by distributing the workload across multiple shards or segments. It’s a more comprehensive and sophisticated approach to scaling compared to simple on-chain scaling.
Off – Chain Scaling
Off-chain scaling solutions are designed to enhance the scalability of the primary Layer 1 blockchain indirectly. They achieve this by introducing additional layers to handle transactions without directly involving the core blockchain. In the context of off-chain scaling, the primary blockchain layer serves as a trust and arbitration layer. This approach is often referred to as Layer 2 scaling, as it adds an extra layer on top of the primary Ethereum blockchain.
Layer 2 scaling is considered a prompt solution to address Ethereum’s scalability issues while preserving decentralization. Implementing Layer 2 solutions typically involves the development of additional hardware or complex software, which can take some time before their effects are fully realized. These Layer 2 solutions derive their security from Ethereum and can be tailored and operated by individuals, organizations, or communities to suit specific use cases. Off-chain scaling solution includes sidechains, rollups, state channels and plasma.
What are Blockchain Rollups?
Rollups operate by executing transactions and managing the network state off-chain, gathering these transactions into a single batch, and then posting this batch to the base layer of the blockchain. This approach allows the base layer to process a group of transactions in one go, significantly reducing the workload associated with transaction execution and state storage. Consequently, rollups can greatly enhance the efficiency and transaction throughput of the base layer.
The rollup system is established through an anchor smart contract that resides on the base layer. This smart contract plays a crucial role in managing the network and overseeing the operations of a centralised node known as the sequencer. The rollup sequencer assumes responsibility for storing the network’s state, executing transactions and smart contracts, and creating and transmitting batches of transactions to the base layer. It’s evident that the sequencer is vital for the proper functioning of a rollup network. Rollups offer a primary advantage in scalability, hence their categorization as a Layer 2 scaling solution. They can substantially boost transaction throughput while reducing transaction costs.
Why Do We Need Blockchain Rollups?
Blockspace holds inherent value as it serves as the resource that powers data storage on blockchains. However, there is a finite number of transactions that can be included in each block. For instance, Ethereum blocks cannot exceed a size of 30 million gas, but the target and average block size is around 15 million gas. Consequently, individuals competing to have their transactions included in blocks is common practice. Traditionally, blockchains determine which transactions make it into a block through a form of gas bidding. If the number of transactions surpasses the blockchain’s capacity to process, confirm, and store them, users might be compelled to engage in intense gas bidding to secure a spot in the network’s limited blockspace. This system inevitably establishes a supply and demand relationship around blockspace, with the current transaction cost and the quantity of transactions per block situated at the intersection of supply and demand vectors.
These challenges emerge in blockchains with limited scalability, which refers to a blockchain network’s ability to handle an increasing volume of transactions. Blockchains lacking scalability can burden users with sluggish transaction times, high gas fees, or transactions that go unprocessed. Therefore, scalability is crucial for making a blockchain network usable, as a lack of it can lead to reduced adoption. Consequently, many blockchains prioritize scalability, sometimes even at the expense of other aspects of technology, such as decentralization.
For blockchains like Ethereum, which prioritize decentralization over scalability, the need for scaling solutions becomes apparent to ease the load of transaction execution. Currently, Ethereum’s primary focus for scaling is on rollups, with the goal of increasing the network’s transaction throughput from 15 transactions per second to over 100,000, in conjunction with other upgrades. Rollups were chosen as Ethereum’s designated scaling solution due to the imperative nature of scalability for blockchain networks and their ability to effectively cater to the niche of off-chain execution.
Optimistic Rollups
Optimistic rollups operate under the assumption that the transaction data being submitted to the Ethereum network is accurate and valid from the outset. In the event of an invalid transaction, a dispute resolution process comes into play. Here’s how it works: one party submits a batch of transaction data to Ethereum, and if someone detects a fraudulent or erroneous transaction within that batch, they can provide evidence of this fraud, known as a “fraud proof.” Importantly, both parties involved, the one who submitted the transaction data batch and the one who raised the fraud proof,have their ETH tokens staked. This means that any misbehaviour or wrongdoing by either party would result in the loss of their ETH tokens.
When a fraud proof is submitted, the questionable transaction is re-executed, but this time on the main Ethereum network to verify its legitimacy. To ensure that the transaction is replayed with the exact state it had when it was originally executed on the rollup chain, a manager contract is created. This manager contract replaces certain function calls with the state data from the rollup, ensuring an accurate re-execution of the transaction on the Ethereum network.
Optimistic rollups come with its own challenges. They have the presence of a challenge period which increases the time to finality of a transaction. Due to this withdrawals on optimistic rollups are delayed as the challenge period needs to lapse before the funds can be released. In optimistic rollups, all transaction data must be posted on the main blockchain to finalize transactions. In contrast, zk-rollups only require validity proofs to be submitted on-chain, reducing the amount of data that needs to be processed on the blockchain. Thus optimistic rollups seem less efficient than zk-rollups.
zk – Rollups
Zero-knowledge rollups are protocols designed to optimize the processing of transactions. For each batch of transactions, a zk-rollup operator submits a summary of the necessary changes that need to be made once all the transactions in the batch have been executed. These operators also play a critical role in generating validity proofs, which are used to demonstrate the accuracy of these changes. Notably, these validity proofs are significantly smaller in size compared to the full transaction data. This characteristic makes them faster and cheaper to verify. On some chains (like Ethereum), zk-rollups further reduce the amount of transaction data through compression techniques when recording transactions on the blockchain. This reduction in data size leads to reduced user fees.
Zk-rollups leverage zero-knowledge proofs (ZKP) to validate transactions. These ZKPs are employed by an entity known as the prover, who aims to convince another party, referred to as the verifier, that they possess certain knowledge, thereby confirming the validity of a transaction. The prover provides a mathematical proof, generated in a way that only they can produce. The verifier then utilises this mathematical proof to verify the validity of the transaction. Importantly, this information can be validated without disclosing its contents to the verifier, ensuring privacy and security in the process.
Comparing zk-Rollups and Optimistic Rollups
Below is a summary comparing optimistic and zk-rollups.
Conclusion
With the surging demand for cryptocurrencies, current blockchains are facing significant challenges, including high gas fees and slow transaction times. Blockchain technology has introduced exciting innovations like games, NFTs, DAOs, and DeFi. However, these innovations often come with costly gas fees on the Mainnet and sluggish transaction processing. In response, Layer 2 rollups have emerged as a promising solution to enhance scalability.
Rollups aim to address these issues by alleviating congestion and improving gas fees while preserving security and privacy. This scalability is crucial for the broader adoption of web3 technologies and for providing users with a seamless experience when interacting with dApps.Ultimately, rollups represent a significant innovation in the world of scaling solutions, shaping a transformative shift in how transactions are executed within the modular blockchain ecosystem.