Awesome Open Source
Awesome Open Source

Stacks: Apps and Smart Contracts for Bitcoin

The Stacks blockchain brings predictable smart contracts and decentralized apps to Bitcoin.

>> Read the Stacks 2.0 whitepaper.
>> See the Stacks 2.0 overview slides.

Why Bitcoin? Bitcoin is the most durable and secure blockchain. Bitcoin is minimal by design and is meant to not change. Stacks extends the design of Bitcoin to enable smart contracts and apps without modifying Bitcoin and with minimal transaction load on Bitcoin. Thousands of Stacks transactions result in a single hash at the Bitcoin blockchain, and Stacks microblocks offer fast confirmations of streaming blocks.

Stacks cryptocurrency (STX) is used as fuel for smart contract execution, transaction processing, and digital asset registrations. STX is a unique crypto asset that can be locked by STX holders to actively participate in consensus and earn Bitcoin (BTC) rewards from the protocol. STX holders can either (a) lock STX in consensus to earn BTC rewards, or (b) use STX as fuel for smart contracts and transactions. More details on earning Bitcoin rewards is here.

Stacks cryptocurrency was distributed to the general public through the first-ever SEC qualified token offering in US history.

Clarity Language for Smart Contracts

Clarity is a new language for smart contracts. Clarity is a decidable language, meaning you can know, with certainty, from the code itself what the program will do. Clarity is interpreted (not compiled) and the source code is published on the blockchain. See the Clarity website and Clarity Github for details.

Proof-of-Transfer (PoX)

PoX consensus is a new algorithm that spans consensus between two blockchains. Leader election happens on a base chain and new blocks are written on a connected chain. PoX has the unique property that it establishes a native exchange pair between two cryptocurrencies. Miners use a base cryptocurrency to mine newly minted units of a new cryptocurrency.

Stacks 2.0 blockchain

Stacks 2.0 blockchain is a layer-1 blockchain that uses the Bitcoin blockchain as a secure base-layer and brings apps and smart contracts to Bitcoin. Stacks implements PoX consensus and natively connects to Bitcoin. With PoX there is no need to modify Bitcoin to enable smart contracts around it. There are two types of participants on Stacks (a) STX miners, and (b) STX holders.

STX miners can view state on both the Bitcoin blockchain and the Stacks blockchain. STX miners participate in leader election by sending transactions on the Bitcoin blockchain, a Verifiable Random Function (VRF) randomly selects leader of each round, and the leader writes the new block on the Stacks chain. STX miners get newly minted STX (coinbase rewards), transaction fees, and Clarity contract execution fees of each block. STX miners express the cost of mining in BTC and spend BTC to participate in leader election.

STX holders can participate in consensus by locking their STX for a cycle, running a full node, and sending useful information on the network as transactions. STX holders who actively participate in consensus can earn Bitcoin rewards. Unlike proof of stake, there is no risk of slashing for STX holders. See the STX earning model for potential earning rate.

See Stacks Improvement Proposals (SIPS), and SIP-007 in particular for more details.

Code

If you're just starting with Stacks, here are the main software repositories you should checkout:

  • Stacks Blockchain - the reference implementation of the Stacks 2.0 blockchain in Rust.
  • Stacks Authenticator - the Authenticator app and developer tools for decentralized login.
  • blockstack.js - a JavaScript library for using identity, auth, and storage in your apps.
  • Stacks Explorer - blockchain explorer for Stacks 2.0 blockchain.

Check out the latest docs for the easiest way to get started!

How to Help

  • Contribute open-source code - send us pull requests with improvements! See some good first issues.
  • Help with software testing - we encourage the community to run the software and file issues
  • Become a community evangelist - join community leaders around the world supporting our mission
  • Weekly Stacks meetings on Discord (Thur at 10am ET).

Resources


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
cryptocurrency (506
smart-contracts (179
apps (65
decentralization (43