Ethereum Rollups: The Cornerstone of Scaling
Rubin
![Ethereum Rollups: The Cornerstone of Scaling](https://ghost.thedapplist.com/content/images/2022/12/Ethereum_rollups-1.png)
Ethereum scaling has been a popular topic in crypto. Scaling debates are usually sparked by high network activity such as the CryptoKitties craze in 2017, DeFi Summer of 2020, the crypto bull market at the beginning of 2021 or the merge in September, 2022. Because of this consistently increasing demand for the Ethereum network, network congestion along with extremely high gas fees are inevitable. Due to this, users are often forced to pay exorbitant fees in order to complete their transactions. For the Ethereum community, solving this problem has been one of the top priorities
Ethereum is making advances that improve its functionality by increasing the number of transactions per second (TPS) and reducing transaction costs. Even so, a recent issue has surfaced as users attend to other matters. Due to this capacity issue, several developers have begun exploring alternative solutions for Ethereum scalability. That being said, what exactly are “Rollups”?
In this article we'll explain what roll-ups are, how they work and how they can be applied to Ethereum.
What are RollUps?
Rollups, Unlike Plasma and Channels, are a "hybrid" layer 2 solution, which allows the creation of blockchain-based applications that have an additional feature of scalability. In layman's terms, a rollup takes multiple Ethereum transactions and compiles them into one piece of data before submitting them all to the blockchain. Consequently, scalability is increased and the cost of transacting is reduced.
Imagine that a block can only carry out 100 transactions. Ethereum will pick the 100 highest bids first if 100,000 people want to do a transaction simultaneously. Due to the fact that gas fees are based on demand on the blockchain at a given time, they can become very expensive over time. However, if you could include ten transactions in one piece of data, what would that look like?
It would have been possible to process 1,000 transactions per block instead of 100, simply by using the data portion instead of the transaction portion.
The rollup process executes transactions on layer 2, then posts the data on layer 1, where consensus is achieved. By keeping transaction data in layer 1 blocks, rollups benefit from Ethereum security.
To have a better understanding, let's check what Layer-1 and Layer-2 scaling is all about.
Scaling: Layer 1, Layer 2 and Sidechains
To scale Ethereum or most other blockchains, there are basically three methods: scaling the blockchain itself – layer 1 scaling; building on the side of layer 1 – Sidechains and building on top of layer 1 – layer 2 scaling.
Using the former technique (Layer-1 scaling) has the significant disadvantage of making blockchains with "bigger blocks" inherently challenging to verify. In order to avoid such risks, developers can either make client software more efficient or, more sustainably, use techniques like sharding, which spreads the work of building and verifying the chain across many nodes to reduce risk; this upgrade to Ethereum is currently being developed by the effort "Ethereum Upgrades".
Meanwhile, sidechains are usually EVM-compatible and are capable of scaling general-purpose applications. In contrast to layer 2 solutions, they rely on their own consensus model instead of Ethereum's security, which makes them less secure.
The latter technique (Layer-2 scaling), involves users performing the bulk of their activity off-chain in a "layer 2" protocol, rather than putting all activity on the blockchain directly. There is a smart contract on-chain, which only has two tasks: processing deposits and withdrawals, and ensuring that everything happening off-chain is following the rules. The proofs can be verified multiple ways, but they all share one very important feature: they are much cheaper if they are verified on-chain than if they were computed off-chain. Here, Channels, Plasma and Roll Ups come to play.
![](https://ghost.thedapplist.com/content/images/2022/12/image-10.png)
How does a rollup work?
Rollups are networks of powerful nodes that process transactions swiftly and post only compressed versions of transaction data through the base layer.
Vitalik explains the mechanism by using the State and Merkle root concepts. The smart contract on-chain maintains a state root: the Merkle root of the rollup state (meaning, the account balances, contract code, etc, that are "inside" the rollup).
![](https://ghost.thedapplist.com/content/images/2022/12/image-11.png)
Using Merkle, anyone can publish a batch, a collection of transactions compressed together with the previous state root and the new state root (the Merkle root after the transactions have been processed). Upon determining that its previous state root matches its current state root, the contract switches the state root.
In layman terms, The Process involves :
- Executing transactions
- Taking the data from the transactions
- Compressing the data
- Rolling the data up to the main chain in one single batch
How does Ethereum know that the posted data is valid?
The exact answer depends on how the rollup is implemented. In general, each rollup implements smart contracts on Layer 1 responsible for processing deposits, withdrawals, and verifying proofs. Proofs also serve as the main distinction factor between different types of rollups.
Optimistic rollups use fraud proofs, whereas, ZK rollups use validity proofs. Below explained are the types of rollups for better understanding.
Types of Rollups
There are 2 types of rollups:
Optimistic Rollups:
An optimistic rollup is a layer 2 (L2) protocol that is designed to increase the throughput of Ethereum's base layer. By processing transactions off-chain, they reduce computation on the Ethereum main chain, improving processing speeds significantly. The optimistic rollup differs from other scaling solutions, such as sidechains, in that the Mainnet derives security from the transaction results published on-chain, or plasma chains, which verify transactions on Ethereum but store the transaction data elsewhere.
As computation is the slow, expensive part of using Ethereum, optimistic rollups can offer up to 10-100x improvements in scalability. The use of optimistic rollups also reduces users' gas costs since transactions are written as calldata to Ethereum.
It is termed "optimistic" because it assumes that off-chain transactions are valid, yet publishes no proof of value for the transaction batches posted on-chain. Rather, they rely on a fraud-proofing scheme to detect incorrectly calculated transactions. During the challenge period, anyone can challenge the results of a rollup batch by computing a fraud proof during which the results of a rollup batch are submitted.
Use Cases:
- Arbitrum One: Provides fraud proofs only for whitelisted users. Some of the most notable projects on Arbitrum are Uniswap, Sushi, Bancor, Augur, Chainlink, Aave and many more.
- Optimism: It has been partially rolled out to the Ethereum mainnet with a limited set of partners such as Synthetix or Uniswap to ensure that the technology works as expected before the full launch.
ZK Rollups:
A zero-knowledge rollup (ZK-rollup) is a layer 2 scaling solution that moves computation and state storage off-chain. With ZK-rollups, thousands of transactions can be processed in one batch, but only a minimal amount of summary data will be posted to Mainnet. There are some cryptographic proofs that the changes to the Ethereum state should be made in accordance with the summary data.
Ethereum smart contracts maintain the state of the ZK-rollup. In order to update this state, ZK-rollup nodes need to submit a validity proof. Validity proofs serve as cryptographic assurances that the state-change proposed by the rollup is really the result of the given transaction batch. Therefore, ZK-rollups are only required to provide validity proofs in order to finalize transactions on Ethereum instead of posting all transaction data on-chain.
When funds are moved from a ZK-rollup to Ethereum, exit transactions are executed after the ZK-rollup contract verifies the validity proof. In contrast, withdrawals from optimistic rollups are delayed to allow anyone to challenge the exit transaction with evidence of fraud.
Use Cases
- Loopring: Loopring uses ZK rollup technology to scale its exchange and payment protocol.
- Aztec: Aztec focuses on bringing privacy features to their ZK rollup technology
Conclusion
As a Layer 2 solution, rollups are up there with the best, and in some respects, they may even outperform the alternatives. It is no coincidence that Ethereum's co-founder, Vitalik Buterin, is quite fond of rollups and regards them as a natural fit with PoS and sharding.
![pattern-left](/_next/static/media/newsletter-pattern-left.823a6c8a.webp)
![pattern-right](/_next/static/media/newsletter-pattern-right.b0e28eca.webp)
Subscribe to receive Alpha!
Join 4.3k subscribers from renowned companies worldwide and get a weekly update in your inbox. Stay updated on the latest and finest projects and product updates.