A Gentle Introduction to Layer 2 Scaling Solutions

Naomi OguduvbeNaomi Oguduvbe
4 min read

Introduction

An important step in understanding scalability and why it is an issue in blockchain is to understand the blockchain scalability trilemma first. Blockchain scalability trilemma states that one can only achieve two out of the following: scalability, decentralization and security at the same time but never the three simultaneously.

Scalability is a concept in blockchain that refers to how fast a network can handle a large number of transactions. Due to the high number of transactions in a network, it may become slow and thus the need for scalability solutions.

To solve the scalability solutions, Layer 1 scaling solutions such as sharding was introduced but it didn't provide long term solutions and as a result, Layer 2 scaling solutions were created.

What is a Layer 2 Solution?

Due to the high fees charged for blockchain transactions and how slow transactions can be, there is a need for scaling solutions to allow for seamless transactions at a cheaper fee.

A Layer 2 solution or L2 blockchain is built on top of an already existing layer 1 thus it's name. It serves as an extension of the main network and it's purpose is to help scale transactions and improve efficiency

L2 provides respite for the blockchain without needing to increase block sizes. Layer 2 solutions help to reduce the computational power and charges that are normally attached to Layer 1.

Difference between Layer 1 and Layer 2

Layer 1 refers to the main blockchain network and serves as the base of the blockchain network. It is in charge of all on-chain transactions. Examples of this layer includes Bitcoin, Cardano and Ethereum.

Layer 2 on the other hand is a third party network placed on an already existing layer 1. It is in charge of all off-chain transactions. An example of layer 2 is the Bitcoin Lightning Network to help scalability in the Bitcoin network.

Categories of Layer 2 Solution

Roll-ups

Roll-ups is a layer 2 solution that works by compiling multiple transactions as one before sending it to the main network. There are two examples namely: Zero Knowledge Roll-ups and Optimistic Roll-ups

  • Zero Knowledge Roll-ups

Zero Knowledge Roll-ups are also known as ZK Roll-ups and it uses the concept of ZKSnarks.

ZKSnarks stands for Zero Knowledge Succinct Non-Interactive Argument of Knowledge and it enables one to prove the accuracy of an information without revealing what that information is.

ZK Rollups rely on validity proof to prove the accuracy of the transaction and are executed off chain.

The validity proof uses cryptographic proof to show that the roll-up is the actual result of the given batches of transactions.

Advantages of this Roll-up includes:

  • Almost instant transfer

  • Security

One disadvantage of this Rollup is that validity proof requires high computing power.

  • Optimistic Roll-ups

Optimistic Roll-ups is the opposite of ZKRoll-ups and it assumes that transactions are valid by default. Optimistic Rollups uses fraud proof but only when challenged.

Optimistic Rollups enables maximum amounts of digital agreements to run without overstretching the network.

This scaling solution has some advantages which includes:

  • low gas fee

  • smart contract capability.

One major disadvantage of this scaling solution is that it has longer withdrawal time if the transaction is challenged.

State Channels

This layer 2 solution enables two participants on a network to perfom transactions off-chain without having to add these transactions to the main network. This solution helps in decongesting the network and thus allowing transactions to move faster.

How State Channels work:

-both participants on a network come together to open a state off-chain.

-in this state, transactions between participants take place.

-finally, when both participants are done, the state is closed and submitted to the main network.

Examples of state channel projects include The Lightning Network and Celar Network.

Importance of Layer 2 Solutions

Some importance of the Layer 2 solution includes:

  • Allowing scalability in a blockchain network

  • Allows the rolling up of transactions into one thereby saving gas fees

  • Transactions are done faster

Conclusion

Layer 2 solutions have become a common answer to the scalability problem associated with the Ethereum network. It helps in improving the efficiency of the main network and improves speed of transactions.

Connect with me:

Twitter

LinkedIn

17
Subscribe to my newsletter

Read articles from Naomi Oguduvbe directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Naomi Oguduvbe
Naomi Oguduvbe

I am a web3 content writer and community manager