Runestones and edicts
Terms used in this lesson
- Runestone
- Transaction data interpreted by the Runes protocol to describe token creation or allocation.
- Runes
- A Bitcoin metaprotocol that assigns fungible-token meaning to transaction outputs through off-chain interpretation.
- UNIT
- Ducat’s dollar-pegged stablecoin, the asset a borrower can create against bitcoin collateral.
- OP_RETURN
- A Bitcoin Script operation commonly used to create an unspendable output carrying a small amount of data.
- OP_13
- A Bitcoin Script operation that pushes the small integer 13 onto the stack; Runes uses it as part of a runestone marker.
- LEB128
- Little Endian Base 128: a variable-length integer encoding used for integers inside a Runes message.
- Cenotaph
- A malformed or intentionally unrecognized Runes message whose affected token balances are burned under the protocol’s rules.
Rune-compatible transaction data describes token allocations between outputs while Bitcoin consensus continues to validate only the underlying transaction.
Loading lesson visuals...
Learn the idea
OP_RETURN is a Bitcoin output script used to carry data and is not a normal spendable payment output. A production runestone starts with OP_RETURN OP_13 (hex 6a5d), concatenates supported data pushes, and decodes their bytes as unsigned LEB128 integers. LEB128 is a variable-length little-endian base-128 integer encoding. Before Body tag 0, even tags carry recognized fields, odd unknown tags may be ignored, and flags select structures such as etching and terms. After Body, each four-integer edict uses Rune block delta, transaction delta, amount, and output selector. A direct selector names one ordinary output; amount zero sends all remaining units there. A selector equal to output count instead distributes across eligible non-OP_RETURN outputs. A pointer receives the remainder left after edicts. Bitcoin validates the transaction bytes; compatible indexers assign the external UNIT meaning.
Spend token-bearing inputs
The Bitcoin transaction consumes outputs that the Runes indexer associates with UNIT balances.
Inspect every idea above to open it.
Satoshis and UNIT are separate asset views. The runestone assigns UNIT meaning to an output index.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.