Bitcoin has limited block space, and it can only handle so many transactions before the network becomes congested, driving up transaction fees and increasing transaction times, both of which create poor UX. Bitcoin also lacks programmability and can’t perform more sophisticated operations that other blockchains can.
In order to grow and reach a wider audience, at some point, the Bitcoin ecosystem will need to grow beyond the Bitcoin blockchain itself. You need Bitcoin Layer 2s, or L2s for short.
What Is a Bitcoin Layer 2?
A Bitcoin L2 scales and extends the functionality of Bitcoin with as few additional trust assumptions as possible. Additionally, Bitcoin L2s should inherit the security of the Bitcoin chain as well as unlock Bitcoin’s dormant liquidity.
A helpful framework to understand what a Bitcoin L2 is is to compare it to an L1. Here is a concise definition of blockchain layers 1 and 2 from Stacks co-creator (and Hiro Chairman) Muneeb Ali:
“Generally speaking L1 chains are sovereign meaning that (a) they have their own security budget, and (b) they can survive without the need for any other L1 chain. L2 chains typically do not have their own security budget and share the security of the underlying L1 chain, and they cannot live without the underlying L1 chain.”
Let's break this down a bit.
Traits of an L1
L1 chains are sovereign. L1 blockchains like Bitcoin are self-contained networks with their own rules and security measures. They operate independently and do not rely on another blockchain or system to function.
They have their own security budget. L1s maintain their security through mechanisms such as proof-of-work or proof-of-stake. These security mechanisms require network validators to spend resources (like computational power or staked funds). In order to attack the network, an attacker has to outspend the majority of honest participants with those same resources (that threshold is the ecosystem’s “security budget”—how much an attacker would have to spend to successfully attack the network). Generally, the more popular and valuable a blockchain ecosystem, the higher the security budget, and Bitcoin has the highest security budget of them all.
Traits of an L2
L2 chains are not sovereign. They are dependent on L1s for their operation and security. Without the L1, the L2 cannot function. This dependence is what allows layer 2 solutions to offer faster and cheaper transactions while still maintaining a high level of security.
L2 chains typically do not have their own security budget. Instead, they settle periodically on the L1 chain and rely on that L1 for security (e.g. to change the history of the L2, you have to change the history of the L1). That inherited security allows L2s to be more experimental and push innovation further. In the case of Bitcoin L2s, it allows them to add programmability and smart contracts to the Bitcoin ecosystem.
The Definition of Bitcoin L2s Is Evolving
The terminology around Bitcoin layers is very much in flux, and people disagree on what constitutes a Bitcoin L2. We even wrote an entire book on the topic.
Some would argue that any Bitcoin layer that extends the scalability and improves the functionality of Bitcoin is a Bitcoin L2. Others would argue that a true Bitcoin L2 must meet specific criteria, such as storing state on the L1 or enabling unilateral exit, which is the ability for a user to withdraw Bitcoin from the L2 at any time with a simple L1 transaction.
In this post, we take a looser definition of Bitcoin L2s and talk about them in the context of any layer that exists on top of Bitcoin and improves the Bitcoin ecosystem.
Why Does Bitcoin Need L2s?
We touched on two problems at the top of this post—scalability and programmability. Let’s expand on those a bit here.
Bitcoin’s Scalability Problem
There’s a limit on how many transactions the Bitcoin network can process. Each block in the Bitcoin blockchain has a maximum size limit of ~2MB, and the network adds new blocks about every 10 minutes. This setup results in a maximum transaction capacity of around seven transactions per second (TPS).
As Bitcoin's popularity increases, more transactions are conducted, pushing the network beyond its processing capacity. This in turn pushes transaction fees higher, making smaller transactions unfeasible on the network.
Solving this scaling issue and bringing affordable transactions to a billion users isn’t simply a matter of increasing block size or decreasing block time. Every Bitcoin node must process every transaction, and increasing the block size or decreasing block time can lead to centralization risk and security vulnerabilities.
Today, you can actually run a Bitcoin node on a Raspberry Pi. Because running a Bitcoin node is relatively accessible to the general public, meaning it doesn’t require specialized equipment, the Bitcoin network is the most decentralized in Web3 in terms of active nodes. If you increase block size or require nodes to process blocks faster, you increase hardware requirements to run a node too, and that will ultimately result in fewer individuals running nodes.
As opposed to changing the Bitcoin blockchain, layers are an alternative solution to increase throughput in the Bitcoin ecosystem: move transactions off the Bitcoin blockchain and have them periodically settle on the Bitcoin blockchain in batches instead.
Bitcoin’s Programmability Problem
Bitcoin was designed as a digital currency with a focus on security. Its scripting language, Bitcoin Script, is purposefully simple so that any computation on the network can’t take up too many resources, enabling the currency to be maximally decentralized and maximally secure (the language has a smaller attack surface).
While Bitcoin does support simple, smart contract-like functionalities such as multi-signature wallets, its scripting language is not designed for fully-expressive computation, the kind that’s needed for on-chain applications or DeFi. Simply put: you cannot build apps directly on Bitcoin. You need some other programmable interface that can plug into Bitcoin, like a Bitcoin L2.
The Genesis of Bitcoin Layer 2s
Bitcoin was designed for secure, trustless, peer-to-peer payments. That’s clear from the very title of its white paper: Bitcoin: A Peer-to-Peer Electronic Cash System.
Bitcoin’s incredible success, and that of subsequent platforms such as Ethereum, prove that the world wants a better, user-owned internet. However, even since the early days of Bitcoin, users have wanted more advanced functionality that Bitcoin wasn’t designed to provide, as well as faster, cheaper transactions than are possible on the network.
This led early adopters to start building their own solutions. As early as 2013, developers working on Bitcoin were discussing how to incorporate “decentralized high-frequency trading” into the blockchain. But it was really in the latter half of the 2010s that the idea of Bitcoin scaling and Layer 2 solutions took off.
The Rootstock white paper was published in 2015, then in 2016 Joseph Poon and Thaddeus Dryja wrote “The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments,” which explained their technique for:
"A decentralized system…whereby transactions are sent over a network of micropayment channels (a.k.a. payment channels or transaction channels) whose transfer of value occurs off-blockchain."
Thus, the first Layer 2 solutions for Bitcoin were born. More quickly followed: Stacks was conceived in 2017, and Liquid launched in 2018. Today, there are dozens of projects building on Bitcoin. Each solution has a different design to improve Bitcoin, whether increasing its scalability or programmability.
Coming Full Circle
This vision of layers for Bitcoin is actually something that Satoshi Nakamoto, Bitcoin’s creator, talked about. In a forum post from 2010 discussing Bitcoin domain names, Satoshi described an approach which involved a
“…completely separate network and separate block chain, yet share CPU power with Bitcoin.”
And in the past few years, this vision has evolved in a few different ways to become the Bitcoin L2s that we know today.
Types of L2 Solutions
Layer 2 solutions can be broadly categorized into a few categories, each with a unique approach to scaling and enhancing the capabilities of Bitcoin.
State Channels
State channels allow multiple parties to open private channels where they can make transactions amongst themselves off-chain. Only the opening and closing balances of the channel are recorded on the blockchain (as users enter and exit a channel), saving considerable resources and block space.
This approach significantly speeds up payments and reduces fees, but it offers limited functionality. Since state channel transactions occur off-chain, there is no sense of global state (a snapshot of who owns what) until the channel closes. As a result, you can’t have smart contracts reacting to channel transactions, and that means state channels cannot support smart contracts or apps. Instead, state channels are purely a means to scale transactions.
An example of a state channel is Lightning Network.
Sidechains
Sidechains are independent blockchains that run in parallel to the Bitcoin L1. BTC can be transferred from the main chain to the sidechain (and vice versa), allowing the sidechain to operate under its own rules and protocols. These chains often don’t have their own gas asset and instead rely on the pegged L1 asset (in this case, a synthetic Bitcoin) as the native currency, and L1 miners often mine the sidechain too (called merge mining). This approach can enable faster transactions, experimentation with unique consensus and protocol designs, and the implementation of features like smart contracts on the L2.
An example of a sidechain is Rootstock.
Rollups
Bitcoin rollups are a solution that allows execution of smart contracts to happen off-chain while storing only the data on-chain. There are two main types of rollup: Optimistic Rollups and Validity Rollups. Both types essentially bundle or "roll up" many transactions into a single proof, which is then posted to the main chain. The main difference between the two types is the method of generating and verifying the proof.
An example of a Bitcoin rollup is Citrea.
How to Pick a Bitcoin Layer 2
Building with Bitcoin layer 2 solutions gives you a huge opportunity. You’re no longer limited to simple transactions on the Bitcoin blockchain—you have access to scalability and programmability in the Bitcoin ecosystem, enabling you to build all kinds of apps that tap into Bitcoin’s $1.3T of latent capital.
However, you will need to do your research. The choice of L2 largely depends on your project's specific needs. For instance, if your application requires small, frequent payments, the Lightning Network is a great option. But if you're looking to leverage smart contracts, then Stacks is a better fit.
Additionally, while some concepts, like multi-sig wallets, are shared among layer 2 solutions, others are only available on certain layers (such as Hashed Timelock Contracts on Lightning).
You also need to consider the unique tech stack of various L2s. Different L2s work with different programming languages and devtools, so depending on your expertise, you may find it easier to start building on one L2 over another.
Impact of Bitcoin L2s on Bitcoin's Evolution
Regardless of which Bitcoin L2 you choose to use or build on, it’s clear that Bitcoin L2s will play a pivotal role in Bitcoin’s future by:
- Scaling the network: Bitcoin can only handle so many active users, and moving transactions off the main blockchain is the only way to scale to a mainstream audience.
- Creating app ecosystems: Layers can offer new smart contract functionality for the Bitcoin ecosystem, opening the door to DeFi, gaming, apps, and more.
- Enhancing privacy: Layers can provide enhanced privacy compared to the Bitcoin L1 via confidential interactions, rollups, ZKproofs and more.
- Broadening accessibility and adoption: By reducing transaction costs and increasing speed, layer 2 solutions make Bitcoin more accessible for daily use and microtransactions, which can spur adoption and new use cases.
- Maintaining decentralization and security: Layers allow Bitcoin to scale while preserving the decentralization and security of the overall ecosystem. This layered approach allows for a balance between scalability and the principles of Web3.
If you’re curious to learn more about Bitcoin layers, download our free ebook below: