There is no Leather mobile app at this time. Please only install Leather from leather.io or the Chrome Web Store by Google.

There is no Leather mobile app at this time. Please only install Leather from leather.io or the Chrome Web Store by Google.

There is no Leather mobile app at this time. Please only install Leather from leather.io or the Chrome Web Store by Google.

Back

What is the Stacks Bitcoin L2?

General Wallet Use

15 min

Since their inception, Layer 2 solutions (L2s) have proven incredibly valuable within the Bitcoin ecosystem. The benefits that L2s provide for Bitcoin have become so significant and invaluable that developers have made efforts to expand upon them. As a result, the Bitcoin L2 landscape has gained traction over the years.


One of the more prominent L2s among Bitcoin users is Stacks. In this Learn Center piece, we will explain what Stacks is, how it functions, and why it has become so important for Bitcoin to have L2s like Stacks in general.

What Are Bitcoin L2s?


Bitcoin L2s are a series of frameworks and protocols that act as a secondary layer on top of the main blockchain. The primary function of Bitcoin L2s is to take transactions off of the Bitcoin Layer 1 (also known as L1 and is used to refer to Bitcoin’s main blockchain network), move them to the L2 where they are processed, and then settle that processed transaction data back to the L1. 


Since Bitcoin’s creation, the network has faced a series of challenges that have made scalability a longstanding issue. Bitcoin was designed to prioritize decentralization and security for peer-to-peer transactions, but its L1 wasn’t inherently suitable for more complex use cases. However, a number of L2s appeared over the years to provide an additional pathway for transaction processes, thereby allowing more transactions per second that could settle back to Bitcoin L1. This has given users the ability to experience faster Bitcoin transactions, lower fees, and increased efficiency. It has also given builders the ability to develop burgeoning use cases like DeFi protocols and NFT marketplaces. 


There has been a particularly pronounced increase in Bitcoin L2 projects since the introduction of the Ordinals protocol given their popularity, and each is looking to enable additional functionality on Bitcoin. This includes a number of L2 projects like Stacks that are exploring the possibility of increasing smart contract functionality on Bitcoin.

What is Stacks?


Stacks is an open-source L2 blockchain network that enables smart contract functionality on Bitcoin. It boasts its own token, STX, programming language, a unique consensus mechanism, and it incentivizes the creation of a historical ledger that keeps track of all transactions made on the L2. 


These features are what ultimately separates Stacks from other L2s like Lightning. While Lightning does provide additional functionality because it promotes faster transactions, it lacks a permanent state that it can keep track of, making it unsuitable for smart contracts that need to keep track of data and maintain state.

Proof-of-Transfer (PoX)

Stacks uses a consensus mechanism called PoX (Proof-of-Transfer), which is an extension of Proof-of-Burn, a less commonly used consensus mechanism in which miners “burn” (destroy) a portion of their cryptocurrency in exchange for the ability to mine blocks.


PoX follows a similar procedure, but instead of burning a portion of their cryptocurrency, they transfer it to another Stacks user. Stacks verifies these transfers/transactions because it can read Bitcoin’s network state. The protocol then picks a winning miner who validates that specific transaction block and rewards them with STX tokens. 

Clarity

Additionally, Stacks also offers Clarity, a coding language made specifically for Stacks that is responsible for expanding upon Bitcoin smart contract functionality. When Clarity creates smart contracts, they come with the ability to read Bitcoin state which means that when a Bitcoin L1 transaction is made, a Stacks smart contract is triggered in response.


Additionally, Clarity can also minimize the number of bugs and issues found within a smart contract using its preview functionality, giving developers the chance to test code before a smart contract is launched. 

Use Cases for Stacks


Over the years, Stacks has become well-known for helping build a variety of use cases on Bitcoin. A number of Bitcoin wallets like Leather originated from the Stacks ecosystem and still help their users connect to decentralized applications on the Stacks L2. These include applications that focus on:

Bitcoin DeFi

One of Stacks’ most prominent achievements has been enabling the growth of a Bitcoin DeFi ecosystem. Features like PoX and Clarity expand upon Bitcoin DeFi since the former can automatically settle transactions on every block while the latter can create smart contracts that can read and react to more complex transactions made. 

ALEX, Asigna, LNSwap, Zest, and Arkadiko are just a handful of the projects that users can find in the Stacks DeFi ecosystem. They enable everything from asset swapping to multisig capabilities, which have become crucial building blocks for the future of DeFi on Bitcoin.

Bitcoin NFTs

Clarity smart contracts have also allowed a significant Bitcoin NFT ecosystem to evolve on Stacks, positioning the Stacks Bitcoin L2 as the most prominent network for Bitcoin NFTs. Marketplaces like Gamma.io and a number of notable Stacks NFT collections over the years have cemented Stacks as the main L2 for the exploration of NFTs on Bitcoin.

The Stacks Bitcoin L2 was also key in championing Ordinal inscriptions when the Ordinals protocol launched in 2023. While inscriptions differ from NFTs (they take the form of transactions on the Bitcoin L1), the growth of the Ordinals on Bitcoin was driven, in very large part, by the Stacks community that had jumpstarted the initial push for NFTs on Bitcoin.

What’s Ahead for Stacks?


There are two notable upgrades on the horizon for the Stacks Bitcoin L2: the Stacks Nakamoto Release and sBTC. Both have been in development since 2022, but are reaching key roadmap milestones in 2024.

Nakamoto Upgrade


The Stacks Nakamoto Upgrade was released on testnet on March 25. Nakamoto will follow two phases:  


  • An instantiation phase that runs from April 15 to April 29

  • A mainnet activation that begins on May 15


Ultimately, Nakamoto is a key step in unlocking additional use cases for Bitcoin and, as a result, the Bitcoin economy as a whole. It will address various issues that Stacks users have identified by implementing a number of notable improvements. These include:

Faster block times


By separating block production from cryptographic sortitions, this would reduce the amount of time it takes for a block to be mined from minutes to seconds. 

100% Bitcoin finality


Once a Stacks transaction has been confirmed, it will be very difficult to reverse that transaction.

Improvements to Stacking and mining


Providing Bitcoin Miner MEV Resistance, which prevents Bitcoin miners from possessing an advantage as Stacks miners by changing the sortition algorithm. Under this proposal, users must spend a certain amount of bitcoin if they want the chance of gaining STX tokens.

Ultimately, Nakamoto’s launch will set the stage for another notable planned upgrade: sBTC.

sBTC

Currently, sBTC is set to go live in Q3 2024. It is a 1:1 Bitcoin-backed asset on the Stacks Bitcoin L2 that locks BTC on the Bitcoin L1 and seamlessly deploys it on the Stacks L2.

Just like Nakamoto, sBTC’s launch will represent another significant step forward in unlocking Bitcoin as a fully programmable asset. It will essentially empower builders to develop applications on Bitcoin by bridging Bitcoin and Stacks, and it will serve as the only truly decentralized Bitcoin-backed asset on the Stacks L2. 


sBTC will enable a myriad of use cases on Bitcoin, including but not limited to:

Bitcoin DeFi


sBTC will help expand the Bitcoin DeFi ecosystem in a number of ways, including but not limited to facilitating decentralized methods for earning yield on BTC. Yield is generated by leveraging idle capital, such as through lending or participating in network security or applications, and those applications can be rendered much more seamless thanks to sBTC.

Additionally, sBTC-powered applications can also build newer and more secure methods to lend and borrow BTC. The truly decentralized nature of sBTC can also empower users to swap assets without the need for intermediaries. 

Scaling Ordinals and BRC-20


The growth of the Ordinals and BRC-20 ecosystem underscored the importance of Bitcoin L2s. With network traffic and fees surging to record highs, the call for L2s on Bitcoin led to an explosion of Bitcoin L2 projects that are exploring different ways to scale the world’s oldest blockchain.

The introduction of sBTC would help move certain functions to the L2 that can provide users with faster, cheaper, but also richer Ordinals and Ordinals-adjacent experiences powered by smart contracts. This would alleviate even more pressure from the Bitcoin L1.

Conclusion


While the introduction of L2s has helped address the issue of scalability for the main Bitcoin L1, new protocols like Ordinals continue to emphasize the need for Bitcoin L2s. This has led to the development of various new L2 projects with Stacks being one of the most well-known. 


The upcoming release of Nakamoto and sBTC are set to bring about a new era for the Bitcoin economy, opening it up to possibilities that the ecosystem's builders have been eyeing since Bitcoin's inception. Everything from the Bitcoin DeFi landscape to Bitcoin NFTs is set to change as the community eventually unpacks what the full programmability of Bitcoin can bring.


Connect to Web3 applications built on Bitcoin with the Leather browser wallet app. Install Leather – the only wallet you need to tap into the multilayered Bitcoin economy – today.