Search post, tags and authors
What Are Layer 2 Crypto Solutions

What Are Layer 2 Crypto Solutions

By Oreld Hadilberg
Reviewed by Tony Spilotro

Table of Contents

Blockchain technology offers the world a possibility that completely changes the scope of operations and interaction where finance is concerned and even beyond. However, adopting this technology to create a virtual, decentralized ecosystem devoid of central physical authorities comes at a cost.

There are three key things an effective blockchain platform should possess; decentralization, security, and scalability. A dilemma, however, springs up a trilemma, which states that no blockchain can have all three properties. It can either have decentralization and security without scalability or the other way round.

This has been the issue of many blockchain platforms, sacrificing one for the other. A name that stands out, though, and is the centre of all we'll discuss in this article is the Ethereum blockchain β€” arguably the largest decentralized and most secure blockchain platform. Unfortunately, Ethereum checks the box of decentralization and security but suffers scalability. Many attempts to fix this led to the term "layer 2" solutions. Let's find out what they are.

Understanding Layer 2 Crypto

We can't properly address layer 2 solutions without starting from the top (or bottom in this case).

What Is Layer 1 Blockchain?

An array of synonyms can describe what Layer 1 (L1) is; we can call it the base blockchain or main network β€” and it serves as the foundational block upon which layer 2 solutions build.

Bitcoin and Ethereum are two most popular Layer 1 blockchain; one because it is the pioneer in the blockchain space and the other because it is the largest decentralized blockchain.

Layer 1 usually holds the data blocks that provide validation and serve as data centres for Layer 2 solutions to feed from and supply to. A typical layer 1 solution comprises the main blockchain, a consensus mechanism, a network of node operators, and a network of block producers.

What Is Layer 2 Crypto Solutions?

We mentioned the blockchain trilemma at the introduction of this article, and it is coming up again because it is at the heart of layer 2 (L2) solutions. The trilemma says you can't have all three; pick two and drop one. Layer 2 solutions are saying you can have all three.

Ethereum is the biggest decentralized platform with over 500k daily users and a peak capacity of over 1 million daily transactions. However, the increased demand for Ethereum's platform due to the DeFi and NFT boom has caused its network to be congested, pushing up gas fees and reducing network throughput. As a result, the need for scaling to accommodate more users and ensure a smooth flow within the network emerged, and layer 2 solutions attempt to solve that problem.

Layer 2 are solutions that can be employed to help scale the Ethereum network; by increasing its capacity to take on more transactions, thereby reducing cost and increasing network throughput. Layer 2 solutions also come with expanded use cases, as a perfect working environment attracts developers and creators to utilize the platform for their projects.

How Does Layer 2 Work?

We've covered what layer 2 crypto is above, and we already know that they are blockchains off the main chain used to extend or expand the main chain. How do they work?

Layer 2 blockchains are usually separate from the main chain, in this case, Ethereum. They take the computational responsibilities off the Ethereum blockchain, leaving just validation and data storage. Doing this gives the Ethereum blockchain enough breathing space to validate transactions faster and increase the throughput of the network.

Since Ethereum's blockchain no longer processes transactions, it reduces the gas fee, making it more accessible to traders, investors, and developers. Layer 2 platforms also allow developers to create smart contracts and wallets that β€” though off the main chain β€” they maintain communication and connection with the Ethereum blockchain for easy data transfer, validation, and storage. The layer 2 chain processes the transactions and then transfers them to the Ethereum chain for confirmation and storage.

There are different layer 2 solutions grouped based on how they approach the scalability issue. It is said that no layer 2 solution can currently solve all the problems by itself. Several Layer 1 blockchains like Cardano and Solana have emerged with the aim of solving the trilemma.

Nevertheless, let’s explore some Layer 2 solutions based on their characteristics. Some of the solutions are:

Sidechains

Sidechains are layer 2 blockchains that function independently from the Ethereum blockchain. They adopt their in-house consensus mechanism leaving the "security as a service" feature that suggests they get their protection from the Ethereum network. Yes, they are separate from the Ethereum blockchain but stay connected to it via bridges. These bridges can carry data to and fro the main and sidechain. In addition, they check the compatibility box with Ethereum's Virtual Machine (EVM).

Plasma Merkle Trees (Plasma Chains)

Plasma uses Merkle trees to extend the main blockchain. It's like adding additional coaches to a train linked by a connector (Merkle trees). The new blocks created are shifted from the Ethereum chain to the plasma chains, which remarkably increases the transaction speed while dropping transaction costs.

State Channels (Payment Channels)

State Channels create a network off the Ethereum chain that allows network participants to make multiple transactions and wrap them up into two transactions as their output to the Ethereum blockchain. This gives Ethereum a reduced workload, increasing the transactions per second (TPS) and reducing transaction fees.

Rollup Chains

So far, proponents of the Ethereum ecosystem have highlighted rollup chains as their favourite and potential solution for the scalability problem of the Ethereum blockchain.

Rollup chains shrink hundreds and thousands of transactions into one transaction (a rollup) and share the gas fee among every user within that cluster. This smartness drastically reduces the gas fee users get to pay. Rollup chains process transactions on their chains and send back a single, rolled-up transaction to Ethereum to store. Like other separate chains, rollup chains are still connected to the Ethereum chain, benefiting from its security and decentralization.

There are two rollup chains, each with its approach to rolling up transactions and communicating with the Ethereum chain:

Optimistic Rollup

Optimistic rollups process transactions by assuming transactions are valid. This way of processing is what gave it the "optimistic" name. It saves time and increases processing speed. In addition, optimistic rollup leaves room for invalid transactions and gives users the liberty to challenge a suspected invalid transaction at any time.

By default, optimistic rollups do not perform any computational duty. It just records transactions immediately and sends them to the Ethereum blockchain β€” except in cases where a transaction is challenged as invalid and employs fraud proof to investigate. Optimistic rollup transactions with a positive outlook are written directly into the main Ethereum network.

Zero-Knowledge (ZK) Rollup

Zero-knowledge rollup takes a different approach by processing data off the Ethereum chain and then shrinks multiple transactions into one as proof of their authenticity. These proofs often come in the form of succinct non-interactive argument of knowledge (SNARKs) or scalable transparent argument of knowledge (STARKs), which are sent to the Ethereum network.

This means optimistic rollups need just transaction data for validation while zero-knowledge rollups need just validity proof for verification.

Validium

Validium is very similar to zk rollup but stores data off-chain instead of transactions. This means it can take up more transactions, say over 10,000, has faster withdrawals, and higher throughput.

FAQ

What is layer 2 crypto?

Layer 2 is a term used to collectively address solutions designed with the main purpose of helping Ethereum solve its scalability issues. However, it can also refer to general solutions which help out base blockchains with scalability.

How does layer 2 work?

Layer 2 is an extension of the Ethereum blockchain to relieve Ethereum of the numerous transactions causing network congestion on its mainnet, leaving more breathing space for the Ethereum blockchain, reducing gas fees, and increasing throughput.

Is Bitcoin a Layer 2 blockchain?

Bitcoin is a Layer 1 blockchain, just like Ethereum. However, it has its own layer 2 solutions in the form of the lightning network to help with the scalability problem that has primarily limited the growth and expansion of the Bitcoin blockchain.

What is a Layer 3 crypto?

Layer 1 crypto serves as the base blockchain that hosts in-house cryptocurrencies and different decentralized applications. Layer 2 focuses on helping layer 1 scale and do more. Finally, layer 3 takes it up a notch and focuses on cross-chain functionality, another term for interoperability β€” where two or more blockchains can interact seamlessly, sharing data and increasing use cases.