Layer 1 vs. Layer 2 Blockchain Scaling

Posted on 4/10/2021 by Andras

Scaling has been a turbulent topic in the crypto space. While blockchain technology has brought some unique properties to the table, the performance leaves a lot to be desired.

If you’ve ever used Uniswap during a time of congestion, you know that fees can skyrocket, transactions can take ages to complete, and the experience is just inferior to what we’re used to in the centralized parts of the Internet.

The good news is that quite a lot of brilliant people are working on solving this problem! In this article, we’ll discuss what layer 1 and layer 2 scaling is, and compare their pros and cons.

What is layer 1?

A layer 1 (L1) is the main blockchain architecture. You could think of Bitcoin or Ethereum as layer 1 blockchains.

Examples of layer 1 scaling solutions are SegWit in Bitcoin and sharding in Ethereum. SegWit is a clever way to include more transactions in a block, while sharding is a database partitioning technique where the blockchain is divided into different segments called shards. In both cases, the transaction throughput is increased by changing some characteristic of the base protocol.

The L1 space has been quite a crowded and competitive sector in the blockchain industry. Many projects are trying to capture this market, as a platform to build applications on top of will undoubtedly remain a piece of core infrastructure. Some examples include Polkadot, Cosmos, Solana, Algorand, Avalanche, Near, Cardano, EOS, and Tezos.

However, it isn’t a huge stretch to say that building a dominant layer 1 blockchain is a massive undertaking. Shuffling between scaling it to be able to handle the economic activity of billions of people while maintaining a high level of security and a healthy degree of decentralization is an extremely challenging task.

To add to that, this isn’t purely a technological challenge. A successful L1 also needs an ecosystem of developers, tooling, and some argue even its own identity, culture, and values.

What is layer 2?

A layer 2 (L2) solution is a secondary protocol built on top of the underlying blockchain (i.e., the layer 1). A simple way to think about this is by imagining a stack where the “main” blockchain is on the bottom, and the L2 is on top of it, keeping the main architecture intact.

Some examples of layer 2 scaling solutions are the Bitcoin Lightning Network, Ethereum rollups such as Optimistic rollups or zk rollups, sidechains, and payment channels. As you’d expect, different L2 scaling solutions have very different implications in terms of security, trust, and decentralization.

In all of them, however, the idea is that transactions can happen independently of the main chain, freeing up precious block space as a result. Since some of the load is taken off of the L1, the throughput is increased.

While different L2s all use unique solutions to tackle this challenge, generally, the idea is that they get the security guarantees from the main chain. This brings the best of both worlds – the immutability and censorship-resistance of a blockchain and the transaction throughput needed to process a large amount of economic activity.

Layer 1 vs. layer 2 scaling

Generally, there are two camps when it comes to blockchain scaling. One believes that the main blockchain (L1) should be the one to scale. The other camp thinks that most of the computation should be done off-chain, on L2s.

The reality of how it’ll end up will probably be a bit messier and a combination of both. The biggest and most successful L1s tend to each have a unique approach when it comes to the main architecture. As such, the choice between L1 and L2 scaling is heavily dependent on what specific blockchain we’re talking about.

For example, Solana can process a lot of transactions-per-second (TPS) on L1, so there’s less reason to think about L2 solutions. However, on Ethereum, the focus has been shifted to L2 scaling over time since the L1 isn’t able to handle the incoming demand, and L1 scaling takes a long time to deploy.

Then, we have solutions like Polkadot, where applications can spin up their own app-specific blockchains called parachains. These parachains are connected to the central chain of Polkadot called the relay chain, which provides security to all the connected parachains. In some sense, this is a hybrid approach between the two. Different applications aren’t competing for the same L1 block space and can create custom blockchains that functionally act similarly to L2s.

If you think about it, it makes sense that different applications have specific requirements for their individual use cases. A token swap on an automated market maker (AMM) in DeFi isn’t the same type of on-chain action as minting an NFT or sending funds from one address to the other. Some actions require more computation (gas) but are less time-sensitive, while others are relatively simple but require sub-second execution. This is why the hybrid approach might work best when it comes to all of these platforms.

As a side note, some people have referred to Polkadot or Ethereum after sharding is implemented as ‘layer 0’. The idea here is that the Polkadot relay chain or the Ethereum beacon chain could act as the main hub for other layer 1 blockchains to plug into. While the idea may seem a bit far-fetched now, it’s difficult to predict how the different L1s will interoperate in the future. So, while the chance of an ecosystem like this is relatively slim, it isn’t zero.

Layer 1 and layer 2 scaling both aim to increase the transaction throughput of blockchains while trying to give up as little as possible from network security and decentralization.

With the impending launch of various types of rollups on Ethereum, the fee problems in DeFi may soon be mitigated. In the meantime, other L1s are also gaining increasing traction, as it makes economic sense for many users to migrate some of their on-chain activity