Bitcoin Layer 2: What Are Bitcoin Layers & Why Do They Matter?

Bitcoin layers are playing an increasingly important role in the Bitcoin ecosystem as more activity is moving onto Layer 2.

Story details

Topics

Stacks
,
Bitcoin Layers
,

Author(s)

Daniel Bowden

Published

June 13, 2024

Bitcoin layers help scale Bitcoin and bring more utility to the network. In this guide, you’ll learn about Bitcoin layers and the role they play in the growth of the Bitcoin ecosystem.

What Are Bitcoin Layers?

Bitcoin layers are secondary protocols, also known as layer 2 networks, built on top of the Bitcoin base layer to improve scalability. 

Bitcoin Layer 2 (L2) networks optimize Bitcoin’s performance by processing transactions off the main chain. They also offer Bitcoin users extended functionalities like enhanced privacy, better smart contract programmability, and asset issuance. 

While all Bitcoin layers process transactions off-chain to scale the base layer, they aren’t built similarly. Instead, each Bitcoin layer uses a unique and innovative design to scale Bitcoin.

Why Does Bitcoin Need Layer 2 to Scale?

Bitcoin has always been focused on security and decentralization. However, that has come at the cost of a comparatively low transaction throughput. The Bitcoin network can process approximately seven transactions per second (TPS), resulting in higher transaction costs when network activity increases. 

Furthermore, Bitcoin doesn’t support complex smart contracts due to the limited functionality of Bitcoin’s Script programming language. This limited programmability has hindered developers from building decentralized applications (dApps) directly on Bitcoin.

Although Bitcoin scalability could be addressed by modifying the core protocol, Bitcoin core developers prefer to keep upgrades minimal to preserve the network’s integrity. 

This is where Bitcoin layers come in.

Bitcoin layers allow developers to implement scalability solutions without interfering with Bitcoin’s secure and decentralized nature. For this reason, layer 2 networks are the foundation for building diverse applications on Bitcoin.

It’s worth noting that issuance of NFTs and fungible tokens has recently become possible on the Bitcoin base layer without making any changes to the core protocol, thanks to the Ordinals protocol. 

However, the popularity of the Ordinals protocol has driven transaction fees higher, highlighting that layer 2s may be the most effective solution for unlocking new Bitcoin use cases. 

Bitcoin Layer 2: Here’s How It Works 

Let’s have a look at some types of Bitcoin Layer 2 solutions and how they work. 

State Channels

State channels are Layer 2 scalability solutions that allow two parties to make any number of off-chain transactions with each other. They are bidirectional, meaning each party can send and receive payments. The only transactions submitted to the base layer are those used to open and close a channel. This helps to minimize congestion on Layer 1 while improving user transaction speeds. 

State channels are powered by multisig smart contracts, which enable both parties to sign transactions. To open a state channel, both users deposit funds in a 2-of-2 multisig address. The deposit transaction is then recorded and confirmed on-chain. Once the state channel is open, the two parties can transact with each other off-chain as much as they want, and the balance allows. The channel balance updates after each transaction. 

When they are done, the two parties can close the channel with an on-chain transaction, which will reflect the changes in their balances.

Rollups

Rollups are Layer 2 scaling solutions that can be optimistic, zero-knowledge (ZK), or sovereign. While each type of rollup operates differently, they all move transactions off-chain to decongest the main chain. They then “roll up” multiple transactions into a single batch, which is submitted to the base layer. This compressed batch occupies less block space and allows more transactions to be processed at any given time. As a result, rollups improve a Layer 1’s storage and transaction efficiency.

Optimistic and zero-knowledge rollups are known as smart contract rollups because they use smart contracts on the main chain to maintain their state. However, the fraud-proving system of the two is different. After an optimistic rollup submits the batched transactions on-chain, verifiers have a seven-day period to challenge their validity. If a verifier detects fraud, they can make their claim using a fraud proof. Fraud proofs are computed on-chain.

On the other hand, ZK-rollups produce validity or zero-knowledge proofs, which are computed off-chain. In other words, a validity proof is generated for every batch of transactions created off-chain. The batch and the proof are then submitted on-chain for verification by a smart contract. Zero-knowledge proofs can be Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (ZK-SNARK) or Zero-Knowledge Scalable Transparent Argument of Knowledge (ZK-STARK).

Unlike optimistic and zero-knowledge rollups, sovereign rollups use nodes instead of smart contracts. They also have their own settlement layer, meaning they don’t settle transactions on Layer 1.

Sidechains

Sidechains are independent, separate blockchains that run parallel to Layer 1. They scale the parent chain by providing a different consensus mechanism that can process transactions faster. Sidechains also have their own tokens, which are pegged to BTC on a ratio of 1:1. This peg allows users to bridge bitcoin from Layer 1 to the sidechain and vice versa.

Therefore, the two-way peg bridge connects a sidechain to the parent chain, permitting them to interact with each other. Some sidechains may also adopt a consensus mechanism that links to Bitcoin’s Proof-of-Work (PoW) mechanism. 

During the two-way peg bridging process, a user locks BTC on the parent chain, prompting a smart contract on the sidechain to mint an equivalent amount of the pegged token. The sidechain then sends the minted tokens to the user’s wallet, allowing them to interact with its dApps. When they are done, the user can move back to Layer 1 by making a withdrawal request that prompts the pegged token to be burned and the locked BTC to be unlocked.

Examples of Bitcoin Layer 2 Protocols

Now, let’s take a look at some of the most exciting Bitcoin layer 2 solutions. 

Lightning Network

The Lightning Network (LN) is a Bitcoin layer 2 scaling solution that enables cheap, near-instant transactions. Joseph Poon and Thaddeus Dryja introduced it in a 2016 paper that proposed using payment channels to process Bitcoin micropayments off-chain, thereby addressing Bitcoin’s scalability problem.

Using smart contracts, the Lightning Network creates a direct payment channel between two parties, allowing them to transact off-chain as often as they want. Users must fund the channel and sign off on fund spending. The final smart contract state is only broadcasted to the main chain when the channel is closed, enabling two parties to transact near-instantly, privately, and at minimal fees while the channel is open. As a result, the Lightning Network has become a popular solution for small bitcoin transactions. 

Liquid Network

The Liquid Network is a layer 2 sidechain that scales Bitcoin by enabling fast, large-volume transactions. It also permits users to settle transactions confidentially and issue assets. Liquid is a Blockstream project launched in 2018. Although Blockstream developed the network, it is governed by a Federation made up of financial institutions, exchanges, and other Bitcoin companies. 

Liquid is connected to the Bitcoin network through a two-way peg system that permits users to move BTC from the main chain to Liquid and back. Users enjoy a fast 2-minute settlement time and a throughput of 7 to 10 transactions per second (TPS) on Liquid.

To move funds from Bitcoin to Liquid, users send BTC to the Liquid client software and receive an equivalent amount of Liquid Bitcoin (L-BTC). The sent bitcoin is then locked on the Bitcoin network until a peg-out transaction is made to release it. Once BTC is unlocked, L-BTC is sent to a burn address, where it is permanently destroyed. 

Liquid uses a consensus mechanism called Strong Federations. It also relies on functionaries to process transactions on the network and secure the locked BTC. Liquid suits exchanges, enterprises, and traders that desire high transaction throughputs and enhanced privacy.

Rootstock

Rootstock (RSK) is an Ethereum Virtual Machine (EVM)-compatible layer 2 sidechain that enables developers to write and deploy smart contracts using Ethereum’s Solidity language. It is secured by Bitcoin’s Proof-of-Work consensus protocol through merged mining, a process that permits miners to simultaneously mine blocks on the two networks using the same resources. 

RSK connects to Bitcoin via a two-way peg. This allows users to convert BTC to Smart BTC (RBTC) and vice versa. Through a peg-in transaction, users can send BTC to a special address and get an equal amount of RBTC. RBTC is needed to pay gas fees when interacting with smart contracts on RSK. The BTC is locked on the Bitcoin network until a request is made via a peg-out transaction to release it. Functionaries facilitate peg-in and peg-out transactions.

Besides giving Bitcoin users enhanced smart contract functionalities, RSK offers fast payments by processing 10 to 20 transactions per second. It is suitable for building Bitcoin-secured DeFi applications. Rootstock was launched by RSK Labs in 2018.

Stacks

Stacks is a Bitcoin layer 2 protocol that brings smart contracts to Bitcoin, making it one of the most exciting Bitcoin layers for developers who want to build a wide range of dApps. 

Like RSK and Liquid, Stacks has its own two-way peg token, sBTC, which Bitcoin backs in a 1:1 ratio. This token allows users to interact with smart contracts on Stacks by locking BTC on the Bitcoin network to acquire an equal amount of sBTC. Conversely, users can burn sBTC to unlock their BTC.

Besides the two-way peg, Stacks connects to Bitcoin through a consensus model called Proof-of-Transfer (PoX). This model allows Stacks miners to transfer BTC to mine STX (the network’s native token). The use of BTC by participants on the Stacks network effectively helps secure it. PoX also ensures that all Stacks blocks are settled on the Bitcoin base layer.

Stacks is one of the go-to layer 2 networks for building DeFi applications and minting NFTs secured by the Bitcoin blockchain. Stacks uses microblocks to process approximately 19 transactions per second. Muneeb Ali introduced the Bitcoin layer in 2017. 

New Bitcoin Layer 2 Protocols Entering the Ecosystem

While the debate on Bitcoin layer terminology is ongoing, an increasing number of protocols, often categorized as Layer 2, are emerging as the race to build on Bitcoin is on. Some of the newest layers include:

Bison Labs

Bisons Labs is a Layer 2 protocol that leverages ZK-STARK sovereign rollups to scale Bitcoin. It also enhances Bitcoin’s limited programmability by providing advanced smart contracts that can support the development of decentralized applications. Bison Labs connects to Bitcoin via a two-way peg system that enables users to bridge BTC, ordinals, and BRC-20 tokens to and from Layer 1.

The Layer 2 network launched on testnet in March 2024. 

Build on Bitcoin (BoB)

Build on Bitcoin (BoB) is a Layer 2 network that aims to launch on the mainnet in April 2024 with optimistic rollups to scale Bitcoin. It is EVM-compatible and inherits Bitcoin’s security through merged mining. That means developers can build intricate applications secured by Bitcoin. Besides rollups, merged mining, and EVM compatibility, BoB features multiple Bitcoin bridges that will facilitate its interactions with Ethereum and enable unified asset management.

Botanix 

Botanix is an EVM-equivalent Layer 2 network that brings expressive smart contracts to Bitcoin, enhancing its programmability and utility. Additionally, Botanix uses the Proof-of-Stake (PoS) consensus algorithm but achieves transaction finality using Bitcoin’s Proof-of-Work (PoW) system. Like Bison Labs, Botanix has a two-way peg bridge that allows the “transfer” of BTC to and from Layer 1.

Botanix plans to roll out on the mainnet in Q2 2024.

Citrea

Citrea is a Bitcoin layer 2 protocol using an EVM-equivalent virtual machine with ZK-rollups to boost transaction efficiency and smart contract functionality. It also aims to leverage the upcoming Bitcoin Virtual Machine (BitVM) to settle transactions on Layer 1. Similar to other Bitcoin layers, Citrea features a two-way peg bridge known as Clementine that enables the “transfer” of BTC to and from the base layer.

Citrea should launch on the mainnet later in 2024.

Merlin Chain

Merlin Chain is an EVM-compatible Bitcoin Layer 2 that supports native assets such as BRC-20 tokens, Stamps, Bitmap, Pipe, BRC-420, and Atomicals. It also utilizes ZK-rollups to improve transaction efficiency and a two-way peg bridge to ease the “movement” of assets to and from Bitcoin. Unlike other Bitcoin layers, Merlin Chain has a governance token with the ticker name MERL. The token is based on the BRC-20 token standard.

Merlin Chain launched on the mainnet in February 2024.

Mezo

Mezo is a Bitcoin Layer 2 network that acts as an economic layer by bringing real-world economic activities to the blockchain while offering cheap and fast transactions. Mezo aims to have its own token, which users can hold alongside BTC to secure the protocol using the Proof-of-HODL consensus mechanism. Mezo also has a two-way peg bridge for the seamless “movement” of BTC from L1 to L2 and vice versa.

The launch of Mezo was announced in April 2024. 

The Benefits and Drawbacks of Bitcoin Protocol Layers

Benefits

  • Bitcoin layers unlock new use cases for Bitcoin users, such as DeFi.
  • Bitcoin protocol layers offer faster transaction speeds than the base layer by processing transactions off-chain.
  • They provide additional features like better privacy, asset issuance, and enhanced smart contract functionality.

Drawbacks

  • Bitcoin layers could promote centralization when network participants are limited to a small number. For instance, Liquid depends on only 15 functionaries to process transactions and secure the BTC locked on the base layer.
  • Layer 2 networks may also face scaling challenges, especially when they rely heavily on the base layer. For example, Lightning opens and closes channels on the base layer, requiring potentially costly on-chain transactions to scale. 

More & More “Building on Bitcoin” is Happening on Layer 2

The new features and functionalities added to the Bitcoin ecosystem thanks to Bitcoin layers are attracting an increasing number of builders (back) to Bitcoin.  

While Bitcoin’s robust security is arguably the primary incentive encouraging more developers to build decentralized applications on Bitcoin layers, the ability to deploy more complex smart contracts and build web3 applications is very enticing for developers looking to build decentralized applications. 

Bitcoin dApps currently cover the areas of finance, gaming, social, collectibles, and identity management, highlighting the diversity of what can be built on Bitcoin layers. 

As the Bitcoin layer 2 ecosystem continues to grow, we can expect more builders to come and build on Bitcoin. 

To successfully navigate the growing Bitcoin ecosystem, you need a secure Bitcoin wallet. Download Xverse now to use the most advanced Bitcoin wallet to manage your BTC. 

FAQs

Is Bitcoin Layer 1 or 2?

Bitcoin is a Layer 1 blockchain that operates independently. It does not rely on another chain to work. That means it has its own consensus mechanism, native token, security budget, and network participants. On the other hand, Layer 2 protocols are built on top of Layer 1 blockchains. They rely on the base layer for the settlement of transactions, meaning they cannot fully operate without it.

What’s the Difference Between Bitcoin Layer 1 and Layer 2 Protocols?

Bitcoin layer 1 refers to the Bitcoin blockchain. It has its own consensus mechanism and network participants in charge of confirming transactions and securing the blockchain. 

On the contrary, layer 2 protocols are built on top of the Bitcoin layer 1 network and rely on its security. Their main goal is to scale the Bitcoin network by optimizing its performance. Each layer 2 protocol uses a unique design to achieve this goal.

What is Layer 1 vs Layer 2 Scaling?

Layer 1 scaling involves using on-chain solutions to address performance issues. These solutions are implemented by making changes to the core protocol. For instance, Bitcoin underwent the SegWit upgrade in 2017, which enhanced transaction data storage in blocks. 

Conversely, layer 2 scaling solutions are designed to improve the base layer’s performance by processing transactions off-chain. This action saves block space on layer 1 and reduces network congestion.

Is Bitcoin Lightning a Layer 2?

Bitcoin Lightning is a Layer 2 network built on top of Bitcoin to improve transaction speeds and costs. It uses state channels, enabling two parties to transact peer-to-peer with each other off-chain. Once a Lightning channel is opened, users can make any number of near-instant, low-cost, and high-volume payments directly from their wallets.

Share this article