What Are Blockchain Layers 1 and 2?
article-36

What Are Blockchain Layers 1 and 2?

As the popularity of crypto and blockchain increases, so does the number of users and transactions. However, scalability has always been a challenge for blockchain, despite its revolutionary potential. Public blockchain networks that are highly decentralized and secure often struggle to achieve high throughput, leading to the Blockchain Trilemma. This states that a decentralized system can only achieve two out of three factors: decentralization, security, and scalability.

Thankfully, thousands of enthusiasts and experts are working on scaling solutions. Some of these solutions target Layer 1, the architecture of the main blockchain, while others focus on Layer 2 protocols that operate on top of the underlying network. These scaling solutions aim to increase blockchain’s capacity to grow and accommodate increasing demand.

Basics

This article aims to help readers understand the differences between Layer 1 and Layer 2 blockchains, as well as the various scalability solutions available. It is not uncommon for users to be unsure whether they are using a Layer 1 or Layer 2 chain, as there are numerous blockchains and cryptocurrencies to choose from. While it may be tempting to ignore the technical details and focus on the benefits of blockchain technology, it is important to understand the system you are investing in or using.

What Are Level 1 and Level 2?

Layer 1 and Layer 2 are two terms used to describe different levels of a blockchain network. Layer 1, also known as the base level, is the main structure of blockchain architecture, with examples like Bitcoin, Ethereum, and Solana. In contrast, Layer 2 refers to networks built on top of other blockchains, such as the Lightning Network that runs on top of Bitcoin.

Improvements to blockchain network scalability can be categorized into two solutions: Layer 1 and Layer 2. A Layer 1 solution will directly change the rules and mechanisms of the original blockchain, while a Layer 2 solution will use an external, parallel network to facilitate transactions away from the main chain. Whether you're using a Layer 1 or Layer 2 blockchain, it's worth taking the time to understand the system you're investing in or using.

Why Is Blockchain Scalability Important?

In the context of blockchain technology, Layer 1 refers to the primary network, while Layer 2 refers to secondary networks that can improve the overall capacity of the system. To better understand this concept, imagine a new highway being constructed between a major city and its fast-growing suburb. As traffic passing through the highway increases and congestion becomes common, the time it takes to travel from point A to point B can significantly increase.

To help commuters travel faster, authorities can consider various solutions not associated with making changes to the core infrastructure. For instance, building additional service roads or launching a light rail transit line along the highway. Similarly, Layer 2 solutions are external networks that can facilitate transactions away from the primary network, increasing overall capacity. However, unlike adding extra lanes to the highway, Layer 2 solutions are often more practical and cost-effective.

Layer 1 blockchains, such as Bitcoin, Ethereum, and Solana, serve as base-layer blockchains that handle transactions for their ecosystems and feature native cryptocurrencies. These currencies are commonly used to pay fees and provide broader utility. In contrast, Layer 2 scaling solutions, like Polygon for Ethereum, operate on top of the main blockchain and send regular updates through checkpoints.

Throughput capacity is an essential factor to consider when evaluating a blockchain. This metric measures the speed and efficiency at which transactions can be processed and recorded within a specific timeframe. As more users join and the number of simultaneous transactions increases, Layer 1 blockchains can become slower and more expensive to use, especially those that rely on Proof of Work mechanisms rather than Proof of Stake.

Today’s Layer 1 Problems

When it comes to Layer 1 networks with scaling issues, Bitcoin and Ethereum are good examples. Both networks use a distributed consensus model, whereby all transactions must be verified by multiple nodes before being validated. Nodes compete to solve a computational puzzle, with the successful miners rewarded in the native cryptocurrency. While this ensures the accuracy of the data recorded, it can lead to network congestion during peak periods. As a result, users may experience slower confirmation times and higher transaction fees.

How Do Layer 1 Scaling Solutions Work?

One way to increase the capacity of Layer 1 blockchains is to switch from Proof of Work to Proof of Stake. However, opinions on the benefits and long-term consequences of this approach vary within the crypto community.

The development team of a project typically introduces scaling solutions to Layer 1 networks. These solutions may require the network to undergo a hard fork or a soft fork, depending on the changes made. Backward-compatible solutions, such as Bitcoin's SegWit update, can be implemented with minimal disruption. In contrast, larger changes, such as increasing Bitcoin's block size to 8MB, require a hard fork, which creates two versions of the blockchain.

Another option to increase network throughput is sharding. This process partitions a blockchain's operations into multiple smaller sections that can process data simultaneously, which is more efficient than processing data sequentially.

How Do Layer 2 Scaling Solutions Work?

Layer 2 solutions work with secondary networks that operate in parallel or independently of the main chain.

Rollups

A less resource-intensive rollup called zero-knowledge rollups bundles off-chain Layer 2 transactions and submits them as one transaction on the main chain. This system uses validity proofs to verify the integrity of transactions, and the assets are held on the original chain with a bridging smart contract. The smart contract confirms that the rollup is functioning as intended, thereby providing the security of the original network.

Sidechains

A trust assumption is necessary when using sidechains, which are separate blockchain networks with their own validators. Unlike with other Layer 2 solutions, the bridging smart contract on the main chain does not check the validity of the sidechain transactions. Thus, the user must trust that the sidechain network is functioning correctly because it has control over the assets on the original chain.

State Channels

Off-chain transactions can be executed in a state channel, which is a bilateral communication system between parties that isolates a section of the blockchain and links it to an off-chain transaction channel. This is typically achieved through a pre-arranged smart contract or a multi-signature. Transactions or groups of transactions are then processed off-chain, with the transaction information not immediately submitted to the underlying distributed ledger, known as the main chain. Once all transactions have been completed, the channel's final "state" is submitted to the blockchain for authentication. This approach speeds up transaction times and enhances overall network capacity. The Bitcoin Lightning Network and Ethereum's Raiden are among the state channel-based solutions available.

Nested Blockchains

Layer 2 solutions depend on secondary networks that run either in parallel to or independently from the main chain. Nested blockchain solutions are one of these types. In this system, a set of secondary chains is built on top of the parent blockchain. These chains adhere to the rules and conditions established by the parent chain. The main chain’s responsibility is restricted to dispute resolution when required, while the "child" chains handle the day-to-day work. After completing the transactions, they return the processed information to the main chain. OmiseGO’s Plasma project is a Layer 2 nested blockchain solution that exemplifies this.

Layer 1 and Layer 2 Limitations

Layer 1 and Layer 2 solutions each have their own advantages and drawbacks. While Layer 1 may be the most effective for significant protocol improvements, it requires validators to accept changes via a hard fork. Validators may be reluctant to do so, as seen with the switch from Proof of Work to Proof of Stake.

Layer 2 provides a faster method for improving scalability, but it comes with the risk of losing some of the security provided by the original blockchain. The security and resilience of networks like Ethereum and Bitcoin are well-established, and users rely on them for protection. However, moving to Layer 2 means relying on the team and network for both efficiency and security.

What’s Next?

Layer 2 solutions might not be necessary in the future if Layer 1 blockchains improve their scalability. While some existing blockchains are seeing improvements, it may take a long time for major systems to address scalability issues, and there is no guarantee of success. Layer 1 blockchains are more likely to focus on improving their security, while Layer 2 networks provide tailored services to specific use cases. Despite this, established chains like Ethereum will probably remain prominent in the near future, owing to their extensive user and developer communities. Due to its large, decentralized validator set and trustworthy reputation, Ethereum provides a solid foundation for targeted Layer 2 solutions.

Conclusion

The pursuit of better scalability in the crypto world has resulted in two main strategies: improving Layer 1 and introducing Layer 2 solutions. If you have a varied crypto portfolio, it's likely that you already own some assets in both Layer 1 and Layer 2 networks. Now that you have a better grasp of their distinctions and the distinct scaling methods that they provide, you can better understand their roles.

Blockchain Trilemma
Blockchain Layers
Layer 1
Layer 2
Blockchain Scalability
Scaling Solutions