Blockchain
What are Layer 2 scaling solutions?
June 23, 2023
TLDR

Layer 2 solutions are protocols that work with existing blockchains (known as L1 blockchains) to make them more scalable and efficient. They aim to solve what Ethereum founder Vitalik Buterin proposed as the blockchain trilemma.

What's the difference between a Layer 1 vs. Layer 2 blockchain?

A blockchain is a digitally distributed ledger that records transactions and information across a decentralized network. There are different types of blockchains. OpenSea is compatible with a mix of L1 and L2 blockchains. 

Layer 1 (also called "L1") blockchains are the main, or base level, blockchains. This means they execute and validate transactions on their own, without assistance. Ethereum, Solana, and Avalanche are Layer 1 chains. 

Layer 2 (or "L2") blockchains act as scaling solutions for Layer 1s. An L2 blockchain can only serve its purpose if it has an L1 blockchain to depend on.

Layer 2 chains process transactions on their chain and then store a summary of the completed actions on the Layer 1 chain. Two examples of L2 “rollups” are Optimism and Arbitrum blockchains. These are considered "rollups" because their transactions occur off-chain and are then added to the Layer 1, or base, chain when completed. Below we’ll dive into the different kinds of L2s, which include optimistic rollups, zk rollups, sidechains, and state channels. 

What are the advantages of Layer 1 blockchains? 

Security

L1 blockchains typically employ consensus mechanisms such as Proof of Work (PoW) or Proof of Stake (PoS), which ensure the security and integrity of the network. The decentralized nature of L1 blockchains makes them resistant to censorship, tampering, and single points of failure.

Decentralization

L1 blockchains provide a high level of decentralization, distributing control and decision-making power among a network of participants. This makes them more resilient and prevents control by a single centralized authority.

Trustless Transactions

L1 blockchains enable trustless transactions without the need for intermediaries. Participants can securely transact and interact directly with each other, eliminating the need for traditional intermediaries. This reduces costs, speeds up transactions, and increases efficiency.

Transparency

L1 blockchains are typically transparent and provide public visibility into transaction histories and smart contract code. This transparency promotes accountability, auditability, and trust as anyone can see the activity on the blockchain.

Programmability

L1 blockchains support smart contracts, which are self-executing contracts with predefined rules and conditions encoded on the blockchain. Smart contracts enable the development of decentralized applications (dApps) and facilitate automated and programmable transactions, removing the need for intermediaries.

What are the advantages of Layer 2 blockchains?  

Improved scalability

L2 blockchains address the scalability limitations of L1 blockchains by processing a significant number of transactions off-chain. By moving transactions away from the main blockchain, L2 solutions can achieve higher transaction throughput, improving network scalability.  They can also enhance the scalability of L1 blockchains by enabling the bundling of multiple transactions into a single batch. 

Faster Transactions

L2 blockchains enable faster transaction confirmation times because transactions are processed off-chain. Because of this, they can be executed and settled more quickly, in some cases, offering near-instantaneous transaction finality. This makes Layer 2 solutions a great option for applications that require fast transaction processing, like payment systems.

Lower Transaction Costs

L2 blockchains can significantly reduce transaction costs by processing transactions off-chain. L2 solutions alleviate the burden on the main blockchain, reducing the fees associated with on-chain transactions. 

Compatibility

L2 blockchains can be designed to be compatible with multiple L1 blockchains. For example, Arbitrum is an optimistic rollup-based L2 blockchain that is compatible with Ethereum. This compatibility allows seamless interoperability between different blockchains, enabling the transfer of digital items and data across chains.

Lower Environmental Impact

L2 blockchains can contribute to reducing the environmental impact of blockchain technology by offloading a portion of the transaction processing. This allows the energy consumption and carbon footprint associated with transaction validation on the main blockchain to be reduced.

What is the blockchain trilemma?

Vitalik Buterin, the co-founder of Ethereum, popularized the term “blockchain trilemma.” According to Buterin, the blockchain trilemma implies that a blockchain cannot be secure, scalable, and decentralized simultaneously without sacrificing one of those three tenets.

For web3 to become more mainstream and accessible, it’s important to find ways to live up to all three qualities — secure, scalable, and decentralized. L2 scaling solutions are one way web3 is working on improving the blockchain trilemma. 

How do we solve the blockchain trilemma?

There are a handful of methods currently being used to solve the blockchain trilemma: 

Sharding

Sharding is a technique used in blockchain technology to improve scalability and increase transaction throughput. It involves dividing the blockchain network into smaller, more manageable parts called “shards,” each capable of processing its own subset of transactions. Sharding allows for parallel processing of transactions, enhancing the overall capacity and performance of the blockchain.

Different consensus mechanisms

Blockchains can use different consensus mechanisms, like Proof-of-Work or Proof-of-Stake, to validate transactions and speed up transaction speeds or security. 

Layer 2s

By implementing L2 scaling solutions, blockchain networks can potentially achieve better scalability without sacrificing the security or decentralization elements. Off-chain transaction processing, combined with the security and decentralization provided by the L1, enables efficient and scalable blockchain solutions. L2 solutions can improve the blockchain trilemma by striking a balance between scalability, security, and decentralization.

Types of Layer 2 blockchains

Optimistic rollups

Optimistic rollups are an L2 scaling solution that bundles multiple transactions into a single batch and processes them off-chain. This approach enables L2 blockchains to achieve high transaction throughput without sacrificing the security and decentralization provided by an L1 blockchain.

In their assertion process, validators assume that all transactions are valid (this is where the rollup gets its “optimistic” descriptor from). Once validators introduce their assertion to the blockchain, anyone can challenge the validity of the information up to a determined end time. If no one challenges the assertion, validators receive a reward, and the blockchain officially accepts the assertion.  

zk Rollups (zero knowledge)

Similar to optimistic rollups, zk rollups (zero knowledge) process more than one transaction simultaneously. But, unlike optimistic rollups, zk rollups only post a summary of their validation process to the mainnet blockchain, instead of an account of each transaction and validation process. Zk rollups pull their security and validity from their L1 blockchain counterpart, and this is how they are able to scale so quickly and move through so many transactions at the same time. 

Sidechains

A sidechain is a separate, independent blockchain linked to the L1 chain via a two-way bridge. Sidechains, like Polygon, are designed to process transactions efficiently and are essentially self-contained blockchains responsible for their security. Their ability to transfer digital items to the main blockchain connects them to the main blockchain. In the case of Polygon, an Ethereum-compatible chain, users get an experience similar to using Ethereum but with potentially lower gas fees and faster transaction times.

State channels

State channels allow two users or nodes to “talk” to each other on the blockchain without incurring additional costs for their constant back and forth. Instead of making each step in their process public, they are only tasked with adding their first and last transaction onto the L1 blockchain.

Examples of Layer 2 blockchains

Optimism

Optimism is a layer two blockchain designed to help Ethereum scale. Optimism is designed to enable Ethereum apps to take advantage of the chain’s cheaper and faster transactions without technical barriers. Optimism is compatible with OpenSea. To find NFTs on OpenSea, select the “Explore” page and limit your search to Optimism by checking “Optimism” under the “Chains” section.

If you’re buying an NFT on Optimism, you’ll need to switch to the Optimism network on your wallet and bridge your ETH to OP ETH. Many wallets will automatically prompt you to switch networks. If your wallet doesn’t support this, or you’d like to add the Optimism network to your wallet manually, we have a step-by-step guide here

Arbitrum

Arbitrum is an EVM-compatible Layer 2 optimistic rollup that was designed to help Ethereum scale. OpenSea is compatible with the Arbitrum chain Arbitrum One, which features rapid and inexpensive transactions and uses the Ethereum base chain for security. In order to purchase an NFT on Arbitrum, you’ll need to add Arbitrum to your wallet and bridge your ETH to Arbi ETH.

StarkNet

StarkNet is an L2 zk rollup that doubles down on Ethereum’s scalability and security by processing transactions off-chain before moving them onto Ethereum’s mainnet. It facilitates scalability without losing the security Ethereum is known for.   

ZkSync

ZKSync is a zk rollup that proposes the ability to scale and improve on throughput without sacrificing the security and decentralization Ethereum offers. Their goal is to reach hyperscalability, an unlimited number of transactions. 

Polygon PoS (sidechain)

Polygon is a sidechain that uses the Proof-of-Stake method of validation. This means Polygon is its own blockchain, but it benefits from and is compatible with Ethereum in a few important ways. Built on Ethereum’s technology, Polygon was designed to be a scalable solution for some of Ethereum’s pain points. Polygon was created to reduce Ethereum transaction costs and improve speed.

What are EVM-compatible scaling solutions?

The Ethereum Virtual Machine (EVM) is the ecosystem within which all Ethereum blockchain transactions and solutions exist. A scaling solution is EVM-compatible when it is programmed to interact with the EVM independent of its blockchain type. 

Ethereum’s website states: "As the number of people using Ethereum has grown, the blockchain has reached certain capacity limitations. This has driven up the cost of using the network, creating the need for scaling solutions. There are multiple solutions being researched, tested and implemented that take different approaches to achieve similar goals."

🧠 Q&A

What gas fees will I pay when buying an NFT?

In web3, the term “gas fee” refers to the payment needed to execute transactions on the blockchain. Gas fees increase when more people use applications that run on top of a blockchain’s network, therefore competing for space within the block. Think of it like Uber’s surge pricing model that increases the cost of booking a ride during the busiest commuting times. OpenSea also doesn’t control gas fees, set gas fees, or receive any of the gas fees incurred by users on the platform. Instead, they all go to network validators or miners.

When you start the NFT purchase process using OpenSea, you’ll see the gas fee broken down by your wallet provider, so you can watch the fee refresh and complete the transaction when it’s low.

How are NFTs connected to blockchain technology?

NFTs operate on blockchain technology, making it possible to verify their ownership and easily transfer them from one owner to the next. Ethereum, Solana, and Klaytn are three examples of blockchains that store NFTs. 

A blockchain is a digitally distributed ledger that records transactions and information across a decentralized network. Most blockchains are verified by many nodes (read: computers), which is why you’ll hear them described as “decentralized.” Different blockchains may verify their transactions using different methods but ultimately operate similarly. 

Blockchain technology allows users to easily transfer, collect, and verify their NFTs. The provenance of an NFT is one of its biggest advantages.

How do I properly vet an NFT before buying it?

Web3 technology is still new and constantly evolving, so while no single action guarantees protection, there are best practices that can help. The best rule of thumb is that if something looks too good to be true, it probably is. Never share your wallet’s seed phrase, be careful when taking actions using your wallet, and make sure to thoroughly evaluate NFTs before buying.

OpenSea also has an icon visible via a blue checkmark badge on a collection or account. A blue checkmark badge on an account means that account has been verified. A blue checkmark badge on a collection means the collection belongs to a verified account and has significant interest or sales. (OpenSea does not endorse verified accounts or badged collections, and OpenSea makes no representations regarding the NFTs in a verified account or badged collection.)

OpenSea makes no representations or guarantees regarding the collections highlighted in this article.  Users must do their own research and use their own judgment before buying any NFT, including those included in the collections highlighted in this article.  The descriptions of the collections highlighted in this article were adapted from descriptions provided by the NFT creators, not OpenSea.