A Primer on Bitcoin L2s

Intermediate10/9/2024, 2:57:23 AM
How can Bitcoin evolve to meet growing demands of the rapidly expanding DeFi ecosystem without sacrificing its core principles? This is where Bitcoin L2s come in.

Bitcoin has always been at the heart of crypto. However, by design, it processes a limited number of transactions per second, leading to slower transaction times and higher fees, especially during periods of high demand.

This scalability issue is compounded by the periodic halving of block rewards, which reduces the incentives for miners and can lead to higher transaction fees.

So, how can Bitcoin evolve to meet growing demands of the rapidly expanding DeFi ecosystem without sacrificing its core principles? This is where Bitcoin L2s come in.

Let’s dive in and explore the world of Bitcoin L2s.

Why L2s on Bitcoin?

You might be wondering why we need L2s for Bitcoin when there are already so many faster chains and ecosystems that seem to be handling DeFi activity well.

To answer this question, we need to understand Bitcoin’s current limitations, its historical context, and the unique value it brings to the crypto space.

Bitcoin’s main limitations:

  1. Scalability: Bitcoin can process only about 7–10 transactions per second (TPS) due to its 10-minute block time and 1 MB block size. This throughput is insufficient for a global currency. As a result, during times of high demand, users experience delays and increased fees as miners prioritize transactions with higher fees.
  2. Limited programmability: Bitcoin’s scripting language is intentionally restricted, which limits complex operations or smart contracts.

These limitations have been recognized since Bitcoin’s early days. Soon after its launch in 2009, developers began efforts to build applications and layers on top of the Bitcoin network. An early example is Litecoin, created as a fork of Bitcoin to improve transaction throughput. These attempts highlighted the need for scaling solutions on Bitcoin itself.

Image via CoinTrade

Adding to these challenges is the Bitcoin halving mechanism. Every four years, the block reward for miners is cut in half, which could lead to:

  • Less security: Fewer miners can afford to continue mining, decreasing the network’s overall security.
  • Potential centralization: Only large-scale miners with lower costs can survive, leading to a more centralized set of miners.
  • Increase in transaction fees: If the price of Bitcoin doesn’t rise enough to compensate for lower rewards, miners may prioritize transactions with higher priority fees, increasing transaction costs for all.

This is where L2s come in, offering several benefits to counter Bitcoin’s limitations:

  1. Increased transaction throughput: L2s can process hundreds of transactions per second off-chain.
  2. Lower fees: By batching transactions and settling them in groups on the main chain, L2s significantly reduce per-transaction costs.
  3. Introduce programmability: L2s enable smart contract functionality without changing Bitcoin’s base layer.
  4. Faster confirmations: L2 transactions can be near-instant, with final settlement on the main chain happening later.

But why build on Bitcoin when other chains offer high speed and programmability natively?

Bitcoin and Ethereum are both challenged by high demand from a growing user base. While Ethereum supports most DeFi and NFT apps, Bitcoin primarily focuses on value transfer. This difference influences how L2 solutions are implemented on each chain.

Bitcoin L2s work differently than Ethereum L2s. The fundamental difference between Bitcoin L2s and Ethereum L2s lies in their primary focus and use cases:

  • Bitcoin L2s primarily enhance the scalability and efficiency of simple value transfers and micropayments. Beyond scalability, Bitcoin L2 projects also aim to introduce programmability to the Bitcoin network. While Bitcoin doesn’t natively support a virtual machine, L2 solutions are developing execution layers that run virtual machines. This adds indirect smart contract capabilities to Bitcoin, allowing it to support more applications.
  • Ethereum L2s are designed to scale complex computations and interactions involving smart contracts and apps. The goal here is to handle a high volume of transactions off-chain while ensuring security through the Ethereum main chain.

The benefits of building on Bitcoin include:

  • Capturing Underutilized Bitcoin Value: A significant portion of Bitcoin supply sits idle in wallets. Programmable L2s can activate this dormant capital, driving increased adoption and liquidity for the entire Bitcoin ecosystem.
  • Leveraging Bitcoin’s Liquidity and Brand: Bitcoin has the deepest liquidity of any crypto asset, with a market cap exceeding $1 trillion. This allows applications to tap into a vast pool of capital and a well-established user base.
  • Inheriting Bitcoin’s Security: Bitcoin’s high hash rate and decentralized network make it one of the most secure blockchains. L2 solutions can leverage this robust security model.

While L2s can help expand Bitcoin’s ecosystem beyond just a store of value, they currently compromise its core security and decentralization due to the lack of native verification, introducing new security assumptions. Despite these challenges, L2s offer a way for Bitcoin to become a more dynamic and programmable ecosystem while striving to maintain its essential properties of security and censorship resistance.

Under the hood of Bitcoin L2s

Before diving deeper, let’s clarify the difference between rollups and L2s: Rollups are designed to batch and scale transactions, whereas L2s consist of a broader range of solutions aimed at improving scalability and efficiency.

TLDR: Every L2 is a Rollup, but not every Rollup is an L2.

Rollups are designed to batch and scale transactions efficiently. L2s, while including rollups, offer a wider range of features. These can include smart contract functionality, native tokens, and sometimes separate verification mechanisms. In short, an L2 can be thought of as a rollup plus additional features.

With that in mind, let’s understand how different types of Bitcoin L2s work:

State channels

State channels allow parties to conduct multiple off-chain transactions. The channel is opened by creating a multi-signature address on the main chain, which both parties fund. They can then transact off-chain, with only the opening and closing transactions recorded on the main chain, making the process fast and cost-effective.

When the parties decide to finish transacting, they close the channel by consolidating all off-chain transactions into one final transaction that is recorded on the Bitcoin mainnet. This ensures that numerous small transactions do not clog the network.

Each time a new participant wants to join, a new state channel is opened. This setup ensures that any updates to the transaction states require the consent of all parties involved, preventing any single party from maliciously updating the state.

Here’s how a state channels works:

  • Alice and Bob create a multi-signature address on the Bitcoin chain.
  • Both deposit Bitcoin into this address.
  • This setup transaction is recorded on the blockchain.
  • They perform transactions by updating a shared balance sheet privately.
  • Each transaction is signed by both but not broadcasted to the chain.
  • The new balance after each transaction is signed by both parties as proof.
  • These updates in the ledger remain off-chain.
  • When done, they agree on the final balance.
  • They create and sign a closing transaction reflecting this final balance.
  • This final state is broadcasted to the chain.
  • The Bitcoin chain verifies and records the final transaction.

Only the opening and closing transactions are recorded on the main chain, making the process efficient. State channels allow multiple fast and cheap transactions off-chain, with only the initial and final states recorded on the blockchain, reducing the load and improving efficiency.

A great example of state channels on Bitcoin is Lightning Network, it allows users to create bi-directional payment channels, which significantly reducing congestion.

Sidechains

Sidechains are separate blockchains running parallel to the main Bitcoin network. They allow for more complex operations and greater flexibility, as assets can move between the main chain and sidechains. Sidechains can operate under different rules and consensus mechanisms, improving Bitcoin’s functionality without overloading the main chain.

Let’s understand this with an example:

  • Alice locks her Bitcoin in a special address on the main Bitcoin chain.
  • This action credits her with an equivalent amount of tokens on the sidechain.
  • The locking transaction is recorded on the main chain.
  • Alice can now use these sidechain tokens to perform transactions or run smart contracts.
  • Transactions on the sidechain are processed according to its own rules and consensus mechanism, independently of the main chain.
  • When Alice wants to move her assets back to the main chain, she initiates a transfer on the sidechain.
  • The sidechain sends a proof of the transfer to the main Bitcoin chain.
  • The main blockchain verifies the proof from the sidechain.
  • Once verified, Alice’s original Bitcoin is unlocked and returned to her on the main chain.

Sidechains allow for complex operations and greater flexibility, running parallel to the main Bitcoin network. They reduce the load on the main blockchain while enabling advanced functionalities and scalability.

Bitcoin already has sidechains like the Liquid Network, which enables faster transactions, private trading, and Rootstock , a L2 that converts Bitcoin to smart bitcoins (RBTC) to deploy smart contracts, expanding Bitcoin’s use cases beyond simple transactions.

Rollups

Rollups batch multiple transactions off-chain and then submit a single summary transaction to the main chain. This process significantly reduces the load on the main chain while maintaining security.

Image via Global X ETFs

  • A rollup collects multiple transactions off-chain. For example, Bob sends 1 Bitcoin to Carol, and Dave sends 2 Bitcoin to Emma.
  • The rollup processes these transactions and updates the users’ balances off-chain.
  • The rollup creates a summary of the batched transactions, showing the final balances of Bob, Carol, Dave, and Emma.
  • The rollup submits this summary to the main Bitcoin chain.
  • Once verified, the blockchain updates the balances based on this summary.

This allows multiple transactions to be processed efficiently off-chain, with only a single summary needing to be verified and recorded on the main blockchain. As of now, various projects aim to implement this on Bitcoin, but the biggest obstacle is Bitcoin’s lack of programmability.

Notable examples include BOB (Build on Bitcoin), an EVM-compatible L2 currently on public testnet; Citrea, a recently announced optimistic sovereign rollup planning to use BitVM (something we’ll cover in the next piece) for settlement; Alpen, a modular rollup layer, and BitcoinOS by Sovryn, which aims to create a “superchain of rollups” with cross-rollup compatibility.

Most of these initiatives are initially taking an optimistic rollup approach, allowing for quicker development and deployment while benefiting from Bitcoin’s existing security model. However, many projects, including BOB, have expressed intentions to eventually transition to zk-rollups as the tech improves.

The shift towards zk-rollups aims to further improve scalability, privacy, and security in the long term, potentially transforming Bitcoin’s ecosystem to rival the functionality of newer blockchains while maintaining its core strengths.

Comparison of Bitcoin scaling solutions

Closing Thoughts

Bitcoin L2s aim to improve network activity and utilize dormant Bitcoin by increasing scalability and transaction speed. Despite their potential, these solutions face adoption challenges due to competition from existing Layer 1 programmable chains and inherent security concerns.

One major issue is that Bitcoin’s L2 solutions often require additional trust assumptions, making them less secure than Ethereum’s L2s. Native verification, which would allow Bitcoin to directly validate L2 transactions, could simplify the security model, making Bitcoin’s L2s more secure and efficient.

Bridging BTC to its L2s is also challenging due to the need for secure and reliable mechanisms. Current bridge designs include trust-minimized solutions like tBTC, relying on multiple parties, and custodial bridges like WBTC, managed by centralized custodians. New proposals like BitVM aim for trustless bridges using advanced ZK proofs but face challenges in liquidity management and increased on-chain transaction loads.

The promise of Bitcoin L2s extends beyond Bitcoin itself, with state channels potentially applicable to other ecosystems like EVM and Solana to improve low-latency applications such as gaming and perpetual trading

The future of Bitcoin L2s is uncertain. They have the potential to unlock significant value but might also struggle for adoption. Nonetheless, we at LI.FI are committed to supporting the growth and innovation of the Bitcoin ecosystem. We already support Bitcoin L2s like Rootstock and Thorchain for native Bitcoin swaps and are integrating more applications and chains to bring the best experiences to our partners and users.

Disclaimer:

  1. This article is reprinted from [LI.FI], All copyrights belong to the original author [Yash Chandak]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.

A Primer on Bitcoin L2s

Intermediate10/9/2024, 2:57:23 AM
How can Bitcoin evolve to meet growing demands of the rapidly expanding DeFi ecosystem without sacrificing its core principles? This is where Bitcoin L2s come in.

Bitcoin has always been at the heart of crypto. However, by design, it processes a limited number of transactions per second, leading to slower transaction times and higher fees, especially during periods of high demand.

This scalability issue is compounded by the periodic halving of block rewards, which reduces the incentives for miners and can lead to higher transaction fees.

So, how can Bitcoin evolve to meet growing demands of the rapidly expanding DeFi ecosystem without sacrificing its core principles? This is where Bitcoin L2s come in.

Let’s dive in and explore the world of Bitcoin L2s.

Why L2s on Bitcoin?

You might be wondering why we need L2s for Bitcoin when there are already so many faster chains and ecosystems that seem to be handling DeFi activity well.

To answer this question, we need to understand Bitcoin’s current limitations, its historical context, and the unique value it brings to the crypto space.

Bitcoin’s main limitations:

  1. Scalability: Bitcoin can process only about 7–10 transactions per second (TPS) due to its 10-minute block time and 1 MB block size. This throughput is insufficient for a global currency. As a result, during times of high demand, users experience delays and increased fees as miners prioritize transactions with higher fees.
  2. Limited programmability: Bitcoin’s scripting language is intentionally restricted, which limits complex operations or smart contracts.

These limitations have been recognized since Bitcoin’s early days. Soon after its launch in 2009, developers began efforts to build applications and layers on top of the Bitcoin network. An early example is Litecoin, created as a fork of Bitcoin to improve transaction throughput. These attempts highlighted the need for scaling solutions on Bitcoin itself.

Image via CoinTrade

Adding to these challenges is the Bitcoin halving mechanism. Every four years, the block reward for miners is cut in half, which could lead to:

  • Less security: Fewer miners can afford to continue mining, decreasing the network’s overall security.
  • Potential centralization: Only large-scale miners with lower costs can survive, leading to a more centralized set of miners.
  • Increase in transaction fees: If the price of Bitcoin doesn’t rise enough to compensate for lower rewards, miners may prioritize transactions with higher priority fees, increasing transaction costs for all.

This is where L2s come in, offering several benefits to counter Bitcoin’s limitations:

  1. Increased transaction throughput: L2s can process hundreds of transactions per second off-chain.
  2. Lower fees: By batching transactions and settling them in groups on the main chain, L2s significantly reduce per-transaction costs.
  3. Introduce programmability: L2s enable smart contract functionality without changing Bitcoin’s base layer.
  4. Faster confirmations: L2 transactions can be near-instant, with final settlement on the main chain happening later.

But why build on Bitcoin when other chains offer high speed and programmability natively?

Bitcoin and Ethereum are both challenged by high demand from a growing user base. While Ethereum supports most DeFi and NFT apps, Bitcoin primarily focuses on value transfer. This difference influences how L2 solutions are implemented on each chain.

Bitcoin L2s work differently than Ethereum L2s. The fundamental difference between Bitcoin L2s and Ethereum L2s lies in their primary focus and use cases:

  • Bitcoin L2s primarily enhance the scalability and efficiency of simple value transfers and micropayments. Beyond scalability, Bitcoin L2 projects also aim to introduce programmability to the Bitcoin network. While Bitcoin doesn’t natively support a virtual machine, L2 solutions are developing execution layers that run virtual machines. This adds indirect smart contract capabilities to Bitcoin, allowing it to support more applications.
  • Ethereum L2s are designed to scale complex computations and interactions involving smart contracts and apps. The goal here is to handle a high volume of transactions off-chain while ensuring security through the Ethereum main chain.

The benefits of building on Bitcoin include:

  • Capturing Underutilized Bitcoin Value: A significant portion of Bitcoin supply sits idle in wallets. Programmable L2s can activate this dormant capital, driving increased adoption and liquidity for the entire Bitcoin ecosystem.
  • Leveraging Bitcoin’s Liquidity and Brand: Bitcoin has the deepest liquidity of any crypto asset, with a market cap exceeding $1 trillion. This allows applications to tap into a vast pool of capital and a well-established user base.
  • Inheriting Bitcoin’s Security: Bitcoin’s high hash rate and decentralized network make it one of the most secure blockchains. L2 solutions can leverage this robust security model.

While L2s can help expand Bitcoin’s ecosystem beyond just a store of value, they currently compromise its core security and decentralization due to the lack of native verification, introducing new security assumptions. Despite these challenges, L2s offer a way for Bitcoin to become a more dynamic and programmable ecosystem while striving to maintain its essential properties of security and censorship resistance.

Under the hood of Bitcoin L2s

Before diving deeper, let’s clarify the difference between rollups and L2s: Rollups are designed to batch and scale transactions, whereas L2s consist of a broader range of solutions aimed at improving scalability and efficiency.

TLDR: Every L2 is a Rollup, but not every Rollup is an L2.

Rollups are designed to batch and scale transactions efficiently. L2s, while including rollups, offer a wider range of features. These can include smart contract functionality, native tokens, and sometimes separate verification mechanisms. In short, an L2 can be thought of as a rollup plus additional features.

With that in mind, let’s understand how different types of Bitcoin L2s work:

State channels

State channels allow parties to conduct multiple off-chain transactions. The channel is opened by creating a multi-signature address on the main chain, which both parties fund. They can then transact off-chain, with only the opening and closing transactions recorded on the main chain, making the process fast and cost-effective.

When the parties decide to finish transacting, they close the channel by consolidating all off-chain transactions into one final transaction that is recorded on the Bitcoin mainnet. This ensures that numerous small transactions do not clog the network.

Each time a new participant wants to join, a new state channel is opened. This setup ensures that any updates to the transaction states require the consent of all parties involved, preventing any single party from maliciously updating the state.

Here’s how a state channels works:

  • Alice and Bob create a multi-signature address on the Bitcoin chain.
  • Both deposit Bitcoin into this address.
  • This setup transaction is recorded on the blockchain.
  • They perform transactions by updating a shared balance sheet privately.
  • Each transaction is signed by both but not broadcasted to the chain.
  • The new balance after each transaction is signed by both parties as proof.
  • These updates in the ledger remain off-chain.
  • When done, they agree on the final balance.
  • They create and sign a closing transaction reflecting this final balance.
  • This final state is broadcasted to the chain.
  • The Bitcoin chain verifies and records the final transaction.

Only the opening and closing transactions are recorded on the main chain, making the process efficient. State channels allow multiple fast and cheap transactions off-chain, with only the initial and final states recorded on the blockchain, reducing the load and improving efficiency.

A great example of state channels on Bitcoin is Lightning Network, it allows users to create bi-directional payment channels, which significantly reducing congestion.

Sidechains

Sidechains are separate blockchains running parallel to the main Bitcoin network. They allow for more complex operations and greater flexibility, as assets can move between the main chain and sidechains. Sidechains can operate under different rules and consensus mechanisms, improving Bitcoin’s functionality without overloading the main chain.

Let’s understand this with an example:

  • Alice locks her Bitcoin in a special address on the main Bitcoin chain.
  • This action credits her with an equivalent amount of tokens on the sidechain.
  • The locking transaction is recorded on the main chain.
  • Alice can now use these sidechain tokens to perform transactions or run smart contracts.
  • Transactions on the sidechain are processed according to its own rules and consensus mechanism, independently of the main chain.
  • When Alice wants to move her assets back to the main chain, she initiates a transfer on the sidechain.
  • The sidechain sends a proof of the transfer to the main Bitcoin chain.
  • The main blockchain verifies the proof from the sidechain.
  • Once verified, Alice’s original Bitcoin is unlocked and returned to her on the main chain.

Sidechains allow for complex operations and greater flexibility, running parallel to the main Bitcoin network. They reduce the load on the main blockchain while enabling advanced functionalities and scalability.

Bitcoin already has sidechains like the Liquid Network, which enables faster transactions, private trading, and Rootstock , a L2 that converts Bitcoin to smart bitcoins (RBTC) to deploy smart contracts, expanding Bitcoin’s use cases beyond simple transactions.

Rollups

Rollups batch multiple transactions off-chain and then submit a single summary transaction to the main chain. This process significantly reduces the load on the main chain while maintaining security.

Image via Global X ETFs

  • A rollup collects multiple transactions off-chain. For example, Bob sends 1 Bitcoin to Carol, and Dave sends 2 Bitcoin to Emma.
  • The rollup processes these transactions and updates the users’ balances off-chain.
  • The rollup creates a summary of the batched transactions, showing the final balances of Bob, Carol, Dave, and Emma.
  • The rollup submits this summary to the main Bitcoin chain.
  • Once verified, the blockchain updates the balances based on this summary.

This allows multiple transactions to be processed efficiently off-chain, with only a single summary needing to be verified and recorded on the main blockchain. As of now, various projects aim to implement this on Bitcoin, but the biggest obstacle is Bitcoin’s lack of programmability.

Notable examples include BOB (Build on Bitcoin), an EVM-compatible L2 currently on public testnet; Citrea, a recently announced optimistic sovereign rollup planning to use BitVM (something we’ll cover in the next piece) for settlement; Alpen, a modular rollup layer, and BitcoinOS by Sovryn, which aims to create a “superchain of rollups” with cross-rollup compatibility.

Most of these initiatives are initially taking an optimistic rollup approach, allowing for quicker development and deployment while benefiting from Bitcoin’s existing security model. However, many projects, including BOB, have expressed intentions to eventually transition to zk-rollups as the tech improves.

The shift towards zk-rollups aims to further improve scalability, privacy, and security in the long term, potentially transforming Bitcoin’s ecosystem to rival the functionality of newer blockchains while maintaining its core strengths.

Comparison of Bitcoin scaling solutions

Closing Thoughts

Bitcoin L2s aim to improve network activity and utilize dormant Bitcoin by increasing scalability and transaction speed. Despite their potential, these solutions face adoption challenges due to competition from existing Layer 1 programmable chains and inherent security concerns.

One major issue is that Bitcoin’s L2 solutions often require additional trust assumptions, making them less secure than Ethereum’s L2s. Native verification, which would allow Bitcoin to directly validate L2 transactions, could simplify the security model, making Bitcoin’s L2s more secure and efficient.

Bridging BTC to its L2s is also challenging due to the need for secure and reliable mechanisms. Current bridge designs include trust-minimized solutions like tBTC, relying on multiple parties, and custodial bridges like WBTC, managed by centralized custodians. New proposals like BitVM aim for trustless bridges using advanced ZK proofs but face challenges in liquidity management and increased on-chain transaction loads.

The promise of Bitcoin L2s extends beyond Bitcoin itself, with state channels potentially applicable to other ecosystems like EVM and Solana to improve low-latency applications such as gaming and perpetual trading

The future of Bitcoin L2s is uncertain. They have the potential to unlock significant value but might also struggle for adoption. Nonetheless, we at LI.FI are committed to supporting the growth and innovation of the Bitcoin ecosystem. We already support Bitcoin L2s like Rootstock and Thorchain for native Bitcoin swaps and are integrating more applications and chains to bring the best experiences to our partners and users.

Disclaimer:

  1. This article is reprinted from [LI.FI], All copyrights belong to the original author [Yash Chandak]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
Inizia Ora
Registrati e ricevi un buono da
100$
!