What are Rollups? Ethereum’s scalability solution

Tiempo de lectura: 4 minutos

From the very first beginnings of cryptocurrencies, with Bitcoin, one question resonated in the discussions of skeptics, and also of the passionate: “How are we going to scale the blockchain?”

 

As the blockchain consists of a distributed registry of transactions, it cannot allow many transactions or it will end up centralized (few could maintain the registry due to its high cost). The possibility of not depending on third parties (running a node) is diminished if the blockchain grows too much. As a curious fact, the first of all the criticisms that Bitcoin received (in 2008) was for scalability!

 

After many years we have reached an advanced point in scalability research. In this scenario we can distinguish 3 major solutions (called second layer) with their own tradeoffs. These are paid channel networks (such as Lightning Network), Plasma (such as Polygon) and Rollups.

 

In this article we will discuss Rollups, scalability solutions for smart contract platforms, such as Ethereum, which are extremely promising.

What are Rollups? Understand how they work

Rollups are smart contracts that hold a certain state in a compressed form. For example, the status can be that John has 3 ETH and Albert has 5 ETH. When Rollup users make transactions, these transactions are grouped in batches and processed by changing the state. If John makes a transfer of 1 ETH to Albert, the new status will be: John, 2 ETH and Albert, 6 ETH.

 

As with all second-layer solutions, what we are looking to do is to perform transactions off-chain, outside the blockchain. This is done to achieve much higher transaction throughput (we are not as constrained by the blockchain) and reduce fees.

 

Therefore, the state of the rollup is computed, not by the miners and nodes of the blockchain, but by other users off-chain. In other words, the computation (transactions and smart contract executions) is done off-chain, and only a summary of the current state and batches of compressed transactions remain on the blockchain.

 

And here is the crux of the matter. How can the blockchain verify that, if John takes money out of the Rollup, he will take out his current balance? Note that it cannot compute that balance to verify it (the computation is off-chain).

It turns out that we have two ways of doing this, which differentiate the 2 types of Rollups: Optimistic Rollups and ZK-Rollups.

Qué son las Rolllups

Optimistic Rollups

In Optimistic Rollups, Rollup processors put their money in play, and withdrawing funds from a Rollup takes one week.

 

If John has agreed with the Rollup processor and tries to withdraw 3 ETH (instead of 2, which he would have according to our example) he will have to wait for a week. This time is enough for another honest processor, from the same Rollup, to identify the cheating transaction and earn all the money from the attacking processor (who agreed with John, or who could be John himself).

 

This model is called “optimistic” because you need at least one honest processor online (who has calculated the current state and can identify cheating transactions). Honesty is rewarded by earning money, and dishonesty is punished by losing it.

 

In short, this means, “The blockchain trusts Rollup by default, but if someone proves otherwise that state is reversed.”

Zero Knowledge Rollups

Zero Knowledge Rollups (ZK-Rollups) do not require prior incentives. Their operation is based on a cryptographic technology called ZK-SNARKS. This very complex mathematical technique allows to prove cryptographically that a computation has been carried out.

 

Moreover, the cost of verifying the proof is very low. This layman block fits perfectly with our purpose, to perform off-chain computation that can be verified on-chain (on the blockchain).

 

Unlike Optimistic Rollups, every batch of transactions (and status therefore) is verified by the blockchain thanks to mathematical proof (rather than only those that are challenged by honest processors).

Qué son las Rolllups

Advantages and disadvantages

Each model has its own advantages and disadvantages. In Optimistic Rollups you can publish batches of transactions faster because the blockchain trusts it by default. Gas costs are lower because, in most cases, the blockchain does not verify a cryptographic proof.

 

Add to that that their technology is simpler, it is much easier to implement a general purpose Optimistic Rollup (which implements the entire EVM) and off-chain computing is less expensive because you don’t have to create a cryptographic proof.

 

On the downside, more on-chain information has to be recorded for each Rollup transaction (although it is still very small compared to an on-chain transaction) and withdrawals take a week.

 

On the Zk-Rollups side we have instant funds withdrawals, although they are not currently in general use (they do not implement the entire EVM) due to the prematurity of the technology.

What the future holds

However, although Optimist Rollups seem better, many developers, such as Vitalik himself, believe that ZK-Rollups, once developed, will be superior.

 

These will allow instant withdrawals, will be general purpose, will not rely on honest processors and will be more efficient in terms of on-chain information.

 

The fundamental problem with rollups is that they require leaving information on-chain (between 10 and 15 bytes per transaction). This means that rollups cannot scale infinitely as the blockchain acts as a bottleneck.

 

However, Ethereum is on its way to sharding with Ethereum 2.0 (despite its risks and disadvantages of being layer one scalability). By scaling the layer one or blockchain in this way, it will be able to greatly improve its performance with rollups reaching tens of thousands of transactions per second.

 

Bitcoin will probably also implement the ZK-SNARKS technology when it has matured, perhaps 5 to 10 years. In this case Bitcoin will scale only at layer two to remain, in keeping with its philosophy, as decentralized as possible.

 

Rollups, especially Zero Knowledge, are likely to mark a new chapter in the scalability of blockchains. Although we are years away from the blockchain’s peak, its development is being much more accelerated than that of the Internet and we have already come up with the solutions needed to scale its use. Satoshi would be proud!


Leave a comment
Your email address will not be published. Required fields are marked *