Stacks (STX), the blockchain that brings smart contracts to Bitcoin (BTC)

Stacks is a layer 2 solution for Bitcoin (BTC) that enables the creation of smart contracts, bringing new possibilities to the blockchain such as decentralized finance (DeFi) applications and NFTs. Stacks is developing a new ecosystem on Bitcoin and making it easier to use BTC on decentralized applications through sBTC. Discover how this infrastructure enables the development of Web3 on Bitcoin.

9th July 2023
11 minutes to read
This article is a translation of an article from Cryptoast.fr, which you can find here.

What is Stacks (STX)?

If Bitcoin (BTC) is considered the king of cryptocurrencies, it's because of its decentralization and its ability to strengthen itself despite attacks. From the Blocksize War to the Chinese ban and the Mt. Gox bankruptcy, Bitcoin has emerged stronger from these challenges. It excels in one task: keeping value secure.

The Bitcoin network is so resilient that making it more efficient or adding new features would require radical changes that could weaken it.

That's why many developers have sought to create second-layer technologies (Layer 2) to provide Bitcoin with additional functionalities.

Today, there are several Layer 2 solutions on Bitcoin:
     -The Lightning Network allows for near-instantaneous and low-cost BTC transactions through a network of payment channels.
     -Liquid (L-BTC) is a second layer that enables the creation of various digital assets.
     -The Taproot Assets protocol allows the creation of assets by leveraging the Taproot upgrade.
     -RGB (still in development) is both a Layer 1 and Layer 2 solution on Bitcoin that will enable the creation of smart contracts.

As for Stacks, it is a second-layer infrastructure blockchain built on Bitcoin, featuring its own consensus mechanism called Proof of Transfer (PoX).

Supported by the Stacks Foundation, Stacks extends the functionality of Bitcoin by introducing new elements such as smart contract creation.

Thanks to Stacks, users of the Bitcoin blockchain can benefit from decentralized finance (DeFi) applications, non-fungible tokens (NFTs), and much more.
Get 0.5% off Bitcoin purchases at Relai App with code: MARIUSAAB

How does the Stacks blockchain work?

Stacks utilizes a new consensus mechanism called Proof of Transfer. Here's how it works:

There are three different actors in Stacks:

Stacks Users

Users interact with the Stacks network by signing their transactions. These transactions go through similar steps as on other blockchains: they are transmitted to validators for verification and inclusion in a pending block.

The data generated by users and applications on Stacks is stored outside the main blockchain in a system called Gaia.

Gaia is an off-chain storage network that allows users to retain control over their own data. It supports data storage on cloud services such as AWS, Microsoft Azure, and others.

Users can choose where they want to store their data and even decide to host it themselves using their own computing resources.

It's important to note that the information stored by Gaia is linked to the user's blockchain address. In other words, only the owners of the private keys associated with an address have access to the data linked to that address.
Information flow diagram from the Gaia storage network

Stacks Miners

Stacks miners perform different operations than Bitcoin miners. They are responsible for forming a block whose hash is then recorded on the Bitcoin blockchain. However, they don't need to perform energy-intensive calculations.

Stacks miners transfer satoshis to the network, which are then redistributed to STX token stackers as rewards. The consensus mechanism randomly selects one of the miners. The more a miner has transferred to stackers, the higher their chances of confirming the new block and mining new STX tokens.

Currently, each block generates 1000 STX. The rewards are halved every four years in sync with Bitcoin halvings. However, Stacks predicts that the last halving will occur in 2032, reducing the reward to 125 STX per block. After that, the reward per block will remain fixed at 125 STX.

Stacks stackers

Stackers verify and propagate transactions submitted to the network to form a block before validation.

A stacker must have stacked at least 90,000 STX (approximately $65,000 at the time of writing) or they can use a staking pool by utilizing a third-party node.

Stackers need to link a Bitcoin address to receive BTC rewards, which represent an average annual interest of about 10% on stacked STX tokens. These rewards come from transfers made by miners.

Finally, stackers have the option to withdraw their STX tokens at the end of a certain number of predefined cycles, with each cycle lasting approximately two weeks.
Operation of the Proof of Transfer in Stacks
To ensure scalability, the Stacks blockchain utilizes micro-blocks and anchor blocks.

Micro-blocks quickly group pending transactions to enable fast confirmation on the Stacks blockchain. This ensures quick transaction confirmation.

However, micro-blocks are not directly recorded on the Bitcoin blockchain. To establish finality with Bitcoin, micro-blocks are assembled into an anchor block at each Bitcoin block confirmation.

The anchor block is compressed into a Merkle tree and then recorded on the Bitcoin blockchain through a transaction using the OP_RETURN opcode. This opcode marks the transaction output as invalid and allows for information storage without spending bitcoins. Stacks uses OP_RETURN to record the anchor block on Bitcoin, ensuring the immutability and security of Stacks blockchain transactions. Miners selected by the network receive 1000 STX as a reward for their block confirmation work.
Diagram of anchor blocks and micro-blocks in Stacks compared to Bitcoin.
To facilitate the connection between the Stacks and Bitcoin blockchains, the Stacks Foundation, with the help of the Algorand Foundation, created a new programming language called Clarity. Clarity was created to address the specific needs of the Stacks ecosystem, building upon Solidity and addressing its weaknesses to provide a safer and more adaptable language.

Similar to the need for Ethereum's Layer 2 solutions to have Ether derivatives (e.g., Wrapped Bitcoin or WBTC), it's equally important for Layer 2 solutions on Bitcoin to have a derivative of BTC to ensure smoother interoperability.

When a user performs a peg-in operation by sending BTC to a peg wallet, sBTC is issued on the Stacks blockchain in exchange.

When a user wishes to redeem their BTC, at least 70% of the stackers must confirm the peg-out requests by transferring the BTC from the peg wallet to the requested address.

In case of failure, the system enters a recovery mode where the rewards that would typically go to the stackers are used to fulfill the peg-out requests. This incentivizes stackers to maintain sBTC-BTC parity.

In the event of a malicious attack attempting to falsify one or more peg-outs or peg-ins, stackers risk having their deposits slashed. This mechanism encourages stackers to maintain a 1:1 BTC-to-sBTC ratio in the peg wallet on the Stacks network.

Currently, sBTC is still on Stacks' testnet but is expected to transition to the mainnet before the end of 2023. The introduction of sBTC will facilitate the use of BTC in decentralized applications, particularly in DeFi, expanding its possibilities.

Similar to Bitcoin Improvement Proposals (BIPs) on Bitcoin, Stacks has its own improvement proposals called Stacks Improvement Proposals (SIPs). SIPs are concise technical documents that describe proposed implementations and improvements to the Stacks blockchain. They serve to propose new functionalities, gather community feedback, and document proposals.

The Stacks Blockchain Application Ecosystem

The Stacks ecosystem already offers several applications with a diverse range of functionalities. One of these applications is ALEX, which can be described as the PancakeSwap of Stacks.

ALEX allows users to exchange different assets, generate returns by providing liquidity and staking tokens, and even transfer assets from Ethereum (ETH) and Binance Smart Chain.

Another notable application on Stacks is Gamma, a marketplace for non-fungible tokens (NFTs) that is also compatible with Ordinals.

The Hiro Wallet is the most widely used wallet in the Stacks ecosystem. It is also compatible with Ordinals and will soon be compatible with the Lightning Network. This wallet enablesusers to store, manage, and transfer their tokens with ease.

Additionally, Stacks introduces the Bitcoin Name Service (BNS). Similar to Ethereum's .ETH domains, users can claim their own domain names on Stacks using the .BTC extension. The BNS allows for replacing long, random character addresses with easily memorable names. This enables users to have a receiving address like "yourname.BTC" for their wallet.

What are the roles of the STX token?

The STX token is at the core of the Stacks ecosystem. It serves as the essence of the blockchain, and it is with STX that transaction fees are paid. Every user of the Stacks blockchain must hold STX to use its applications.

Moreover, the security of the Stacks network relies entirely on the STX token. It is essential for transaction validation and acts as a motivating factor for miners to secure the network effectively. Stacking STX even allows users to generate BTC interest.

Furthermore, the STX token enables active community participation in the development of the ecosystem. It empowers the community to propose and vote on new implementations. Holding STX is a way to have a voice within the community.

Additionally, other use cases for STX may emerge in the future based on the various applications built on the Stacks blockchain.

Stacks Fundraising

Since the creation of the network, the Stacks team has raised over $73 million through two fundraising rounds. In December 2017, a token sale reserved for accredited investors raised a total of $50 million. The tokens were initially locked as STX and gradually released over a period of 2 years.

The funding from this initial fundraising round was structured in a way that the majority of the capital would only be unlocked once specific milestones were achieved, providing investor protection. The first milestone was the launch of the blockchain's mainnet, and the second milestone was reaching 1 million users.

In September 2019, over 4,500 individuals and entities participated in a second fundraising round, allowing Stacks to raise over $23 million.

The Tokenomics of the STX Token

During these sales, out of the initially circulating 1.32 billion STX tokens, 24.9% were distributed to different investment entities, 36.1% to the team and entities involved in the project's creation, including 6.6% to Muneeb Ali, the co-founder of Stacks.
Initial Distribution of STX Tokens, by Messari
Taking inflation into account, the STX token is expected to reach a total supply of 1.82 billion units by 2050, representing an increase of approximately 38%.

The Team behind Stacks

Muneeb Ali is an entrepreneur and computer scientist who co-founded Stacks with Ryan Shea in 2013. Muneeb Ali obtained a Ph.D. in computer science from Princeton University, where his doctoral thesis laid the foundation for what would become Blockstack and later Stacks.

As a co-founder of Stacks and CEO of Hiro PBC, Muneeb Ali has made significant contributions in shaping the vision and direction of the project.

The Stacks Foundation team consists of 16 individuals. All team members are members of the foundation, bringing a deep understanding of the organization's objectives.

Brittany Laughlin serves as the Executive Director, Jesse Wiley is the Head of Integration and Security, Jude Nelson as a Research Scientist, Mark Rudnitsky as the Head of Security Engineering, and Mitchell Cuevas as the Director.

Our Opinion on Stacks and STX

Our Opinion on Stacks and STXThe goal pursued by Stacks, which is to add smart contracts to Bitcoin, is arguably the greatest challenge the blockchain industry can face. However, the decentralization and equality features that Bitcoin possesses are not shared by Stacks.

Indeed, the distribution of the STX token has been highly unequal, concentrated in the hands of a small number of entities whose primary goal could be seen as profit-making rather than creating a genuine ecosystem development tool.

The fact that the co-founder, Muneeb Ali, alone holds 6.6% of the total STX supply has led Stacks to be regularly labeled as a scam by some members of the community.

Furthermore, the network's security and consensus are guaranteed either by a holder of at least 90,000 STX for stackers or by an actor capable of transferring several hundred thousand satoshis per block (averaging between 300,000 and 500,000 satoshis, or $90 to $150). This does not contribute to the decentralization of the network.

In the past 100 days, only 6 miners have been active. Moreover, some blocks are confirmed with only one transfer from a single miner.

The necessity of creating a new token to operate Stacks instead of using BTC can also be debated. Stacks is the only Layer 2 solution on Bitcoin that has its own token. Although its unique and novel consensus mechanism could work with BTC as well.

If Stacks were to be more widely adopted, it would significantly reduce the amount of BTC in circulation as some of it would be stacked on Stacks.

Currently, over $300 million is stacked in STX. Why not in BTC? Additionally, by using BTC instead of STX, the Stacks network would be more decentralized.

Nevertheless, Stacks remains a highly promising project. It clearly positions itself as a frontrunner in creating new functionalities on Bitcoin and will inevitably benefit from the congestion on the Bitcoin network and the development time taken by the Taproot Assets and RGB protocols.

Investing in the Stacks ecosystem means siding with a centralized network built on Bitcoin, similar to how Polygon (MATIC) relies on Ethereum (ETH). Caution is always advised when a protocol is claimed to be "decentralized".
Source : Stacks Docs