Layer 2 Crypto Protocols: An Overview

5tGG...kNBo
1 Sept 2023
71

Layer 2 protocols refer to solutions designed to help scale blockchain networks by handling transactions off the main chain (layer 1). They aim to improve transaction speeds, reduce fees, and increase throughput while still benefiting from the underlying blockchain's security.

Some key characteristics of layer 2 protocols:


  • They settle transactions on secondary frameworks that sit atop the main blockchain (layer 1). This allows them to reduce congestion on the main chain.
  • They inherit the decentralization and security properties of the underlying parent chain.
  • They involve counterparts/watchers observing layer 2 activity and submitting periodic updates to layer 1. This anchors the layer 2 state to the more secure parent chain.
  • They improve scalability as they can process more transactions due to the lighter processing load off-chain.


There are several types of layer 2 scaling solutions, which can be categorized as:

State Channels


State channels allow parties to transact instantly and frequently by locking assets on the parent chain while transacting freely off-chain. Only final settlements are committed to layer

1. Examples include Connext, Counterfactual, Raiden, and Perun.

Sidechains


Sidechains are separate blockchains that run in parallel to the main chain. They have their own validators and consensus rules but are interoperable with layer 1. Examples include Polygon, Skale, and Ronin.

Plasma Chains


Plasma chains are secondary frameworks or sub-blockchains that use smart contracts to facilitate faster and cheaper transactions while relying on the underlying layer 1 for security. Examples include OMG Network and Polygon Hermez.

Rollups


Rollups bundle or "roll up" transactions into a single transaction on layer 1. They're verified on layer 2 before being committed to layer 1. Examples include Optimistic and ZK rollups.

Top Layer 2 Crypto Projects


Here are some of the most promising layer 2 crypto projects to watch in 2023:

Polygon


Polygon (previously Matic Network) is a popular Ethereum layer 2 solution using an adapted version of Plasma with PoS sidechains. It aims to provide faster and cheaper transactions while benefiting from Ethereum's security.

Some key facts about Polygon:

  • It uses a Proof-of-Stake consensus model.
  • It offers lower gas fees at ~$0.001 per transaction.
  • It can process up to 7,000 transactions per second.
  • It offers interoperability between chains as part of its Polygon PoS chain.
  • It has processed over 1.37 billion total transactions.
  • It has partnerships with major DeFi apps like Aave, Curve, and Balancer.


Polygon has seen huge growth and adoption in 2022. Its native MATIC token ranks among the top 20 cryptos by market cap.Polygon continues to onboard more projects through grants, funding, and accelerator programs. It's positioning itself as the top contender for becoming Ethereum's de facto layer 2 solution.

Arbitrum


Arbitrum is an Optimistic Rollup platform focusing on Ethereum scaling. It runs computations off-chain before making validity proofs to layer 1.

Some key facts about Arbitrum:

  • It uses a network of validators to verify off-chain computations.
  • It offers significantly lower gas fees compared to L1 Ethereum.
  • It can process up to 2,000+ TPS currently.
  • It has onboarded over 450 projects including Uniswap, Chainlink, MakerDAO, and more.
  • It has surpassed $3.5 billion in total value locked (TVL).


Arbitrum is leading the growth in optimism rollups. It has aggressively onboarded developers through its Arbitrum One mainnet, incentives programs, and $120 million developer fund. With high-profile partnerships and a robust technical architecture, Arbitrum is primed to see huge growth in 2023.

Optimism


Optimism is another leading rollup project taking the optimism route. Like Arbitrum, it performs transactions off-chain before submitting proofs to Ethereum.

Some key facts about Optimism:

  • It uses a network of validators known as "optimistic rollup operators" (ORO).
  • It aims to achieve 2000+ TPS.
  • Its gas fees are up to 10-100x lower compared to Ethereum layer 1.
  • It has onboarded major DeFi apps like Synthetix, Uniswap, Chainlink, and MakerDAO.
  • It has over $1 billion locked on its platform.


Optimism has seen steady adoption, especially as gas fees on Ethereum L1 have remained high. Its OP token and airdrops have incentivized growth. Given Optimism's first-mover advantage, its adoption is likely to accelerate further in 2023.

zkSync


zkSync is a ZK rollup-based layer 2 solution focused on making Ethereum affordable and accessible.

Some key highlights:

  • It uses ZK rollup technology to offer low-cost, private transactions.
  • It can currently process up to 2,000 TPS.
  • It offers gas fees as low as $0.1 per transfer.
  • It enables features like multi-token transfers and meta-transactions.
  • It has its own governance token ZKS.
  • It already integrates with major wallets like Argent, Rainbow, and MetaMask.


zkSync launched its mainnet in March 2022. It offers one of the cheapest and fastest ZK rollup solutions available today. Its community-driven approach has resonated with developers. Expect zkSync's user base to grow rapidly in 2023.

StarkNet


StarkNet is an Ethereum permissionless ZK rollup for building and running dApps.

Notable features:

  • Uses STARK zero-knowledge proofs for validity proofs.
  • Aims to achieve 100,000+ TPS.
  • Gas fees can be 100x lower than Ethereum mainnet.
  • Supports features like Warp Transactions using ZK proofs.
  • Has its own STARK-based programming language Cairo.


StarkNet promises to push scalability limits with ultra-high TPS and lower fees. Although only in alpha mainnet, it already has 150+ projects and $145 million in ecosystem funding. Its innovative tech stack and backing by major VCs make StarkNet one of the most promising layer 2 solutions out there.

Connext


Connext is a non-custodial state channel platform allowing users to conduct transfers, swaps, and more off-chain.

Key features:

  • Allows users to send assets between chains, swap tokens, and more via state channels.
  • Assets remain under user control in state channels versus custodial bridges.
  • Gas fees are ~99% cheaper than on L1 chains.
  • It has facilitated over 8 million cross-chain transactions worth $3.5 billion.
  • It enables generalized messaging between dApps.


Connext offers a decentralized alternative to token bridges. Its state channel infrastructure provides a seamless UX while offering the security of layer 1 chains. It already integrates with 50+ DeFi apps and has strong VC backing. Connext's innovative tech and growing ecosystem integration make it a promising state channel project.

Benefits of Using Layer 2 Networks


There are several benefits to using layer 2 networks over transacting directly on layer 1 chains:

Scalability
Layer 2s offer vastly greater throughput and lower latency by offloading transactions from the main chain. This solves congestion and scaling issues with current layer 1s.
Lower fees
Processing transactions off-chain and only occasionally settling to layer 1 minimizes fees. Certain layer 2s reduce fees by 100x or more versus layer 1.
Speed
By handling computation off-chain, layer 2s can offer near-instant transaction finality and much faster confirmation times.
Security
Layer 2s inherit the underlying security of layer 1 by submitting validity proofs. The strongest layer 2s offer comparable security to layer 1.
User experience
Layer 2s can mimic layer 1 functionality while optimizing UX. This includes composability between dApps, minimal disruptions, and using familiar wallets.
Interoperability
Many layer 2s enable interoperability between blockchains, allowing easy movement of assets across chains.
Privacy
Certain layer 2s like ZK rollups enable private transactions off-chain while still maintaining validity on layer 1.

How Layer 2 Scaling Solutions Work


Here is a quick dive into how the main layer 2 scaling solutions work:

State Channels


State channels allow users to transact instantly and freely off-chain while settling final states to layer 1. Here is how they work:

  1. Users deposit funds into a multi-signature smart contract on layer 1. This "locks" their funds on-chain.
  2. Users can now conduct transactions instantly off-chain by signing transactions with their private keys.
  3. To close the state channel, users submit the final state back on layer 1. The smart contract releases funds accordingly.
  4. If there's a dispute, chain data can be used to resolve the last valid state.


State channels retain security of layer 1 while enabling limitless scalability off-chain. Users only pay gas fees when initially opening or closing the state channel.

Plasma Chains


Plasma chains work as follows:

  1. A plasma chain operator creates a framework connected to the root chain via a smart contract.
  2. Users transact on the plasma chain which batches transactions into blocks.
  3. Block hashes are submitted periodically to layer 1, establishing validity of the plasma chain state.
  4. Users can exit the plasma chain to layer 1 at any time while retaining control of their funds.
  5. The plasma chain can be halted and users can withdraw funds if fraud proofs identify invalid plasma blocks.


Plasma chains offer greater scalability by running entire blockchains parallel to layer 1 while relying on it for security.

Sidechains


  1. The sidechain runs parallel to layer 1 as an independent blockchain with its own consensus.
  2. Special validator nodes known as "Watchers" observe the sidechain and submit periodic proofs to layer 1.
  3. Assets are transferred between layer 1 and the sidechain via a two-way peg.
  4. If sidechain validators misbehave, watchers can submit fraud proofs to layer 1. The sidechain halts and users' funds remain secured on layer 1.


Sidechains enable scalability and interoperability by functioning as separate blockchains while still benefiting from the security of layer 1.

Rollups


There are two types of rollups:

Optimistic rollups (ORs)

  1. Bundles/rolls up transactions into a single transaction and computes it off-chain.
  2. Submits a compact cryptographic proof to layer 1 asserting the validity of the rollup.
  3. Transactions are assumed valid unless a fraud proof is provided within a challenge period.
  4. If a fraud proof is submitted, the invalid state is rolled back.


Zero-knowledge rollups (ZKRs)

  1. Bundles transactions into a single rollup block off-chain, computes it, and generates a cryptographic proof (SNARK/STARK).
  2. The validity proof is verified on-chain ensuring correctness of the rollup. No challenge period is needed.
  3. Periodically submits account balance data to layer 1 via efficient cryptographic proofs.


Rollups offer scalability by optimizing validation off-chain and submitting only compact proofs to layer 1. ZKRs provide stronger security guarantees than ORs.

Issues and Limitations of Current Layer 2 Solutions


While promising, current layer 2 solutions still face some issues and limitations:

  • Liquidity fragmentation: Assets deposited in layer 2s are generally locked to that specific layer 2. This fragments liquidity across layer 2 platforms.
  • Onboarding/UX challenges: Using layer 2s still involves some technical challenges. Better fiat on-ramps, cross-layer bridging, and UX needs to evolve.
  • Early-stage risks: Most layer 2 platforms are relatively new and not battle-tested. Some may fail over time as the technology and standards evolve.
  • Developer familiarity: It requires some developer retraining and specialized languages/tooling to build for layer 2 environments.
  • Centralization risks: There are varying degrees of centralization among layer 2 operators, especially sidechains. True decentralization is still limited.
  • Reduced security: Layer 2s cannot offer the full security guarantees of layer 1s, especially for newer platforms.
  • Interoperability issues: Transferring data and assets between layer 2s currently involves a complex multi-step process. This needs to improve.


While promising, layer 2 technology still needs to mature considerably to make these solutions robust and seamless for mainstream adoption.

The Road Ahead for Layer 2 Networks


Layer 2 platforms have huge potential, but they are still in the early stages. Here are some developments still required for them to succeed long term:

Improved Interoperability


Seamless transfers between layer 2s and interaction between their dApps will be crucial for user adoption. Technologies like Connext provide early examples of how to achieve this.

Hybrid Solutions


Combining aspects of different layer 2 solutions (rollups+sidechains) may yield optimal designs. For instance, StarkNet uses its own validity proofs (STARK) along with sidechain architecture.

ZK Proof Advancements


ZK proofs are still computationally intensive. Further efficiency gains in STARKs, SNARKs and other ZK protocols will enhance privacy and scalability.

Generalized Layer 2 Infrastructure


Common infrastructure needs to emerge for moving assets between layer 2 platforms. This includes bridges, routers, wrapped tokens, and more.

Fiat On-ramps


Direct fiat-to-layer 2 on-ramps without going via layer 1 will provide a much smoother user experience.

Sustainable Tokenomics


Economic incentives need to promote security while avoiding excessive speculation around governance tokens.

True Decentralization


As layer 2 platforms mature, they need to evolve into permissionless environments with numerous independent operators instead of a handful entities controlling liquidity and infrastructure.

User Experience Improvement


UX needs to get as smooth as current Web2 apps. This includes intuitive wallet interfaces, fiat on-ramps, recoverability features, and negligible disruption between layers.

Mainstream Adoption


Ultimately layer 2 solutions need better marketing and simplified onboarding to appeal to everyday users. With improvements across all the above factors, mainstream adoption will follow.

If these challenges are resolved, layer 2 protocols have the potential to fundamentally scale blockchains while retaining decentralization. This will be key for onboarding the next billion Web3 users.

With Internet-scale throughput and negligible fees, layer 2 promises to fulfill the vision of Web3. The "Layer 2 Wars" are just beginning, and it will be fascinating to watch how the competition and collaboration between these technologies shapes the future of decentralized scalability.

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to CapitalThink

3 Comments

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.