Bitcoin is used settlement and security, and is the reserve asset of the Stacks network
Settlement and security
Stacks makes no modification to the Bitcoin design. It uses Bitcoin to settle transactions on the Bitcoin blockchain every block. This makes all Stacks transactions inherit Bitcoin’s finality and settlement, because Stacks transactions can be verified on the Bitcoin blockchain.
Before Stacks, building new features on Bitcoin was a paradox. Bitcoin is secure because it’s stable and resistant to change. It’s secure because it has a very limited scripting language with a small attack surface, and limited space for transactions. Introducing new features to the Bitcoin core protocol is hard and not desirable as these features add complexity.
Stacks solves this with Proof of Transfer, microblocks, and Clarity. It is designed so that builders can benefit from Bitcoin’s properties without modifying Bitcoin itself.
Proof of Transfer
Proof of Transfer (PoX) is the consensus mechanism between Stacks and Bitcoin
What is Proof of Transfer?
Proof of Transfer is a mining mechanism that provides a new take on consensus, allowing for a Proof of Work chain (in this case, Bitcoin) to be leveraged and extended in important new ways. All Stacks transactions settle on Bitcoin, and this enables Stacks transactions to benefit from Bitcoin’s security. Every Bitcoin block, Stacks transactions are batched and hashed on the Bitcoin blockchain.
Mining with PoX
Proof of Transfer is an upgrade to Proof of Work. With PoX, miners are not converting electricity and computing power to earn block rewards and transaction fees. Instead, they transfer Bitcoin, a proof-of-work currency, to holders of Stacks Token. This enables holders of Stacks Token to earn Bitcoin from consensus. This process is called Stacking. Leader election happens on Bitcoin and new blocks are written on the Stacks blockchain.
Benefits of Proof of Transfer
Stacks and its apps inherit Bitcoin’s security and settlement
Apps built on Stacks can interact with Bitcoin on-chain data and state
The Stacks blockchain is a flexible layer on top of Bitcoin that enables decentralized apps, smart contracts, and digital assets
Stacks is a layer-1 blockchain
Like Bitcoin, Stacks is a layer-1 blockchain. Proof of Transfer connects it to Bitcoin with a 1:1 block ratio. The Stacks blockchain is more flexible than Bitcoin and enables smart contracts, digital assets, and decentralized apps that connect back to Bitcoin.
Scaling independently of Bitcoin
The Bitcoin block time is too slow to support decentralized apps. To work around Bitcoin's limited speed, Stacks uses microblocks that result in near-instant confirmation on the Stacks blockchain. At the rate of the Bitcoin block time, these blocks will settle from Stacks to Bitcoin to provide the finality and security of Bitcoin.
Scaling independently of Bitcoin ensures that Stacks transactions are fast enough for decentralized apps, while still benefiting from Bitcoin’s security and settlement.
Stacks Token (STX) is the native asset on the Stacks blockchain and used as fuel for transactions. All transactions, from executing Clarity contracts to creating digital assets, are paid for in STX.
Stacks blockchain benefits
Anything that happens on the Stacks blockchain settles on Bitcoin.
A flexible layer on top of Bitcoin that enables smart contracts, digital assets, and decentralized apps.
The Stacks blockchain scales independently of Bitcoin.
Clarity is a safe and predictable language for smart contracts. Clarity smart contracts have visibility into Bitcoin state and can include Bitcoin-based logic.
Optimized for security
Clarity is an upgrade to existing smart contract languages that are rife with features that cause more harm than good. Bugs or malice in smart contracts cause large-scale and irreversible harm. Clarity reduces the surface area for these bugs, makes it hard to write dangerous code, and makes it easy to see what the code will do before running it.
A leap forward in user experience
Today, non-technical users who can’t audit smart contract code have no choice but to trust in the developers that their code is free from bugs or malice.
Clarity enables a familiar web 2.0 user experience for non-technical users without relying on trust. Because it’s known what a Clarity contract will do before running it, users will see in the UI exactly what’s going to happen to their balances. Post-conditions enable the user or their wallets to set conditions that must be true when the contract finishes running. If these conditions are not met, because the contract tries to transfer more tokens for example, the transaction will abort.
Clarity has SPV proofs built in and has visibility into Bitcoin chain state, making it easy to program Bitcoin-based logic into your smart contracts and apps.
The Clarity design
One programming language. No compiler, no assemly, no bytecode.
Source code is interpreted on chain. What you see is what you get.
It’s decidable and turing-incomplete. You’ll know with certainty what the code will do before running it.
Users protect their assets with post-conditions, conditions that must be true when the smart contract finishes running.
Benefits of Clarity
Secure and reliable smart contracts
Program with Bitcoin-based logic
Enables a more reliable and familiar user experience