Trust Machines Logo
Contact

What is Stacks and How Does It Work?

Written by undefined @
Read Time 6 min
A graphic of the Stacks logo
Table of Contents
Share This Article

Disclaimer: Content about scaling solutions and projects is not an endorsement. All content is solely for educational purposes.

Bitcoin priotizes stability, security and decentralization. However, its layer 1 lacks some of the core programmability features utilized by other leading blockchains.

What if Bitcoin’s security and capital could be leveraged to host a whole new level of functionality?

Enter Stacks.

With Stacks, Bitcoin can become more than just a cryptocurrency; it can become a booming ecosystem for Web3.

In this article, we will discuss the Stacks blockchain, how it works with Bitcoin, and the productivity that Stacks brings to Bitcoin.

What is Stacks?

Stacks is an open-source layer 2 blockchain that introduces smart contracts and decentralized applications to Bitcoin.

Originally named Blockstack, Stacks’ groundwork began as early as 2013. The Stacks testnet was eventually launched in Q2 of 2018, with its mainnet released a few months later in October 2018. A significant update to the network came in January 2020 with the Stacks 2.0 Mainnet Launch. This update natively connected and anchored Stacks to Bitcoin, and introduced a new era of innovation for building on Bitcoin.

Stacks chose to build on top of the Bitcoin blockchain for two main reasons:

#1. Bitcoin’s security

Transactions on Bitcoin are practically irreversible and nearly impossible to manipulate. The Bitcoin network is also extremely stable and decentralized with thousands of nodes. Since its first block in 2009, Bitcoin has experienced nearly 0 interruptions, with over a 99.98% uptime. 

#2. Bitcoin’s network effects

Bitcoin is by far the largest, most well-known cryptocurrency. As Bitcoin adoption increases, so will its use cases. Stacks capitalizes on Bitcoin’s success and helps transform it into a productive asset with extensive utility.

Below Stacks, Bitcoin serves as the solid foundation on which all transactions are settled. On top of the Stacks network, developers can use smart contracts to build applications and other Web 3 infrastructure.

Stacks is one of a few Bitcoin layers that exists today, but its relationship with Bitcoin is unique. It builds on the Bitcoin blockchain through its consensus mechanism, Proof-of-Transfer.

What is Proof-of-Transfer?

Proof-of-Transfer (PoX) is a novel process for confirming Stacks blocks on the blockchain.

Proof-of-Transfer is a variation of Proof-of-Burn (PoB), which grants Stacks miners the right to mine blocks by “burning” a portion of their tokens (either a native asset or another cryptocurrency). By burning, Stacks miners can mine more blocks, earning BTC rewards for helping secure the network. 

With Stacks, Proof-of-Transfer requires miners to send BTC (on the Bitcoin network) to other Stacks network participants, rather than a burn address. Since Stacks can read the Bitcoin network state, it can then verify the occurrence of these Bitcoin transactions. The Stacks protocol then randomly selects a winning miner for that block and rewards them with Stacks’ native token, STX.

Stacks interacts with Bitcoin without modifying its base layer’s protocol whatsoever. Bitcoin ultimately serves as the final settlement layer for Stacks, as Stacks transactions are bundled and then sent to be verified and validated on Bitcoin. Subsequently, the history of every Stacks block is forever recorded on the Bitcoin blockchain.

This mechanism makes Stacks unlike any other layered solution.

Proof-of-Transfer is also a remarkably sustainable solution to Bitcoin’s programmability and scalability. Instead of using more energy, Stacks miners recycle Bitcoin’s Proof-of-Work (PoW) by transacting Bitcoin, and in turn produce new Stacks blocks.

Stacks' Proof of Transfer consensus diagram.

Source: stacks.co

Along with mining, another important mechanism to the network is “stacking.”

What is Stacking on Stacks?

Similar to staking on Proof-of-Stake blockchains, stacking is a reward system that distributes native Bitcoin (BTC) to users for supporting the network and locking away STX tokens for a period of time.

Stacking is funded through the Bitcoin transactions that Stacks miners execute to participate in securing the Stacks blockchain.

By temporarily committing STX tokens, users can earn passive income and contribute to securing the Stacks blockchain. There are multiple methods for stacking STX, including using a crypto exchange, Stacks liquidity pool, or Stacks wallet.

Now that we covered how Stacks operates with Bitcoin, let’s explore how Stacks brings programmability to Bitcoin through its smart contracts.

What are Clarity Smart Contracts?

Stacks creates smart contracts with a coding language known as “Clarity.” Designed specifically for Stacks, Clarity is optimized for predictability and security. 

A major benefit of Clarity smart contracts is the ability to read Bitcoin state - meaning that Stacks smart contracts can be triggered based on Bitcoin base layer transactions. 

The smart contract code for Clarity is publicly available and directly accessible on-chain. Clarity also mitigates smart contract bugs and issues with its preview functionality,  allowing developers to test code before running any smart contract.

With Bitcoin’s base layer having limited smart contract functionality, Stacks and Clarity open many possibilities for developing applications on top of Bitcoin.

What’s Being Built On the Stacks Blockchain?

The Stacks community is rapidly expanding with both users and developer tools. Every day, more people are becoming aware of the advantages of building on Bitcoin within Stacks’ ecosystem.

Here are some notable use cases that Stacks enables for the larger Bitcoin network.

Stacks DeFi

Most BTC is currently unproductive and locked away in cold storage. This leaves a huge opportunity for developing decentralized finance applications that utilize native BTC. Stacks is different from centralized products and off-chain applications that use wrapped BTC applications. Being inherently anchored to the Bitcoin blockchain, the Stacks layer helps facilitate secure and immutable Bitcoin DeFi.

Bitcoin DeFi Projects on Stacks

AlexA decentralized launchpad for projects on Stacks to access community funding and the other resources.

LNSwap - A Trust Machines atomic swap exchange that enables trustless swaps between Bitcoin and Stacks network assets.

Arkadiko - A non-custodial liquidity protocol that provides stable loans with its stablecoin, USDA token.

Stacks NFTs

NFTs (Non-Fungible Tokens), such as digital collectibles and real-world ownership rights, are possible on the Stacks blockchain thanks to Clarity smart contracts. Stacks NFTs are settled on and secured by the Bitcoin base layer.

Bitcoin NFT Projects on Stacks

Gamma - A marketplace for buying and selling Bitcoin NFTs powered by Stacks.

StacksBridge - A cross-chain NFT bridge between Ethereum and Bitcoin through Stacks.

Stacks DAOs

DAOs (Decentralized Autonomous Organizations) have recently taken off in popularity throughout crypto. Stacks smart contracts enable hosting of collectively-owned, blockchain-governed organizations on Bitcoin.

DAOs on Stacks

LydianDAO - A democratized treasury management protocol on Stacks.

Other Stacks Projects

Here are some other notable applications built with Stacks.

BTC.us - Web3 domain names that are registered through smart contracts and secured by the Bitcoin blockchain.

Console - A decentralized group chat platform by Trust Machines.

CityCoins - A way for citizens to generate crypto-based revenue for themselves and their cities.

Where to Buy STX Tokens

Stacks native token, STX, is available for trading on some of the leading cryptocurrency exchanges, including:

After purchasing STX, users can transfer their funds to an on-chain Stacks wallet (such as Hiro) to begin exploring the network’s ecosystem. 

Stacks: Secure and Decentralized Bitcoin Applications

With the most recent upgrade, Stacks 2.1, the Bitcoin layer is more powerful and useful than ever before. Stacks is still in its infancy, but it has seen significant adoption from both users and developers.

Bitcoin’s sound foundation and economic potential make developers take note of programmable layers like Stacks. Proof-of-Transfer and Clarity give Stacks a one-of-a-kind solution for expanding the Bitcoin economy.

Stacks is ushering in a new era of Bitcoin innovation through these technologies. From DeFi to DAOs and NFTs, Stacks smart contracts enable powerful dApps, secured by Bitcoin.

Bitcoin will not be stuck to its identity as just a store of value. With the help of Stacks, Bitcoin is evolving into an expansive platform for the future of the internet.

Builder Tracking Pixel