Jaiya Gill

What's a Layer 1 vs Layer 2?

What are Ethereum Layer 2 solutions, why do we need them, and how can you benefit from them?

As the usage of the Ethereum network rises, it faces some limitations. Transactions take time to complete, leading to congestion and higher gas fees. As ETH rises in popularity, the blockchain reaches certain capacity limitations, and this increases network loads and transaction costs. This can make using Ethereum very expensive.

This motivated the rise of ETH Layer 2 solutions, to increase transaction speeds and throughputs. Layer 2 solutions play an important role in addressing the congestion by doing more computation off of the Ethereum main-chain. Layer 2 'rollups' are part of the official Ethereum scaling roadmap until sharding, which will be deployed in the coming years.

Today we rely on L2s. The main goal of Layer 2 solutions is to solve the scalability problem without jeopardizing the network’s decentralized nature and security.

So what is a Layer 2? Layer 2 refers to another blockchain that's built on top of the existing Ethereum network. It scales applications by handling transactions off the Layer 1 network (ETH Mainnet) while taking advantage of the Mainnet’s decentralized security.

One of the main advantages of using “off-chain” is the potential to achieve high throughput without sacrificing network security. Therefore, Layer 2s offer faster and cheaper transactions than Layer 1s.

Rollups

The most trustless Layer 2 scaling solution is Rollups. Rollups perform transaction executions outside Layer 1 (main ETH chain) but post the transaction data onto Layer 1 where consensus is reached. This allows rollups to inherit the Layer 1 security properties. Transactions are “rolled up” into batches with a state root. This supports fast verification of data validity.

Rollups offer a set of advantages:
- Faster transaction throughput (reducing network congestion on ETH Mainnet)
- Reduced gas fees
- Allows for open participation
- Better overall user experience

Two types of rollups are Optimistic rollups and Zero-Knowledge rollups, each with different security models.

1. Optimistic rollups

Optimistic rollups assume transactions are valid unless proven otherwise. They run  computation on Layer 1s only in the event of a challenge, via a fault-proof. If a fault is found, the challenger is rewarded, the batch is rolled back, and that batch sequencer is economically penalized.

2. Zero-knowledge rollups

Zero-knowledge rollups run off-chain computation and submits a validity proof to the chain. Validity proofs are cryptographic proof, which is a quicker and cheaper way to validate a block. It's guaranteed to be correct so there’s no need for fault proofs.

Sidechains

Another popular Layer 2 is a 'Sidechain'. A sidechain is a separate new blockchain that is compatible with the mainnet. They run their own validators, and submit checks to Ethereum on a recurring basis.

Polygon is one of the most popular Proof of Stake sidechains for ETH. It offers several benefits including increased transaction throughput and lower fees. $MATIC is Polygon’s native currency for gas. Polygon also aims to support ZK & Optimistic rollups in the future.

Overall, Layer 2 solutions are changing the blockchain landscape. More companies are integrating these into their services. They offer a smoother user experience and lower transaction costs. This is how we provide a seamless zero-fee buying & selling experience at Alongside.

Today there are many Layer 2s competing for adoption. Examples include Arbitrum, Polygon, Optimism, and Starkware to name a few.

Let’s take a closer look at the Layer 2 rollup network Optimism. Optimism is striving to be an extension to the base of the Ethereum protocol, making minimal changes. This makes them easiest to for developers deploy, and use their existing tooling.

From a practical standpoint, how can you use Layer 2s and benefit from them? After having loaded up your wallet with ETH on mainnet, you’ll then need to use a ‘bridge’ to send your funds over to your desired Layer 2. Services like HopProtocal exist to make it easy to jump between Layer 1s and Layer 2s.

It’s also important to note that not all Dapps exist across each Layer 2, and NFTs on one Layer 2 don’t appear on another. Overtime, we’ll see protocols become more available across multiple Layer 2s, and some Layer 2s becoming more widely used.