Stacks Bitcoin Layer - Web3 protocol interpretation

BeginnerJan 22, 2024
This article introduces the Stacks Bitcoin platform, which aims to improve transaction performance and scalability without changing the Bitcoin architecture.
Stacks Bitcoin Layer - Web3 protocol interpretation

TL;DR


The entire project is to solve a simple problem, that is “improving transaction performance and scalability without changing the Bitcoin architecture.” Its 17-page project whitepaper briefly and elegantly introduces the approach to achieving this goal. Its core innovations include the decentralized Bitcoin anchoring mechanism, atomic BTC swaps, and tight integration with the Bitcoin blockchain. The Proof of Transfer (PoX) consensus protocol is not only energy-efficient but also closely related to Bitcoin’s Proof of Work (PoW), further enhancing its security and decentralization features. Overall, Stacks brings new programmability and application potential to Bitcoin, with the potential to transform a large amount of passive Bitcoin capital into productive assets, driving Bitcoin to become a more secure Web3 infrastructure.

First of all, Stacks is an independent blockchain with its own mainnet and smart contract language. By using the decentralized stablecoin sBTC, transactions can be completed with BTC as the final payment and the anchored transaction records can be synchronized on the BTC blockchain, enhancing network decentralization and security. At the same time, the PoX consensus mechanism of our network improves transaction efficiency. Additionally, the Turing-complete Clarity language enhances Bitcoin’s scalability to support ecosystem capabilities such as Dapps, NFTs, etc.

Considering the recent hot topics in Bitcoin layer 2, the price has been steadily rising. Additionally, compared to data token protocols like BRC 20, Stacks has undergone time-tested development and is more solid in terms of its intrinsic value and practicality.Overall score: 4 points.

Stacks Overview


The “Stacks: A Bitcoin Layer for Smart Contracts” white paper provides a detailed introduction to the Stacks platform.This is a Bitcoin layer designed for smart contracts. It’s a bit of a mouthful, remember it’s the “Bitcoin layer” designed for “smart contracts”, Bitcoin layer (or Bitcoin Layer 2 is easier to understand, but Stacks is more like a skin on Bitcoin).

The so-called “Bitcoin layer” refers to an additional layer built on top of the Bitcoin blockchain, which expands the functions of Bitcoin so that it can maintain the core characteristics of Bitcoin (such as decentralization, security and persistence) while enabling more complex applications and transaction types. This layer allows developers to take advantage of Bitcoin’s powerful features to create smart contracts and decentralized applications without requiring changes to the underlying infrastructure of Bitcoin itself.

The Stacks platform is a smart contract layer based on Bitcoin that aims to extend the security and decentralization features of Bitcoin to smart contracts and decentralized applications. By introducing the Clarity language, Stacks provides a secure and predictable smart contract environment while allowing smart contracts to respond directly to Bitcoin transactions.

Its core innovations include the decentralized Bitcoin anchoring mechanism, atomic BTC swaps, and tight integration with the Bitcoin blockchain. The Proof of Transfer (PoX) consensus protocol is not only energy-efficient but also closely related to Bitcoin’s Proof of Work (PoW), further enhancing its security and decentralization features. Overall, Stacks brings new programmability and application potential to Bitcoin, with the potential to transform a large amount of passive Bitcoin capital into productive assets, driving Bitcoin to become a more secure Web3 infrastructure.

Stacks Whitepaper Introduction Key Summary


To ensure the authenticity, subsequent articles will retain the Introduction of the whitepaper.

Stacks is a Bitcoin layer for smart contracts. It enables smart contracts and decentralized applications to trustlessly use Bitcoin as an asset and settle transactions on the Bitcoin blockchain. The initial version of Stacks was launched in early 2021, introducing Bitcoin transaction settlement, the Clarity language for secure contracts in response to Bitcoin transactions, and atomic asset swaps with BTC. The next major proposed upgrade to Stacks, the Nakamoto release (expected to release in 2023), will add important features that enhance Stacks’ capabilities as a Bitcoin layer:

(a) A decentralized bidirectional Bitcoin peg for writing BTC Input/Output to Bitcoin,

(b) Transactions secured by Bitcoin’s finality,

(c) Fast transactions between Bitcoin blocks.

The resulting Stacks layer makes Bitcoin a fully programmable asset that is trustless. This could make hundreds of billions of dollars of passive Bitcoin capital productive, unlock decentralized applications, and make Bitcoin the backbone of a more secure web3.

Bitcoin is the most decentralized, secure, and durable blockchain. BTC is a unique and widely held asset, and the Bitcoin blockchain serves as the best final settlement layer for transactions. Those who want to maximize decentralization and durability should use BTC as their asset and conduct final settlement on the Bitcoin blockchain. However, in order to preserve its valuable properties, the design of the Bitcoin blockchain is slow, minimal, and resistant to change. For example, it does not provide fully expressive smart contracts or fast performance, so it cannot directly support complex applications. Therefore, BTC remains a passive asset, while most applications are built on Layer 1 (L1) blockchains like Ethereum and others that have weaker native assets compared to BTC. The Bitcoin layer extends Bitcoin’s functionality and improves Bitcoin’s performance without changing Bitcoin L1. Typical examples include fast payments (Lightning) and general-purpose smart contracts (Stacks and RSK). Bitcoin Layer 2 can be compared to FedWire as a settlement layer and TCP/IP as an internet protocol: it builds additional layers on top of these foundations, bringing additional functionality and innovation while keeping the base simple and stable. Bitcoin Layer 2 enables complex applications that require fully expressive smart contracts, high performance, or higher privacy.

In addition, Stacks is compatible with various subnets, including EVM-based Rust VM and other networks, which is the one you play on ETH. If you want to use Bitcoin to achieve transaction settlement, just use Stacks.

Stacks’ Main Innovations


Secured: Protected by the entire hash power of Bitcoin (Bitcoin finality). Enabling Bitcoin finality for Stacks transactions, transactions that occur on the Stacks layer will be protected by the entire hash power of Bitcoin after approximately 100 Bitcoin blocks or approximately 24 hours of confirmation. This means that to reverse these transactions, an attacker would need to reorganize Bitcoin. These transactions settle on Bitcoin and have Bitcoin finality. Additionally, the Stacks layer is forked from Bitcoin, so any state on Stacks automatically follows Bitcoin’s forks.

Trust-minimized: Minimization of trust in the Bitcoin pegging mechanism has introduced a novel decentralized and non-custodial Bitcoin pegged asset called sBTC, enabling smart contracts to operate with Bitcoin pegged assets in a faster and cheaper manner, without compromising security. This also allows contracts on the Stacks layer to write Bitcoin transactions without the need for trust through pegging transfers.

Atomic: BTC addresses have ownership of atomic BTC swaps and assets. Atomic swaps and assets, Stacks have the ability to perform atomic BTC swaps and allow Bitcoin addresses to own and move assets defined on the Stacks layer. Magic Swap and Catamaran Swap are examples of trustless atomic swaps between BTC assets on the Bitcoin L1 and Stacks layers that are already live. Additionally, users can own Stacks layer assets such as STX, stablecoins, and NFTs on Bitcoin addresses and transfer them using Bitcoin L1 transactions as needed.

Clarity: Clarity is a language used for secure and verifiable smart contracts. Developers can mathematically determine what a contract can and cannot do before executing it. Decentralized applications will benefit from the security features of the Clarity language. As of December 2022, over 5000 Clarity contracts have been deployed on the Stacks layer.

Knowledge: To understand the complete state of Bitcoin, read from Bitcoin. It can read Bitcoin transactions and state changes without the need for trust and execute smart contracts triggered by Bitcoin transactions. The reading capability of Bitcoin helps to maintain a decentralized pegged state consistent with the BTC locked on Bitcoin L1, and so on. Among the Bitcoin reading capabilities, Stacks has the following abilities: Respond to Bitcoin transactions, where smart contracts can be designed to trigger when specific types of Bitcoin transactions are detected, such as when a certain amount of Bitcoin is received by a Bitcoin address. Read Bitcoin state, where Stacks can read the current state of the Bitcoin blockchain, including balance, transaction history, and other information of addresses. Also, staying in sync with Bitcoin: By reading the latest state of the Bitcoin blockchain, Stacks can ensure that its operations and smart contracts remain consistent with the Bitcoin blockchain, especially in decentralized pegging and asset transfers.

Scalable: Scalable and fast transactions settled on Bitcoin. High performance and scalability will be provided through various mechanisms, including faster Stacks layer blocks between Bitcoin blocks. Additionally, a scalability layer like a subnet (distinct from the main Stacks layer) can make different trade-offs between performance and decentralization. The subnet can support other programming languages and execution environments (such as Solidity and EVM), allowing all Ethereum smart contracts to use Bitcoin-backed assets and settle on the Bitcoin chain.

Stacks’ PoX Consensus Mechanism


Encrypted networks use consensus mechanisms to secure the blockchain. The two most commonly used consensus mechanisms are Proof of Work (PoW) and Proof of Stake (PoS). In PoW, miners must solve mathematical puzzles to verify transactions, while in PoS, the blockchain relies on token holders to verify crypto transactions. In both mechanisms, miners and token holders earn rewards by validating transactions. Proof of Burn (PoB) is another consensus mechanism that is not commonly used. In PoB, miners compete to “burn” PoW tokens as a substitute for computing resources.

Insert topic: Proof-of-Burn (PoB) is a cryptocurrency consensus mechanism. Its core idea is to prove the miner’s contribution to the network by “burning” (that is, permanently removing) a certain amount of cryptocurrency. . The purpose of this mechanism is to provide a more energy-efficient way to achieve network consensus and protect the security of the blockchain compared to Proof-of-Work (PoW).

  1. Burning Tokens: In a PoB system, miners participate in the mining process by sending tokens to an unrecoverable address (i.e., “burning” tokens). These tokens are permanently removed from circulation and are therefore considered “burned”.
  2. Proving Contribution:By burning tokens, miners prove their contribution to the network. This contribution is achieved by sacrificing economic value, similar to how miners in PoW demonstrate their contribution by consuming electricity and computing resources.
  3. Reaching Consensus: In PoB, miners who burn more tokens generally have a higher chance of receiving mining rewards or gaining access to the creation of new blocks. This mechanism encourages miners to invest resources (by burning tokens), thereby helping to secure the network and participate in the blockchain’s consensus process.
  4. Energy-saving Features: Compared with PoW, PoB does not require a lot of electricity and computing resources. Therefore, it is considered a more environmentally friendly consensus mechanism.

Proof-of-Transfer (PoX) is the core consensus mechanism of the Stacks blockchain. Its working principle is as follows:

  1. Security based on Bitcoin: PoX is built on top of Bitcoin’s Proof-of-Work (PoW) mechanism. It leverages the existing Bitcoin blockchain as a security foundation instead of creating a completely new PoW system.
  2. Transfer instead of burn: Unlike Proof-of-Burn (PoB), miners in PoX do not burn tokens but rather transfer Bitcoin to other participants in the network. These participants are typically users who hold and lock Stacks tokens (STX), known as “Stackers”.
  3. Incentive mechanism: With PoX, miners participate in the creation of new blocks by transferring Bitcoin. The transferred Bitcoin is distributed as rewards to Stackers. This mechanism encourages users to hold, lock, and participate in the network’s protection.
  4. Double rewards: In the Stacks network, miners compete for the right to create new blocks by transferring Bitcoin and receive STX tokens as rewards. At the same time, Stackers earn Bitcoin rewards by locking their STX tokens, increasing the attractiveness of participating in the Stacks network.
  5. Network security and decentralization: Since all Stacks transactions settle on the Bitcoin blockchain, Stacks can benefit from the high security and decentralization of the Bitcoin network.
  6. Energy efficiency: PoX utilizes the energy already consumed by Bitcoin, making the Stacks network more energy-efficient while maintaining security.

The proof-of-transfer mechanism brings several benefits to blockchain networks like Stacks: Stacks leverages the security of Bitcoin. Applications developed on Stacks can easily interact with the on-chain state and data of Bitcoin. Participating in PoX does not require special hardware, allowing anyone to become a miner. Additionally, they can reuse the energy already consumed by Bitcoin through its Proof-of-Work consensus mechanism. Stackers can earn BTC by protecting the network.

As mentioned above, PoX is based on the Bitcoin network’s own PoW mechanism. To be clear: the Stacks blockchain is independent of Bitcoin, but it leverages Bitcoin’s security to enhance its own security.This is accomplished by having Stacks transactions ultimately settled on the Bitcoin blockchain, but this settlement is indirect and does not require the Bitcoin blockchain to process a large number of Stacks transactions. Stacks’ transactions are processed on its own blockchain, but the final settlement of these transactions is achieved by recording specific transactions on the Bitcoin blockchain. These transactions on the Bitcoin blockchain are not payment transactions in the traditional sense, but are used to record and verify activity that occurs within the Stacks network.

Stacks Financial Incentives


Stacks is a mechanism that incentivizes STX token holders to participate in the Proof of Transfer consensus mechanism of Stacks. STX holders who participate in stacking are called “Stakers”.

Whenever a new block is mined on the Stacks blockchain, the platform sends the BTC submitted by the miners to the stackers as a reward for protecting the network. All stackers are rewarded with Bitcoin after approximately every stacking cycle.

However, the stacking period is not fixed and can vary based on various factors.To participate in stacking, Stackers need to have version 4 or higher of the Stacks wallet.

STX holders also need a certain amount of STX to directly participate in the stack (approximately 100,000 STX), which varies based on total supply and participation. Any STX holder who is interested in participating but does not hold the minimum required STX can join the stacking pool.

With the recent popularity of Bitcoin layer 2 brought by BRC 20, BRC 20 tokens like Ordi, Stas, Rats have gained momentum, and STX has also begun to soar recently. As always, due to the anchoring ability of digital gold Bitcoin, there are no other coins in the web3 space that can match it. Some even say that Ethereum is just a testnet for Bitcoin, and DeFi and Dapps are having a blast on ETH and other networks that are not as good as ETH’s consensus. So if Bitcoin itself has such capabilities, it will continue to soar. Therefore, it is understandable that Layer 2 and related tokens are gaining popularity.

Disclaimer:

  1. This article is reprinted from [Jiang can’t]. All copyrights belong to the original author [Got a classmate]. 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.
Start Now
Sign up and get a
$100
Voucher!
Create Account