Blockstack is an open-source effort to design a network with the security of Bitcoin and the expressivity required for developing decentralized applications. In these decentralized apps, mass data breaches, loss of user privacy and lack of data portability can be a thing of the past.
Although Blockstack has evolved since its publication in 2019, the whitepaper remains a good resource:
Blockstack builds on, and extends, the Bitcoin blockchain. Satoshi Nakamoto designed its limited scripting language for a single use case — tracking the ownership of Bitcoin. While this is one of the things that keeps Bitcoin secure, it also means you can’t program Bitcoin with enough expressivity to build decentralized apps. Blockstack adds this expressivity to Bitcoin without spinning up a new Proof of Work chain. Instead, Blockstack re-uses Bitcoin’s computing power and its blockchain for settlement and security.
At the base layer of Blockstack sits the Stacks blockchain. It's a layer 1 blockchain that enables people to register digital assets and write smart contracts. It connects back to the Bitcoin blockchain with a 1:1 block ratio — anything that happens on the Stacks blockchain can be verified on the Bitcoin blockchain.
Connecting Bitcoin and Blockstack: Proof of Transfer (PoX)
Bitcoin miners have already spent electricity on computation to mine blocks and earn Bitcoin. Instead of introducing another Proof of Work chain, Proof of Transfer (PoX) re-uses Bitcoin to secure the Stacks blockchain. Miners compete to mine blocks by sending Bitcoin to participants in the network. This Bitcoin becomes proof of computation, and by proxy enables the Stacks blockchain to share Bitcoin's CPU resources.
Proof of Transfer is in line with Satoshi Nakamoto’s vision of new networks sharing Bitcoin’s computing power, but keeping additional data out of the Bitcoin chain.
Learn more about Proof of Transfer:
Clarity, a better language for writing smart contracts
A smart contract is code that runs on the blockchain instead of a server. Using smart contracts, users can agree on a global state without having to trust a central authority. Clarity is a next-generation language for writing smart contracts that optimises for security and predictability. Clarity is an open-source project supported by Blockstack and Algorand.
Why Clarity optimises for security
Smart contracts power high-stakes transactions and apps. Bugs or malice in these contracts can cause large-scale irreversible harm. Yet most users won't be able to audit a contract’s code. Instead of having full flexibility, it should be hard for developers to write dangerous code and users should be protected proactively.
Clarity code is predictable. It includes mathematical proofs that tell you what a program will do before you execute it. That way, you can catch a lot of bugs before they happen.
Clarity code is not compiled. The code developers wrote, analyzed, and tested, is exactly what gets executed.
Clarity includes defenses for users. Instead of trusting developers, users can supply their own conditions for transactions. These conditions ensure that a contract may never unexpectedly transfer a user's tokens.
Users don’t need to know they’re interacting with a smart contract. Reading state is free and the transaction fees of writes can be sponsored for the user.
Smart contracts enable developers to build decentralised protocols that use the blockchain for backend logic. Their source code is public on chain and they can operate without a central authority. This minimizes the trust required between parties. With tokens, there is now a way to monetize protocol usage and to incentivize people to contribute to their development.
Gaia: user-controlled data storage
Gaia is a system for storing application data without a central trusted party. It creates a shared data layer for applications that any app can use. Gaia stores data off-chain, on one of the popular cloud storage providers by default. The user's key encrypts the data to keep it private. Neither the cloud storage provider nor app developers will have access to unencrypted data.
Blockstack Authentication is a decentralised SSO protocol. Users can sign in to any Blockstack app with their username (registered to the Stacks blockchain using BNS) and their data storage (using Gaia). Authentication is performed by the user's client by cryptographically signing a statement.
is a library for integrating Blockstack Authentication, Gaia, and smart contracts into your app.
Blockstack Naming Service
The Blockstack Naming Service (BNS) is a decentralised naming service. It allows anyone to name digital assets such as usernames or websites and register that name on the blockchain. BNS is different from traditional naming services like DNS or Git:
Names are globally unique
Names are human-readable, such as "johnappleseed.id"
Names are owned by a public-private key pair so you don’t have to trust an intermediary with ownership of the name.
Decentralized finance on Bitcoin
Decentralized finance (Defi) such as lending, exchanges, and stablecoins has become a popular use case for smart contracts. There are some characteristics of Clarity that make it especially well-suited for the defi use case:
Clarity can query the Bitcoin blockchain directly. This enables developers to build defi apps and protocols that use Bitcoin.
Clarity has SPV proofs for Bitcoin built in so developers don't have to write their own.
Clarity optimizes for security and predictability to prevent the bugs and hacks that occurred on other networks from happening.
An implementation of the Ampleforth token, oracle, and geyser in Clarity
A trustless token exchange