Home Crypto for Beginners What is layer 1 and layer 2 in blockchain

What is layer 1 and layer 2 in blockchain

The phrase "Layer-1" refers to the underlying core blockchain architecture. Layer-2, on the other hand, is a network that sits on top of the underlying blockchain. Consider the Lightning Network and Bitcoin. Bitcoin is a layer-1 network, whereas the lightning network is a layer-2 network. Let’s check at the solutions for each layer that companies are working on.

Good examples for layer-2 solutions are:

-        Nested blockchains

-        State channels

OmiseGO, an Ethereum-based dApp, is currently working on a layered blockchains solution dubbed Plasma. Plasma's architectural idea is simple: the main, base blockchain will provide the ground rules for the whole system. It will not directly participate in any activities until it is required to settle any issues. On top of the main chain, there will be numerous tiers of blockchains. These levels will be linked together to form a parent-child chain link. The parent chain distributes tasks to its junior chains. The child chains then carry out these acts and report the results to the parent chain. It significantly reduces the load in the root chains, and it increases the scalability.

The advantages of using layer-2 does not waste time with miner verification and it does not mess with the underlying blockchain protocol.

Examples for layer-1 solutions are:

-        Sharding

-        Consensus protocol changes

Sharding is a common layer-1 scalability solution that is being worked on by a number of projects. Rather than requiring a network to operate sequentially on each and every transaction, sharding divides these transaction sets into little data sets known as "shards." The network may then handle these shards in parallel.

Many projects, such as Ethereum, are transitioning from slower, more inefficient consensus algorithms such as Proof-of-Work (PoW) to quicker, less wasteful protocols such as Proof-of-Stake (PoS). Bitcoin and Ethereum both employ PoW, in which miners use their processing capacity to solve cryptographically hard equations. While PoW is very secure, it can be extremely sluggish. On a good day, Bitcoin can only handle 7 transactions per second, whereas Ethereum can only handle 15–20. This is why Ethereum is attempting to transition from PoW to PoS via the Casper protocol.

The biggest advantage of layer-1 is that nothing needs to be added on top of existing architecture.

Despite both being good and useful, both of them have also problems that need to be solved. The biggest one is with adding these solutions to existing protocols. It does not make sense to put unnecessary codes to experiment with, when millions of dollars are being transacted on the blockchain daily.

Check out other levels