Demystifying Layer-2 Blockchains: A Game-Changer for the Crypto World
Source: MatterLabs Blog (zkSync L3 ‘Opportunity’ to Hit Testnet in Q1 2023)

Demystifying Layer-2 Blockchains: A Game-Changer for the Crypto World

The blockchain technology is in a state of perpetual evolution. From the inception of Bitcoin to Ethereum's smart contracts, the crypto industry has witnessed remarkable growth. One of the latest advancements are Layer-2 blockchains (L2s), which are the topic of my PhD research studies.

In this blog post, we will explore what Layer-1 and Layer-2 blockchains are, their differences, the types of Layer-2 solutions available, their drawbacks, and the potential they hold for the future of DeFi.

TL;DR

  • L2 offers lower gas costs compared to Ethereum
  • Unlike Layer-1 blockchains, L2s preserve Ethereum security, guaranteeing the immutability of transaction history and smart contracts.
  • This makes them a perfect solution for tokenized RWA, or institutional blockchains.

Introduction

While Bitcoin stands as the pioneering cryptocurrency and blockchain technology, it was Ethereum that broke new ground by introducing smart contracts – computer programs stored and executed within the blockchain's virtual machine. Smart contracts are the bedrock of DeFi, enabling more sophisticated use cases beyond simple payments. The promise of DeFi lies in its potential to democratize access to financial services. However, Ethereum encountered scalability challenges and network congestion, leading to exorbitant gas fees, sometimes reaching $50, $500, or even $2000 for basic transactions. These high gas costs have been a significant barrier to wider adoption of DeFi and blockchain technology.

Gas Prices in gwei (one-billionth of one ETH) on Ethereum, Source: Etherscan

Layer-1 and Layer-2 Blockchain

There are two approaches to tackle the challenges of blockchain scalability (and related high gas prices): layer-1 and layer-2 blockchains.

Layer-1 Blockchains

Layer-1 scaling involves creating entirely new blockchains, e.g. with unique consensus mechanisms or block sizes. These chains operate with their own validators and infrastructure requiring decentralization to win users' trust.

Layer-1 Scaling:

  • New consensus mechanism
  • Increase the block sizeIncrease risk of centralization
  • Increase the frequency of block discoveryIncrease the risk of chain reorganization

Examples of Layer-1 blockchains include Solana, Binance Smart Chain, and Cardano. While Layer-1 solutions expand blockchain capabilities, they often come at the cost of increased centralization risks (aka censorship).

Layer-2 Blockchains

Layer-2 scaling takes a different approach and takes complex calculations off-chain (outside of Ethereum) aiming to reduce on-chain data congestion. These off-chain activities include like rollups, sidechains, plasma, and state channels.

  • Layer 2 scaling: off-chain solutions
  • Idea: condense the on-chain data by off-chain activities

  • Applications: rollups, sidechains, plasma, state channels, …
  • Goal: save gas fees without sacrificing data integrity

The primary goal of Layer-2 solutions is to lower gas fees without compromising data integrity. Layer-2 blockchains rely on the security of underlying Layer-1 chains, such as Ethereum, for final settlement.

You can see the leading L2s at the comparison website of L2Beat:

Source: L2Beat

Comparing L1 and L2

Layer-1 blockchains have their own infrastructure and validators, potentially leading to the concentration risk (censorship), when the infrastructure is not decentralized (not enough nodes and validators in the network).

Ethereum faces the drawback of high gas fees but has already built a decentralized network of validators and stake ETH to secure its operations. L2s on Ethereum offer the best of both worlds, allowing users to leverage Ethereum's security for settlement while enjoying lower transaction costs.

Tokenized RWA on L2s of Ethereum are gueareed by the Ethereym secutity but can be traded for the friction of gas prices.

Below you can the comparison of gas prices among various L2s from L2Fees:

Source: L2Fees.info

Types of Layer-2 Solutions: What is a Roll-up?

Layer-2 blockchains come in various forms, with non-custodial solutions known as roll-ups being a prominent choice. Roll-ups and Layer-2 are often used interchangeably, though they are not identical. Two major types of roll-ups exist:

  1. Optimistic Roll-ups: These solutions assume that most transactions are honest and validate them off-chain. Only in the event of disputes are transactions rolled back on-chain, ensuring data integrity. Examples: Arbitrum, Optimism
  2. Zero-Knowledge Roll-ups: These solutions use advanced cryptography to prove the validity of transactions without revealing their details, enhancing privacy while reducing on-chain load. Examples: zkSync Era, StarkNet

The Future of Layer-2 and Potential Risks

While Layer-2 blockchains hold immense promise, they still require further research and development. Transaction finality - the time needed for Layer-2 transactions to settle on the mainnet - remains a subject of study. Upgradability and potential token recovery in case of Layer-2 failure also pose challenges.

Roll-ups are evolving rapidly, with some solutions embracing decentralized governance. Business models for roll-ups, possibly involving MEV (Miner Extractable Value) auctions, are being explored.

Future Predictions

1) Furthermore, Layer-1 blockchains, like Celo, are transitioning to become L2s. This trend suggests that more L1 projects might explore the benefits of moving to L2, and even some Polkadot parachains are considering turning into L2 solutions within the Ethereum ecosystem.

2) As for Layer-3 blockchains, they appear tailor-made for institutional adoption, appealing to large corporations and financial institutions. Layer-3 can offer the benefits of private blockchains (permission access) but still benefit from the public consensus of Ethereum.

An example of this shift can be seen with Hedera, which started as a private chain but is now making strides toward becoming a public L1 chain.

3) L2s are expanding into the world of Bitcoin. The ZeroSync Association, a nonprofit organization based in Switzerland, is actively developing ZeroSync, a zk-roll-up solution built on top of Bitcoin, utilizing the StarkWare technology stack. Chainway is bringing EVM to Bitcoin.

Source: X

Conculsions

The advent of Layer-2 is transforming the landscape of blockchain and DeFi. L2s offer a compelling alternative to the high gas fees and scalability challenges faced by Layer-1 chains like Ethereum.

The success of the decentralized social media platform - FriendTech - proved that there is a need for L2s - to build on the Ethereum community and enjoy lower gas costs.


Stay tuned for our next post, where we will delve deeper into how roll-ups work. Have a fantastic week ahead.



Sami Belhadj

+16K | Software Delivery Manager | Public Speaker | Mentor | Blockchain | AI/ML | DEVOPS | SRE | Oracle DBA

2mo
Like
Reply
Gauthier Vila

Founder of Zyfi - Abstracting Gas and Complexities On-Chain

1y

Layer 3 blockchain can be completely private and it's one of the main advantages as it is mainly focused on banks and businesses.

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics