Carefully! Lots of text.

The popularity of cryptocurrencies and blockchain is growing exponentially, as are the number of users and transactions. Even such a revolutionary technology as blockchain has always had a problem with scalability - the ability of the system to grow and meet growing demand. Public blockchain networks, which are highly decentralized and secure, often have difficulty achieving high throughput.

This is often referred to as the blockchain trilemma, which states that in a decentralized system it is virtually impossible to simultaneously achieve equally high levels of decentralization, security and scalability. In reality, blockchain networks can only provide two of the three factors.

Luckily, there are thousands of enthusiasts and experts working to create scaling solutions. Some of these solutions are aimed at changing the architecture of the main blockchain (first layer), while others target the second layer protocols running on top of the main network.


Introduction

Given the large number of blockchains and cryptocurrencies, you may not even know whether you are working in a first or second level chain. There are benefits to hiding the complexity of blockchain, but it is always important to understand the system you are working in and investing in. In this article, we will talk about the differences between layer 1 and layer 2 blockchains, as well as different scaling solutions.


What are first and second level blockchains?

The term “Layer One” refers to the base layer of the blockchain architecture. This is the basic structure of a blockchain network, examples of which are Bitcoin, Ethereum and BNB Chain. The second layer refers to networks built on top of other blockchains. That is, if Bitcoin is the first level, then the Lightning Network running on top of it is the second.

Scalability improvements in a blockchain network can also be divided into layer 1 and layer 2 solutions. Layer 1 solutions modify the rules and mechanisms of the original blockchain, while Layer 2 solutions use an external parallel network to facilitate transactions outside the main network.


Why blockchain scalability is important

Imagine that a new highway is being built between a major city and its rapidly growing suburbs. As highway congestion increases and congestion occurs (especially during rush hour), the average travel time from point A to point B can increase significantly. This is due to limited road infrastructure and increasing traffic density.

What can the authorities do to increase the speed of this route and reduce congestion? For example, you could widen the highway itself and add additional lanes on each side of the road. However, this is not always practical due to the high costs and potential problems for those already using the highway. Alternatively, various approaches that do not involve changes to the underlying infrastructure could be considered, such as building additional roads or even running a light rail line along a highway.

In the context of blockchain technology, this backbone represents the first layer (the main network), and additional roads are the second layer solutions (a secondary network to increase the overall throughput).

Bitcoin, Ethereum and Polkadot are considered level 1, or base, blockchains. They process and record transactions for their respective ecosystems and have their own cryptocurrency, which is typically used to pay for services and perform other tasks. Polygon is one example of a layer 2 scaling solution for Ethereum. The Polygon network regularly sends checkpoints to the Ethereum mainnet to update its state.

The most important element of the blockchain is throughput - an indicator of the speed and efficiency of processing transactions over a certain period of time. As the number of users and the number of simultaneous transactions increases, work in the first level blockchain can become very slow and expensive. This is especially true for layer 1 blockchains that use Proof of Work instead of Proof of Stake.


Current problems of the first level

Bitcoin and Ethereum are examples of layer 1 networks with scaling issues. They provide security using a distributed consensus model, meaning all transactions are verified by multiple nodes before confirmation. So-called mining nodes compete to solve a complex computational puzzle, with successful miners receiving rewards in the network's native cryptocurrency.

In other words, transactions require independent verification from multiple nodes to confirm. This is an effective way to register and record verified data on the blockchain while reducing the risk of attack from malicious actors. However, as soon as the network grows to the scale of Ethereum or Bitcoin, the need to increase throughput becomes increasingly urgent. During periods of network congestion, confirmation times and transaction fees increase.


How Tier 1 scaling solutions work

There are several options for increasing throughput for layer 1 blockchains. In the case of blockchains with a Proof of Work mechanism, switching to Proof of Stake can help increase the number of transactions per second (TPS) processed, as well as reduce processing fees. However, there is no consensus in the crypto community regarding the benefits and long-term results of using Proof of Stake.

Scaling decisions in Layer 1 networks are usually implemented by the project development team. Depending on the solution, the community will need a hard fork or a soft fork of the network. Some minor changes are backwards compatible, like Bitcoin's SegWit update.

More significant changes, such as increasing the Bitcoin block size to 8 MB, require a hard fork. As a result, two versions of the blockchain are created: one with the update and one without it. Another option for increasing network capacity is sharding. It allows blockchain operations to be divided into several small sections to process data simultaneously rather than sequentially.


How Layer 2 Scaling Solutions Work

As we said earlier, second-layer solutions rely on secondary networks that operate in parallel or independently of the main chain.

Rollups

Zero-knowledge rollups (the most common type) aggregate second-layer off-chain transactions and send them as a single transaction on the main network. These systems use proofs of validity to verify transactions. The materials are stored on the source chain with smart contract agreement, and the smart contract verifies that the deployment is happening correctly. This provides the security of the original network with the benefits of a less resource-intensive rollup.

Sidechains

Sidechains are independent blockchain networks with their own sets of validators. That is, the connecting smart contract in the main chain does not verify the validity of the sidechain network. Therefore, users have to rely on the reliability of the sidechain, which can control the assets in the original chain.

Status Channels

A state channel is a two-way communication medium between transaction participants. The parties isolate part of the main blockchain and connect it to an off-chain transaction channel. This is usually done using a pre-agreed smart contract or multisig. The parties then execute a transaction or batch of off-chain transactions without immediately transmitting transaction data to the underlying distributed order book (i.e., the main chain). Once all transactions in a set have completed, the final “state” of the channel is broadcast to the blockchain for confirmation. This mechanism allows for faster transaction speeds and increases overall network throughput. Solutions like Bitcoin Lightning Network and Ethereum's Raiden operate on state channels.

Nested Blockchains

This solution is based on a set of secondary chains that sit on top of the main blockchain. Nested blockchains operate in accordance with the rules and parameters of the “parent” chain. The main chain is not involved in executing transactions and its role is limited to resolving disputes when necessary. Day-to-day work is delegated to “child” chains, which process off-chain transactions and return them to the main chain. One example of a layer 2 nested blockchain solution is the Plasma project from OmiseGO.


Limitations of Level 1 and Level 2 Scaling Solutions

Solutions of both the first and second levels have their advantages and disadvantages. Working with the first layer can provide the most effective solutions for large-scale protocol improvements, but will require validator approval for changes through a hard fork.

In some cases, validators may not be willing to accept these changes, such as when moving from Proof of Work to Proof of Stake. Miners will lose income from this transition to a more efficient system, which will remove their incentive to improve scalability.

The second layer provides a faster way to increase scalability. However, some methods may weaken the security of the original blockchain. Users trust networks such as Ethereum and Bitcoin for their stability and time-tested reliability. By eliminating some aspects of the first layer, we have to rely on the team and network of the second layer for efficiency and security.


What happens after the first and second levels

One of the main questions is why do we need second-tier solutions at all if first-tier solutions are becoming more scalable? Existing blockchains are being improved, and new networks are being created with high scalability. However, improving the scalability of large systems will take a long time and success is not guaranteed. It is likely that Layer 1 networks will focus on security and allow Layer 2 networks to tailor their services to specific needs.

Regardless, large chains like Ethereum will continue to dominate due to their large user base and developer community. However, their large and decentralized set of validators and strong reputation provide a solid foundation for targeted layer 2 solutions.


Summary

Since the advent of cryptocurrencies, the search for improved scalability has led to the emergence of a two-pronged approach with first-level improvements and second-level solutions. If you have a diverse portfolio of cryptocurrencies, then there is a good chance that you are already working with both layer 1 and layer 2 networks. Now you know the differences between them, as well as the different approaches to scaling.