Clarity brings smart contracts to Bitcoin. It is a decidable language, meaning you can know, with certainty, from the code itself what the program will do. Clarity is interpreted (not compiled) & the source code is published on the blockchain. Clarity gives developers a safe way to build complex smart contracts for the world's most secure blockchain.
Clarity is open-source and supported by the Stacks ecosystem, Hiro PBC, & Algorand.
Why Clarity?
The Clarity language uses precise and unambiguous syntax that allows developers to predict exactly how their contracts will be executed.
The Clarity language allows users to supply their own conditions for transactions that ensure that a contract may never unexpectedly transfer a token owned by a user.
No compiler
Contracts written in Clarity are broadcasted on the blockchain exactly as they are written by developers. This ensures that the code developers wrote, analyzed, and tested, is exactly what gets executed.
Post-conditions protect developers and users from smart contract bugs and abuse. Post-conditions are used to verify token balances at the end of smart contract calls.
Bitcoin state
With Clarity you have read access to the Bitcoin chain. Further plans will enable even deeper integration and visibility into Bitcoin.
Clear code
Getting Started
The Future of Smart Contracts
Clarity recognizes the need for smart contract languages that are more safe, secure, and predictable. Our goal is to help the smart contract industry mature beyond its current state. Clarity is designed by scientists from Princeton and MIT, and the open-source project is initially supported by various Stacks entities and Algorand. We welcome other projects and developers to join this effort and help contribute!