en
Back to the list

Rollups are the Layer 2 Scaling Solution for Ethereum

source-logo  cryptoknowmics.com 27 March 2022 23:49, UTC

User activity on Ethereum has seen slow growth due to Ethereum’s high gas fees. Users prefer to use Solana, Avalanche, Fantom as gas fees on all of these chains cost less than a dollar. Ethereum has less throughput also in comparison to other Layer 1 blockchains. On Ethereum, only 10-12 transactions get executed per second, while on other Layer 1 blockchains have the capacity of thousands of transactions per second. High Gas fees and less throughput are the two critical reasons for the slow growth of Ethereum ecosystem usage in 2021, while at the same time Layer 1 blockchains saw a major rise both in terms of users and price.   Various scaling solutions can help in boosting the growth of Ethereum's ecosystem such as State Channels, Plasma, Sidechains, and Rollups. Rollups have shown the most potential as a scaling solution out of all of these. Rollups can solve significant problems for Ethereum users, which is high gas fees and less throughput. Rollups enable transactions at low cost and have a high throughput capacity without compromising the security as settlement of all the transactions executed on rollups happens on Ethereum. Ethereum can act as a settlement layer of the Ethereum ecosystem while rollups are used as an execution layer.

What are Rollups?

Rollups offload computation (and state storage) from the blockchain while keeping some data for each transaction on the blockchain. They employ various advanced compression techniques to increase efficiency and, wherever possible, substitute data with computation. The result is a system whose scalability is still constrained by the underlying blockchain's data bandwidth but is better than the current system. Where an Ethereum base-layer ERC20 token transfer costs 45000 gas, an ERC20 token transfer in a rollup takes up 16 bytes of on-chain space and costs under 300 gas. The fact that data is stored on the blockchain is crucial because putting information "on IPFS" does not work because IPFS does not provide consensus on whether or not any given piece of data is available; the data must go on a blockchain.  Anyone can locally conduct all of the operations in the rollup if they desire, allowing them to identify fraud, commence withdrawals, or personally start manufacturing transaction batches after putting data on-chain and gaining consensus on that fact. There are no data availability issues, so a malicious or offline operator can do significantly less harm (for example, they couldn't cause a one-week delay), allowing for a considerably bigger design space for those who have the permission to publish batches and make rollups much easier to reason about.  The lack of data availability issues means that there is no longer any need to map assets to owners, which leads to the key reason why the Ethereum community is so enthusiastic about rollups over previous forms of layer 2 scaling. Rollups are fully general-purpose, and one can even run an EVM inside a rollup, allowing existing Ethereum applications to migrate to rollups with little to no new code.

Optimistic Rollups

Optimistic rollups run parallel to the main Ethereum chain. They can increase scalability because they don't execute any calculation by default. Instead, they suggest a new state to Mainnet or "notarise" the transaction. Transactions are written to the Ethereum blockchain as calldata, further optimizing them by lowering the gas cost. Because processing is the sluggish, expensive component of utilizing Ethereum, optimistic rollups can boost scalability by up to 10-100x, depending on the transaction. With the advent of shard chains, this figure will rise even further, as more data will be available if a transaction is challenged. The two most widely used optimistic rollups are Optimism and Arbitrum.

ZK Rollups

ZK-rollups (zero-knowledge rollups) combine hundreds of off-chain transfers to provide cryptographic proof. These proofs can be in the form of SNARKs (succinct non-interactive argument of knowledge) or STARKs (scalable transparent argument of knowledge). Validity proofs, such as SNARKs and STARKs, are posted to layer 1 for settlement. The ZK-rollup smart contract maintains the status of all transfers on layer 2, and this state can only be altered with validity proof. This means that instead of complete transaction data, ZK-rollups require validity evidence. Validating a block using a ZK-rollup is faster and less expensive because less data is provided. When moving your assets from layer 2 to layer 1 blockchain, there are no delays with a ZK-rollup because the funds have already been validated by a validity proof acknowledged by the ZK-rollup contract. ZK-rollups can be optimized to minimize transaction size further because they are on layer 2.  An account is represented by an index rather than an address, reducing a transaction from 32 to 4 bytes. Transactions are also written as calldata to Ethereum, which saves gas. Currently, ZK sync and Starkware are the leading ZK rollups.  

cryptoknowmics.com