During our small team dinner at Carmine’s last night (while most of the team is in Bahamas), the topic of layer-2 scaling solutions came up.
There are many complaints about Ethereum’s high gas fees, which makes any transactions on it expensive and hinders user adoption. Ethereum 2.0 is designed to solve this problem, in particular scalability of the blockchain trilemma. It aims to expand Ethereum’s capability to handle more transactions, thus lowering costs.
Ethereum 2.0 scaling solutions include sharding, optimistic rollups, zero-knowledge rollups (zk-rollups), state channels. There are also plasma chains and sidechains such as Polygon.
So how do rollups and sidechains differ? I spent a few hours mapping out the following.
First thing, there are two ways to scale a blockchain: on-chain and off-chain. On-chain is increasing capability directly on the blockchain itself, while off-chain performs optimization off the blockchain. Off-chain solutions can be compared to adding a layer on top of the underlying protocol (called layer 1s), they are hence called layer 2s.
A sidechain is a layer-1 specific compatible protocol that processes transactions within its network. It has its own consensus mechanism and block parameters. This dictates that a sidechain doesn’t relate to the underlying protocol on security and decentralization.
A rollup is a data compression scheme that batches transactions into a single record (called state root) and appends that record to the underlying layer-1 blockchain. The layer-1 blockchain then verifies the post-state root against the previous state root. If true, the record gets updated on the main blockchain.