One of the most important things that blockchain technology offers is information security. Being made of nodes, which are the same users of the blockchain network, it is impossible to hack or modify information without being detected.
The problem comes when the capacity and speed of transactions become slow due to the number of users on the blockchain.
And this is where the layers appear! Layer 1 makes the blockchain network more fluid, making processes much faster and allowing many more users to join the blockchain without limiting its speed.
Layer 2 fulfills a more specific job, making transactions much faster and reducing fees.
The objective of these layers is the same, to improve and optimize the processes of the blockchain to give a better experience to users and allow greater scalability. Next we will talk more about these layers and how they work.
Why is scalability important in the blockchain?
The definition of the word “scalability” varies depending on the source. Essentially, however, blockchain scalability refers to the system’s ability to deliver a good experience to every user, regardless of the total number of users at any one time.
The term “transfer rate” refers to the number of transactions a system handles per second.
Although payment companies/channels like Visa process about 20,000 transactions per second (TPS) with the VisaNet electronic payment network, the Bitcoin main chain can do between 3 to 7 TPS.
Although the disparity in capability seems unexpected, there is a straightforward reason. Bitcoin operates on a decentralized network, whereas VisaNet operates on a centralized network.
To preserve its consumers’ privacy, the former consumes more processing power and time. Acceptance, mining, distribution, and validation by a network of nodes are all steps in the data transaction process.
As cryptocurrencies are expected to become a recognized force in the business world, blockchain developers are trying to increase the volume of blockchain management.
By creating layers in the blockchain and optimizing Layer 1 and 2 scalability, they want to speed up processing times and increase the number of TPS.
What is a layer 1 network?
In layer 1, the protocol of the blockchain is changed to enable scalability and increase the capacity and speed of transactions, thus achieving more data transactions and users. That is, they enhance the base protocol itself to make the overall system much more scalable.
There are three approaches to implementing Layer 1 solutions:
- Proof of Stake
- Proof of Work
Proof-of-Stake (PoS) is an alternative to the Proof-of-Work (PoW) mining model in that instead of miners solving cryptographic puzzles using computing power to verify transactions as they do with PoW, miners PoS users use existing coins and with these, they verify transactions in proportion to the number of coins they have locked or “linked” in a stacking wallet.
In projects like Ethereum 2.0, they are moving from older consensus protocols like Proof-of-Work, to protocols that are much faster and consume less power, like Proof-of-Stake.
Sharding is one of the most popular Layer 1 scalability methods out there.
Sharding is a technique used by blockchain companies where, instead of making a network work sequentially on each transaction, these sets of transactions are divided into sets of data known as “shards”.
These shards can then be processed by the network in parallel. The purpose is to improve scalability, allowing them to process more transactions per second (TPS).
However, layer 1 solutions are not the only avenue available to improve blockchain scalability.
Layer 2 solutions establish an additional protocol that is built on top of blockchains such as Ethereum and Bitcoin.
These increase performance without significantly altering the original decentralization or security features, which are an integral part of the original blockchain.
What is a Layer 2 scaling solution?
Layer 2 blockchains process new transactions faster while reducing the load on layer 1 and typically charge much lower fees.
How do they do that?
A secondary protocol created on top of an existing blockchain system with the goal of fixing transaction speed and scaling issues is referred to as Layer 2.
Two important examples of Layer 2 solutions are the Bitcoin Lightning Network and Ethereum Plasma:
- The Lightning Network is based on the state channels. These state channels are attached to the blockchain and they perform and report the operations to the main channel.
- While the Plasma framework consists of sidechains, which are tiny blockchains arranged in a tree-like structure. Plasma chains have their own consensus algorithm and create blocks of transactions.
How does layer 2 work?
The layer 2 protocol establishes a second framework. All the operations and the transactions that are made in this protocol can occur without affecting layer 1.
The main chain will never suffer any modification to its structure because this second layer is working in a different framework
A large part of the transactions that pass through layer 1 are transferred to layer 2, increasing the capacity and processing speed, together with a less “congested” traffic flow in layer 1. In this way, scalability is improved.
So while the main chain (layer 1) provides security, the second chain (layer 2) offers high performance through hundreds, or even thousands, of transactions per second.
Types of Layer 2 scaling solutions:
For Layer 2 scaling solutions to truly break through and address the issues of the other layers, they have to inherit the underlying security from the main chain.
That is, while sidechains can use other networks or validators to secure the chain, layer 2 differs by inheriting its security directly from the mainchain.
The main layer 2 solutions are Zero-Knowledge Rollups and Optimistic Rollups.
Zero-Knowledge Rollups are also known as “ZK-Rollups” – are smart contracts that scale the Ethereum network by processing multiple transfers off of the main blockchain.
ZK-Rollups works by taking hundreds of transfers off-chain and combining or “rolling” them into a single transaction. They can produce a block in around a minute, with the ability to process 2,000 transactions per second (TPS).
Zero-Knowledge Rollups hold funds in a smart contract, and once proof of validity is accepted, transactions are confirmed and funds are available.
Zero-knowledge means that all verifiers can know they have the same information, without revealing it.
Optimistic rollups are layer 2 that runs on top of Ethereum’s base layer rather than on it.
This enables large-scale smart contract deployment while maintaining Ethereum’s security and avoiding network overload.
Layer 1 and Layer 2 scaling solutions are two sides of the same coin: they’re both ways of making blockchain networks speedier and more adaptable to an ever-growing user base.
These strategies are not mutually exclusive, even though many blockchain networks are investigating combining layer-1 and layer-2 scaling solutions to achieve greater scalability without sacrificing security or decentralization.