A Starter Guide to Understanding Layer 2 Blockchains
Layer 2 blockchains are designed to solve scalability challenges with blockchains. In this article, we will explain the different types of Layer 2 blockchains, their benefits, and drawbacks.
Layer 2 blockchains are designed to solve scalability challenges with blockchains. In this article, we will explain the different types of Layer 2 blockchains, their benefits, and drawbacks.
Blockchain technology has revolutionized the way we conduct transactions and transfer value, but with its increasing popularity, scalability has become a major concern. To address this issue, researchers and developers have come up with a solution known as Layer 2 blockchains. In this article, we will explore the different types of Layer 2 blockchains, their benefits, and drawbacks.
As you read this guide, you might find it helpful to refer to our Web3 protocol tracker, which will provide you with key data on some of the main Layer 1 and Layer 2 blockchain protocols.
Blockchain Layer 2 solutions are protocols that operate on top of a Layer 1 blockchain (like Bitcoin or Ethereum) to improve scalability, privacy, and other characteristics of the underlying blockchain. The most common solutions are state channels, sidechains, optimistic Rollups and zero knowledge roll-ups.
Layer 2 blockchains are typically fall into the following categories:
Here’s a more in-depth overview of these Layer 2 blockchain categories, along with some examples you can explore yourself.
State channels are a type of Layer 2 solution that allows two or more parties to conduct multiple transactions off-chain, without the need for each transaction to be broadcast to the entire network. This can significantly improve the scalability of a blockchain by decreasing the number of transactions that need to be processed by the network and reducing fees as well (see table below).
An example using state channels is the Lightning Network, which is a Layer 2 protocol that operates on top of the Bitcoin blockchain.
The Lightning Network allows users to conduct multiple transactions off-chain, without the need for each transaction to be broadcast to the entire network. This improves the scalability of the Bitcoin blockchain dramatically, provides instant settlement, and reduces transaction fees.
For an example of how the Lightning Network can be used to in practice, take a look at “multiweb” application we built called Bitcoin Invoicing & Payments.
Sidechains are separate blockchains that are linked to a main chain, allowing specified assets to be transferred between them. This can enable different blockchains to interact and exchange assets, which can improve interoperability between different blockchain networks.
The drawback of sidechains is that they are not secured by the main Layer 1 chain, so they must pay for their own security via a consensus mechanism like Proof-of-Stake (POS) or Proof-of-Work (POW).
One example is the Liquid Network, a sidechain of the Bitcoin blockchain. The Liquid Network allows users to peg BTC to the Liquid Network as “Liquid BTC (LBTC).” This can lead to improved liquidity and enable faster, cheaper transactions, while also allowing other assets to be defined on the network.
Examples of Ethereum sidechains include Polygon PoS and XDai/Gnosis. Developers can find free endpoints for Polygon and XDai/Gnosis here.
Optimistic Rollups are Layer 2 solutions for Ethereum that allow users to execute smart contracts off-chain, without the need for each transaction to be broadcast to the entire network. This improves the scalability of the Ethereum blockchain and reduces transaction fees (see table below).
Optimistic Rollups are secured by the Ethereum Layer 1, as all transactions eventually settle on Ethereum. However, the drawback here is that these Rollups “optimistically” assume that transactions are valid, and impose a seven-day verification challenge period before you can withdraw your funds to the Ethereum main chain.
Examples of Rollups are Arbitrum and Optimism. Both are EVM (Ethereum Virtual Machine) compatible, meaning that code written on Ethereum can be easily ported over. If you want to try out either one, get a free Optimism endpoint here or a free Arbitrum endpoint here.
In late 2022, Optimism launched the OP Stack on top of Optimism for building blockchains and new experimental use cases from scratch. It allowed its users to build OP Craft (MineCraft on top of Optimism, a fully on-chain voxel world) and could also allow Rollups to settle on Bitcoin.
Arbitrum followed suit by launching a new blockchain called Arbitrum Nova, which offers even lower transaction costs and higher transaction volumes.
As more Ethereum transactions get processed using roll-ups, users can expect fee decreases of 10-100x. That all depends on a proposal called EIP 4844, which isn’t scheduled to be implemented until late in 2023.
Zero-Knowledge Rollups use something called Zero Knowledge Proofs (ZK-proofs) to verify the validity of up to thousands of transactions in a batch and then post minimal summary data to the main chain. A Zero Knowledge Proof allows one party (the prover) to prove to another party (the verifier) that a statement is true, without revealing any information about the statement itself.
This can be used to improve privacy on a blockchain, as it allows transactions to be verified without revealing sensitive information about the transaction. Zero Knowledge Proof technology will likely be a key component for building enterprise use cases so that users can show only information they want to third parties while transmitting sensitive data securely.
Here are three examples of ZK-rollup blockchains:
Starknet by Starkware is in Alpha release on the Ethereum Mainnet and is a permissionless decentralized layer-two blockchain based on zk-rollups. Like its Layer 2 rivals, StarkNet executes transactions and relays the transaction data back to the Ethereum mainnet in batches, secured by STARK proofs. Developers can find a free Starknet testnet endpoint here.
Polygon ZK EVM is in Testnet now and aiming for Mainnet release in 2023. Polygon also has a Privacy oriented ZK-enabled roll-up called ‘Nightfall’ that is developed together with Ernst & Young which is targeting enterprise use cases. \
ZKSync by MatterLabs is in ‘baby alpha’ on Mainnet, meaning the team is testing and auditing the solution. However, you can try out ZkSync 1.0 with wallets like Argent.
Here's an easy way to see how some of the main Layer 2 blockchains compare on transaction capacity, transaction fees, and settlement times. The Lightning Network processes bitcoin transactions more than 14,000x faster than the main Bitcoin blockchain! Thisinformation comes from L2fees, and was gathered in January 2023.
Blockchain Layer 2 solutions are a crucial aspect of improving the scalability, privacy, and other characteristics of the underlying blockchain, making it more efficient and cost-effective for users. That's why this space is growing and evolving so quickly. As blockchain is used more widely to address challenges that businesses face across a variety of industries, Layer 2 blockchains will play an increasingly important role.