Layer-1 vs Layer-2 Blockchain Scaling Solutions: What are the Differences?

What are Layer-1 and Layer-2 Solutions?

Layer-1 refers to the base level of the blockchain’s underlying infrastructure. Bitcoin, Ethereum, Binance Smart Chain, and Solana are examples of layer-1 blockchains. These networks can process and finalize transactions on its own blockchain.

On the other hand, layer-2 refers to a network built on top of a layer-1 blockchain. Its main purpose is to help offload computational work from layer-1s by processing transactions off-chain, increasing transaction speed and throughput. Polygon, for example, is a layer-2 solution that runs on top of Ethereum to facilitate transactions away from the mainnet.

Layer-1 Overview

Underlying Problems of Layer-1

Scalability is the biggest issue that has been plaguing most layer-1 blockchains. As more users carry out increased simultaneous transactions, the blockchain becomes slow and expensive to use. Ethereum, for example, is the most used decentralized network, but its gas fees and process time are high.

Blockchain Trilemma

This is known as the “blockchain trilemma” — an impossibility for blockchains to simultaneously achieve decentralization, security, and scalability. As such, a decentralized and secure layer-1 blockchain cannot provide scalability. And a scalable, secure network lacks decentralization.

This happens because of the fundamental nature of a blockchain. All transactions require the independent verification of the nodes who are running the blockchain’s software. The verified data will then be logged and stored on the blockchain.

Transaction Confirmation Time

However, depending on the network, this entire process takes time. For Bitcoin, all transactions require six confirmations in the blockchain from miners before being processed. The completion time varies between ten minutes and an hour. A node can only handle so much at a time. In times of network congestion, users will experience longer confirmation times and higher gas fees due to high demand.

How do Layer-1 Solutions Work?

There are several ways to increase throughput and overall network capacity of layer-1 blockchains.

Transition to Proof-of-Stake

For blockchains using proof-of-work as their consensus mechanism, they may switch to proof-of-stake to increase transactions per second while reducing gas fees. Ethereum is a great example of this as they are undergoing a transition to proof-of-stake called the “Merge.”

The blockchain’s development team can also introduce a hard fork or soft fork of the network for their community to vote and approve:

Soft Fork

A soft fork is when new features are implemented to the protocol at a programming level. It is a backward-compatible upgrade, which means that the non-upgraded nodes will still see the chain as valid and can still communicate with other upgraded nodes. In other words, the addition of a new rule will not clash with the older rules.

An example of a soft fork is Bitcoin’s SegWit update in which signatures are separated from transaction data, freeing up more space for transactions to be stored in a single block, increasing the throughput of the network.

Hard Fork

On the other hand, a hard fork is a major change to the blockchain’s protocol that results in the splitting of the blockchain, creating a second blockchain that inherits all of its history with the original, but is on its own towards a new direction. The new rules conflict with the rules of the old nodes, which means upgraded nodes cannot communicate with non-upgraded nodes.

In July 2016, the Ethereum network hard forked into two blockchains: Ethereum and Ethereum Classic. Ethereum Classic is the old Ethereum with a completely seperate cryptocurrency (ETC). They have different technological and philosophical goals.

Layer-2 Overview

How do Layer-2 Solutions Work?

Layer-2 solutions are built on top of a layer-1 blockchain to increase its throughput and overall network capacity. They work in parallel or independent of the main chain. Rollups and sidechains are two of the most common layer-2 solutions that help offload computational load from layer-1s:

Rollups

Rollups scale layer-1 blockchains by processing transactions on layer-2 platforms before submitting the results back to the layer-1. The term “rollup” refers to the way that the chain bundles many transactions to be submitted to the main chain.

There are two types of rollups: Optimistic Rollups and Zero-Knowledge Rollups (ZK Rollups). The difference is in how they validate transactions.

In short, Optimistic Rollups assumes that the transactions are valid, hence an “optimistic” outlook, whereas ZK Rollups attempt to prove that the transactions are valid.

See also: Understanding Layer 2 & Scaling Solutions: Arbitrum, Boba, Optimism, Polygon, Ethereum 2.0

Arbitrum, Optimism, and Boba Network are examples of layer-2 projects employing optimistic rollups. On the other hand, Starknet and zkSync are among the Ethereum layer-2s that leverage ZK Rollups.

Sidechains

Sidechains are secondary blockchains that run parallel to the layer-1 blockchain. Since they have their own virtual machine and validators, they can operate independently. In short, the sidechains validate the transactions and then send them back to the main chain via bridges.

Polygon is the most popular sidechain that aims to scale Ethereum by building and connecting Ethereum-compatible blockchain networks. Polygon operates on its own consensus mechanism and also has its own native token known as $MATIC.

Are Layer-2 Solutions Viable Long-term?

Although layer-2 provides a quick solution to improve scalability, questions have been raised as to whether layer-2 will be irrelevant once scalability issues are solved on layer-1’s end.

Ethereum 2.0 will ultimately be able to speed up transactions while drastically reducing gas fees. This not only affects layer-2 solutions but also impacts other competing layer-1 blockchains like Solana or Avalanche.

However, as of now, because of the upcoming Merge in September, we still see bullish sentiment surrounding competing layer-1s of Ethereum and several other layer-2 projects. Perhaps the completion of Ethereum 2.0 will indirectly foster other layer-1 and layer-2 ecosystems, instead of the other way around.

Key Takeaway

If you are new to crypto, it may be confusing to distinguish between layer-1 blockchains and layer-2 solutions. It is helpful to understand the differences between the two as well as the different approaches to scaling that they offer.

Layer-1 blockchains are networks that can validate and finalize transactions by themselves, and their scaling solutions involve improvements to the existing protocol. On the other hand, layer-2 solutions are built on top of a layer-1 blockchain to help scale its throughput and overall network capacity.