Docs · 01 / 8
Introduction
What Sats-20 is, the mental model, and how the pieces fit together.
What is Sats-20
Sats-20 is a smart-contract protocol on Bitcoin. Programs, small JSON smart contracts, are deployed on Bitcoin. Users call them with actions, which are ordinary Bitcoin transactions. An indexer reads every block, verifies actions, runs them in a deterministic VM and keeps the resulting state.
Bitcoin signatures prove who sent an action and which program it targets, so no extra trust is needed for authorship. The protocol tag is sats-20.
Programmable
Programs declare their own storage and methods instead of being limited to a fixed token template.
Bitcoin-native auth
Bitcoin signatures prove the sender and the target program. No extra trust for authorship.
Deterministic
A pure, bounded VM: the same chain always produces the same state.
Unlocking Bitcoin DeFi
On Ethereum, DeFi is possible because contracts hold their own state and run custom logic when called. Sats-20 brings that model to Bitcoin: a program defines storage and write methods, and every action is a signed Bitcoin transaction that calls one of them.
- Custom logic. Methods combine
requirechecks, arithmetic, branches and ordered writes, so a program can encode rules rather than just record balances. - Payments as part of the rules. A method can inspect
$tx.outputs[i], so it can require, for example, that a given amount of sats is paid to a given address before it applies a mint. - Familiar building blocks. The token example in Program format uses the same shape as ERC-20 style tokens:
balanceOf,transfer,approve,burn. - Settled on Bitcoin. Every action is a Bitcoin transaction, with Bitcoin's signatures and finality behind it.
Sats-20 vs BRC-20
BRC-20 is the widely used inscription-based token standard on Bitcoin. Both rely on an indexer to interpret on-chain data; they differ in what that data can express.
| BRC-20 | Sats-20 | |
|---|---|---|
| Model | A fixed set of JSON operations (deploy, mint, transfer) carried in ordinals inscriptions. | General programs: JSON contracts with their own storage and methods. |
| Logic | Token rules are fixed by the standard; no custom logic per token. | Per-program logic: require checks, arithmetic, branches and ordered writes. |
| Transfers | Two steps: inscribe a transfer, then send that inscription. | One action transaction that calls the program's transfer method. |
| Authorship | Ownership follows the inscription's UTXO. | Signatures through a leaf bound to the program's cmr; the sender is $tx.inputs[0].address. |
| Payments in rules | Not part of the standard. | Programs can require payments to specific outputs, such as a mint price. |
| Beyond tokens | Token balances only. | Anything expressible within the program limits. |
| Execution | Indexer applies the fixed operations. | Indexer runs a deterministic, bounded VM; invalid actions change nothing. |
Mental model
- A program is a JSON document that declares storage, constants and methods.
- An action is a Bitcoin transaction that names a program and one of its write methods.
- The indexer is the only component that interprets programs. It treats the chain as an input log and derives state from the valid actions in it.
- An action that is invalid is simply not part of the protocol state; nothing needs to be undone.
Overview diagram
Deploy
Actions
Indexer
State
Where to next
- Concepts for the vocabulary: identity address, program account, program, action, indexer.
- Program format for the JSON language reference.
- Actions and Execution for the exact transaction layout and how it is applied.