Discover more from The Vagabond Way
Part 1: Introduction to Rollups - The Future of Scaling Blockchains
Part 1 of a 2 part series exploring the power of rollups and how they will play a key role in scaling blockchains
Part 1: Introduction
As the popularity of blockchain technology soared in 2020 and beyond, a fundamental problem was discovered by many new users; High gas fees.
As many developers, blockchain architects and crypto product managers set out to solve this glaring UX issue, many potential solutions have been created.
However, one solution which will most likely be widely adopted is a scaling technology known as rollups. But what are they, and how do they work?
Before describing what rollups are, it’s first important to differentiate between a “rollup” and a “sidechain” as well as understand a fundamental computer science problem known as the “trilemma”.
The easiest way to understand what a rollup is is to think about it as a form of compression for data. Rollups work by combining multiple transactions into a single transaction, which can then be verified more quickly and efficiently than if each transaction were verified separately. This makes rollups ideal for use in high-speed and high-volume environments such as exchanges and payment processors. This can help reduce congestion on the layer 1 blockchain and improve scalability. There are many different types of rollups, all of which have specific benefits and trade-offs. An example of a rollup is Optimism.
A sidechain is a blockchain that runs in parallel with the main blockchain. Transactions on the sidechain are validated by nodes on the main chain and vice versa. This allows for greater flexibility and scalability when it comes to managing transactions and data on a blockchain network. Sidechains, unlike rollups, run under their own chosen rules of consensus, and block parameters. An example of a sidechain is the Polygon network.
Moving on, the trilemma is a problem that affects all cryptocurrencies. It occurs when a cryptocurrency tries to satisfy three conflicting goals: decentralisation, security, and scalability.
Decentralisation means that there is no central authority controlling the currency.
Security means that the currency is resistant to fraud and hacking.
Scalability means that the currency can handle a large number of transactions.
The trilemma is that it is very difficult to achieve all three of these goals at the same time. For example, a cryptocurrency that is highly decentralised may be less secure, because it is more vulnerable to attack. Or, a cryptocurrency that is very secure may be less scalable, because it takes longer to verify transactions. The trilemma is a major challenge that all cryptocurrencies face, and there is no easy solution.
Some examples of this in practice. Ethereum is highly decentralised and secure, however, sacrifices scalability to achieve this, meaning it has high gas fees.
Whereas, a network like Binance Smart Chain has low levels of decentralisation and security, in order to minimise the cost of transactions for the end-user.
Part 2: What are Rollups?
With the innovations happening in the rollup space, Ethereum may have finally solved the last piece of the trilemma, scalability. By dumping all the complex computations on a separate chain, and signing a proof on the main chain, users need to pay a marginally smaller amount of gas fees on a rollup.
As stated above, “rollup” is a term that describes solutions built to help scale decentralised applications by handling transactions off the Ethereum Mainnet and moving burdensome, resource-constraining transactions onto a secondary layer. Unlike other layer 1 blockchains, rollup networks take advantage of the robust decentralized security model of the layer 1 network.
In a decentralised network like Ethereum, users need to bid for block space. When the network is busy, users try to outbid each other to push a transaction onto the network, which results in massive gas spikes, dropped transactions and the slowing of the network. However, by moving the computational load off the layer 1 onto a rollup this problem can be easily resolved allowing for high transaction throughput and high speeds, effectively solving the last piece of the blockchain puzzle.
However, not all rollups are built the same. Currently, there are two types of rollups dominating the market; Optimistic rollups and Zero-Knowledge rollups.
Part 3: Optimistic Rollups
Let’s start with Optimistic rollups. As the name implies, Optimistic rollups assume transactions are valid by default, publishing only the bare minimum information needed with no proof. In the event a transaction is challenged due to potentially being fraudulent, a computation called a fraud-proof is run. A fraud-proof is a mechanism to allow users to prove that data included in an aggregated transaction did not come from fraudulent inputs. This lets users verify the validity of transactions without having to trust the aggregation process itself.
Let’s walk through some of the pros and cons of Optimistic rollups:
Optimistic rollups are EVM and Solidity compatible, meaning forking dApps from the layer 1 onto the rollup is simple, making
adoption is much more efficient and simple for both developers and end-users.
All transactions are eventually broadcast on the layer 1, meaning the rollup is inherently very secure.
Increased scalability, by using less space and requiring fewer reads and writes, can improve overall network performance.
Long wait times to bridge off rollup back to the layer 1.
A limited level of throughput compared to other rollup technologies.
Need to ensure that there is at least one aggregator (participants who publish the proof on the layer 1) on the network which is not censoring transactions.
Part 4: Zero-Knowledge Rollups
Now let’s discuss Zero-Knowledge (zK) rollups. A zero-knowledge rollup is a type of Zero-Knowledge proof, As the name implies, “zero-knowledge” of the entire data is needed to verify the validity of transactions. This allows for the verification of computations without revealing any information about the input data. In other words, it allows one to prove that they have performed a certain computation, without having to reveal anything about what was actually computed.
Zero-Knowledge rollups bundle hundreds of transactions together into a single transaction. This method is used to record the validity of a block on the Ethereum blockchain. Essentially, a smart contract will be able to deconstruct the transaction and verify every transaction made to ensure its validity.
Zero-Knowledge proofs exponentially reduce the computing and storage resources for validating a block by reducing the amount of data held in each transaction. Zero-Knowledge proofs generally come in two different types:
SNARKs (succinct non-interactive argument of knowledge)
STARKs (scalable transparent argument of knowledge).
The main difference between zkSNARKs and zkSTARKs is that zkSNARKs require a trusted setup, while zkSTARKs do not. Trusted setups are usually achieved by having a group of people generate keys in a way that nobody else knows the complete set of keys. However, there is always the risk that someone could find out all the keys, which would allow them to fake transactions or otherwise manipulate the system. An example of a cryptocurrency using zkSNARKs is Zcash. Zcash uses a multi-party computation protocol to generate its parameters in such a way that no single party learns enough information to compromise security.
zkSTARKS on the other hand do not require any special assumption about who creates their key pair (PrivateKey, PublicKey). The tradeoff for this convenience is slightly reduced efficiency compared to SNARK-based proofs.
Together, these two different forms of Zero-Knowledge rollup technology are referred to as validity proofs. In traditional computer science, a validity proof is a mathematical argument that demonstrates that a particular algorithm or program produces correct results. For zK-rollups, validity proofs are used to present evidence that a state transition is correct. This means that instead of needing all the transaction data to verify the state, the validity proof is enough, which significantly decreases both the cost and speed of posting this information on the layer 1, providing even higher levels of scalability.
Let’s walk through some of the pros and cons of Zero-knowledge rollups:
Extremely fast finality time since the state is instantly verified once proofs are published on the layer 1.
Extremely secure, since all the data used to verify and recover the state is stored on the layer 1.
Extremely low transaction fees when using the rollup.
High throughput due to only requiring validity proofs to verify state and not transaction data.
Faster off-ramping from the rollup back to the layer 1 compared to optimistic rollups.
It is difficult to compute zero-knowledge proofs, hence they require data optimisation to achieve the highest possible throughput. Also, they are not really viable for applications with low on-chain activity.
Operators, who generate the proofs to post on the layer 1, can influence transaction ordering.
Some zero-knowledge rollups currently do not have EVM support.
Hence, it’s clear that Optimistic rollups have a short-term advantage compared to Zero-knowledge rollups since they are easier to implement and are compatible with the EVM making it easier for them to achieve mass adoption.
However, the technology behind zK rollups is far more innovative because it allows blockchains to scale at a superior level, whilst maintaining high levels of decentralisation. In the future, both forms of rollups will be used to meet different needs, depending on the user base or applications that need to be built on top of them.
Part 5: Rollups vs Layer 1’s
Many crypto-enthusiasts often find themselves using alternative layer 1’s over Ethereum due to the high transaction costs of Ethereum. This is not ideal, as the long-term trend shows us that many layer 1’s receive little adoption and fade into irrelevancy as bear markets take over, and users and funds flow back to Ethereum. A good example of this is tokens such as Lisk, Neo, Waves, EOS just to name a few.
However, many modern layer 1’s do not fully solve the trillema. When attempting to solve this problem, it’s important to consider long-term viability, upgradability and the overall user experience of the network. For example, some networks like Avax and Polkadot try to solve the scalability issue by having multiple sidechains which are connected to the main layer 1, which spreads the computational load.
This introduces a poor UX, as users need to hop to dozens, if not hundreds of different chains to gain the maximum amount of usage from the network. Furthermore, non-rollup bridges are inherently less secure, which introduces additional risks to the end-user.
Rollups themselves are designed to move all the burdensome computations onto the layer 1, allowing the rollup itself to focus on scale and user experience, without compromising security. Different rollups may use different technologies to optimise their usage, for example, rollups built specifically for NFTs like ImmutableX, or payment-specific rollups designed to make payments on the network as cheap as possible.
Furthermore, many of these chains have not accumulated as much state bloat as Ethereum. This means, for now, they are faster. However, as their transaction load and count increase, they will begin to run into the same issues as Ethereum, which would require some type of off-chain scaling or rollup. The Ethereum community is already ahead in this regard, with multiple rollup solutions already deployed and working.
Moreover, rollups require the base chain they deploy on to be highly secure. If the layer 1 goes down, the rollup itself will not be operational. This would make deploying a rollup on Solana, for example, bad, as it has gone down over many different instances. The same can be said for deploying a rollup on Binance Smart Chain, which is highly centralised due to having 21 validators with its dPoS model.
Overall, rollups are an incredibly innovative technology that will help scale cryptocurrency to billions of users. The network which is taking the most advantage of this technology is Ethereum.
🗡️Thank you for reading our work and supporting our message🗡️