• Blogs
  • Blockchain Layer solutions, what are they, and how do they work

Blockchain Layer solutions, what are they, and how do they work

Blockchain Layer solutions, what are they, and how do they work
Author: Rakshita Jain
17-Oct-2022

Cryptocurrencies and blockchains have been growing vertically from their inception. They have established a new investment market and trillion-dollar economy in just a decade. But while this revolutionary surge of crypto is fascinating, it has also made it challenging to make the blockchains scalable enough to accommodate the increasing demand.

This task of making a blockchain scalable is tricky due to the blockchain trilemma. This trilemma states that a decentralized blockchain can not establish decentralization, security, and scalability altogether. Blockchains have to compromise at least one to achieve two of these qualities. 

Blockchain developers have been trying innovative scaling solutions for years to tackle this obstacle, which operates on top of the underlying blockchain.

But what are these solutions? How do they operate on top of existing blockchains? We will unravel this in the below blog.

Before we go into the solutions, let’s first understand the issue of blockchain scalability.

Why is Blockchain Scalability Important?

We can understand the importance of Blockchain scalability by a general example:

Think about a busy road built to connect two points, A and B. When built, it could easily manage the traffic on it. But with time and the growing population of your city, this road keeps experiencing increasing traffic and congestion. It happens because the road capacity is limited. When the road authorities got to know about this traffic situation, they came up with multiple possible solutions. These include creating an overpass on the road or creating extra lanes around the road to divert traffic.

Here, when referring to this road situation with the blockchain, the main road can be considered Layer-1 (main blockchain network), and the sideways and overpass roads are Layer-2 solutions (secondary network) of that blockchain.

From this example, one can easily understand the importance of blockchain layering solutions to make a blockchain scalable. A blockchain can not compete with the existing centralized platforms and systems without becoming scalable. While Decentralized Bitcoin processes 4 to 7 transactions per second (TPS), centralized Visa cards process thousands of transactions per second. Hence, scaling is the need of the hour to fill this big gap. Blockchain networks come with innovative scaling solutions categorized as Layer-1 and Layer-2 for it.

Let’s know more about them.

Layer-0 Scaling solution

Blockchain itself is the Layer-0 scaling solution. It is the initial chapter of scalability, which is built through the internet, hardware, and codes. It provides the underlying structure for further layers to incorporate.

Layer-1 Scaling solution

Layer-1 refers to the solutions involving the main blockchain structure of the network. Such blockchain solutions help in improving the scalability of the base blockchain. It comprises direct modifications in blockchain protocols to improve their speed and scalability. Changing block size or speed of block creation are some most common approaches to Layer-1 scaling solutions. Some popular solutions are changing the consensus mechanism of the blockchain or introducing sharding in it.

A fresh example of a Layer-1 scaling solution is the Merge upgrade of Ethereum, which marked its transition from proof of work to proof of stake consensus mechanism. This upgrade successfully increased the scalability of Ethereum and offered many other advantages. However, such crypto experts have raised questions regarding the possibility of the Ethereum blockchain tilting towards centralization after it switched to PoS.

Sharding is another popular Layer-1 scaling solution that breaks the entire database of a blockchain network into distinct datasets called “shards”. These network shards can work parallel to each other, making it possible to perform sequential work for multiple transactions. Sharding is said to increase blockchain scalability to near infinity by increasing the number of shards. However, a security concern exists regarding the shards because attackers only require to hack one shard to hack the whole network of shards. It is not the case without sharding because an attacker would have to attack every single node in that case which is a harder job.

From what we have discussed so far, it is clear that even though 
Layer-1 scaling solutions are doing a great job; they might not be the perfect scaling solutions for blockchains. While sharding enhances scalability, it somewhere compromises the security of blockchains. Similarly, an upgrade in the consensus mechanism, like that of Ethereum 2.0, could not fully solve the blockchain trilemma.

It is what led to the creation of Layer-2 scaling solutions.

Layer-2 is the term used for those scaling solutions that operate on top of an already existing blockchain protocol to enhance scalability. These scaling solutions shift the burden of verifying transactions from the main blockchain to an adjacent system. These side systems handle the processes involved in transaction processing and then report it back to the main blockchain. This way, the base blockchain gets a reduced transaction load, ultimately boosting its scalability.

Some best Layer-2 scaling solutions are the Lightning Network of Bitcoin, Plasma chains of Ethereum, Nested blockchains, Side chains, State solutions, etc.

Since these scaling techniques handle the transactions off from the mainnet (Layer-1), they are also called “Off-chain scaling solutions. A big plus point of these layer-2 solutions is that they do not require any structural change in the main blockchain because they work on a separate layer. Hence, they hold the potential to boost network scalability without compromising its security.

Let’s discuss them in more detail.

State Channels
A state channel solution includes a two-way transaction channel between some blockchain participants. The transactions occurring in these channels do not need to reflect on the main blockchain. With this, payment channels reduce the transactional traffic from the main blockchain and boost its scalability.

State channel setup initiates by creating a separate temporary transaction channel other than the principal blockchain. The transactions completed in these channels do not reflect on the main blockchain. When these channels close, the net change in the balance obtained through the channel transactions gets updated in the main blockchain.

State channels can be best understood by their examples which are the Lightning network of Bitcoin and the Raiden network of Ethereum.

Lightning Network
The lightning network is a popular Layer-2 scaling solution for Bitcoin. It allows users to send or receive bitcoin fast and cheaply. A lightning network is made by creating micropayment channels between users. The transactions in a lightning network do not reflect in the bitcoin blockchain. When the users complete all their transactions between them and decide to close their transaction pathway, their final balance change gets validated and updated in the bitcoin blockchain. It works exactly like an HOV lane on highways to divert traffic. The lightning network reduces the transaction traffic from the bitcoin blockchain and hence makes it more scalable.

While the Lightning network efficiently boosts the network capacity of bitcoin, it comes with its own challenges. It requires users to own a lightning-supportable wallet that comes with a fee. Also, it asks users to lock a certain amount of bitcoin they can not use until their lightning network is working and to be available online.

Raiden Network
The Raiden Network is Ethereum’s version of the Lightning network. It enables almost instant and low-fee payments for Ethereum and ERC 20 compatible tokens. It comprises digitally signed and hash-locked transfers, known as balance proofs. The payment channel created in a Raiden network allows participants to perform instant payments without any involvement of the main Ethereum blockchain. Only the initial and eventual balance of the payment channel gets updated in the Ethereum chain. The basic idea behind the Raiden network is to take up small transactions from the Ethereum blockchain so that the blockchain can process medium and large transactions easily.

Zero Knowledge Rollups
Zero Knowledge Rollups, also known as ZK Rollups, are the bundles of transactions taken off the main blockchain to another layer for processing. Participants in the ZK roll-up layer submit their transactions to a ZK operator for involving it in their next roll-up batch. These ZK operators process thousands of transactions of a batch and submit only their summary data to the main blockchain. This summary only contains the changes that need to be made on the main blockchain and cryptographic proof to demonstrate that those changes are accurate. This cryptographic proof is known as SNARK (Succinct Non-Interactive Argument of Knowledge) or validity proof. The base blockchain only requires this validity proof to authorize all the transactions involved in that roll-up. Smart contracts play a big role in this whole process. Since the main blockchain only needs to update the summary for those transactions, it makes their verification process faster and more scalable.

Examples of Zero Knowledge Rollups are Immutable X, Starkware, and Polygon Hermez.

Optimistic Rollups
As their name suggests, the Optimistic roll-ups work on the principle of “Optimism”. It means that transactions are optimistically assumed valid in this scaling solution, but participants can challenge them if required by raising fraud-proof. Fraud proof is a kind of claim stating that a transaction is invalid. Initially, the Optimistic roll-up batch submits to the Ethereum chain, and a time window is generated as the challenge period. During this period, anyone can challenge the roll-up transaction results through a fraud-proof. In case this fraud-proof succeeds, the transactions are re-executed with a penalty. If no one questions the roll-up in the challenge period, it is accepted as valid data on the Ethereum chain.

The key difference between Zero knowledge and Optimistic roll-up is that the former needs validity proof, and the latter needs fraud-proof.

Nested Blockchain
Nested blockchains are multiple blockchains set up within or on top of the blockchain. Here, the main blockchain shares a parent-child relationship with the other chain and assigns them the work of processing transactions. Once they complete their assigned work, they return it to the parent chain. All the blockchains independently work unless disputes arise. This work distribution model significantly reduces the burden of the main blockchain and exponentially boosts its scalability.

The plasma of Ethereum is a prominent example of Nested blockchain infrastructure. Plasma chains are the “child” chains of Ethereum, which depend on the Ethereum main net for work and final work submission.

Sidechains
These sidechains run alongside the main blockchain and use independent consensus mechanisms separately from the main blockchain. Their consensus mechanisms can be different from that of Ethereum mainnet. The main role of the main chain in a sidechain infrastructure is only to resolve disputes, maintain harmony and ensure overall security.

Many similarities exist between Sidechains and plasma chains, but they are not the same. While Plasma chains are the network of child chains, side chains are the alternate blockchains of the main chain. It means Plasma chains depend on the parent blockchain for their security, whereas sidechains are responsible for their own security.

All layer-2 and layer-1 solutions we have discussed so far have been key achievements in enhancing the scalability of blockchains. However, the blockchain trilemma and their interoperability still restrict blockchains from achieving near-infinite scalability. Developers brought Layer-3 into the picture to solve these issues.

Layer-3 Scaling solution

Layer-3 blockchains go with the name “Application layer”. Its main focus is to enable dApps, games, and other additional functions in transaction-based blockchains. In comparison, layer-1 and layer-2 scaling solutions work towards reducing the transaction fee and processing more transactions, and layer three works towards introducing additional functions in the blockchain through interoperability. It comprises APIs, user interfaces (UI), scripts, and smart contracts.

Most Layer-1 blockchains allow Layer-3 projects to operate on their networks, like Ethereum, Cardano, and Solana, which facilitates the development of dApps and NFTs. However, this is not yet possible in Bitcoin, which still lacks dApp and other additional capabilities. Many projects are attempting to add dApp functions to the Bitcoin blockchain so it will soon unlock its full potential.

An example of a Layer-3 application is Uniswap, a decentralized crypto exchange that allows users to trade across different blockchains.

What about Layer-4?

Layer-4 for blockchain scaling does not exist yet. The four layers that exist in a blockchain are Layer-0, Layer-1, Layer-2, and Layer-3.

Conclusion

The scalability of blockchain has been a big concern for the blockchain community for years. The community has introduced many solutions to solve this issue. These solutions can be divided into layer-0, layer-1, layer-2, and layer-3 categories. While each solution has successfully increased the blockchain scalability, none of them has been able to solve the blockchain trilemma yet. Though, it is likely that blockchain developers will soon resolve this issue, paving the way for an infinitely scalable blockchain system.

NOTIFICATIONSClose
ALL
USER
Nothing to see here!
It looks like you are already updated
Nothing to see here!
You must Login to see actions