Introduction
Bitcoin Ordinals represent a paradigm shift in how we think about individual satoshis on the Bitcoin blockchain. Introduced by Casey Rodarmor in January 2023 via the ord protocol, Ordinals assign a deterministic serial number to every satoshi ever mined, enabling tracking, collecting, and โ most critically โ inscribing arbitrary data directly onto the Bitcoin base layer. This guide assumes familiarity with Bitcoin scripting, Taproot (BIP-341/342), and witness structures.
Ordinal Theory: Numbering Satoshis
Ordinal theory is a convention โ not a consensus change. It defines a first-in-first-out (FIFO) numbering scheme across all satoshis:
- Ordinal Number: Assigned based on the order a satoshi was mined (0 through ~2.1 quadrillion).
- Degree Notation:
AยฐBโฒCโณDโดencodes the cycle, epoch, block, and offset within a block. - Rarity Tiers:
common,uncommon(first sat of a block),rare(first sat of a difficulty adjustment),epic(first sat of a halving epoch),legendary(first sat of a cycle), andmythic(the genesis sat).
Satoshi transfer follows strict input-output ordering. When a transaction has multiple inputs, sats flow through outputs in sequence. This means coin selection and UTXO management are non-trivial โ careless wallet behavior can accidentally spend a rare or inscribed sat as miner fees.
Inscription Mechanics
Inscriptions embed arbitrary content into the Bitcoin blockchain by storing data in a Taproot script-path spend witness. The data is wrapped in an envelope:
`
OP_FALSE
OP_IF
OP_PUSH "ord"
OP_PUSH 1 // content-type tag
OP_PUSH "image/png"
OP_PUSH 0 // body separator
OP_PUSH
OP_PUSH
...
OP_ENDIF
`
Key Technical Details
- Taproot witness discount: Witness data receives a 75% fee discount (1 weight unit vs. 4 for non-witness), making inscriptions economically viable.
- Push size limit: Each
OP_PUSHis limited to 520 bytes, so large files are split across multiple pushes inside the envelope. - Block weight limit: The theoretical max inscription size is ~400KB (the ~4MB witness limit minus transaction overhead), though most indexers support chunked/multi-part inscriptions for larger files.
- Commit-reveal pattern: Inscriptions use a two-transaction process. The commit transaction creates a Taproot output whose script tree contains the inscription envelope. The reveal transaction spends that output via the script path, exposing the witness data on-chain.
Inscription Indexing and Content Resolution
The ord indexer maintains a local database mapping inscription IDs () to content. Content resolution works as:
1. Parse every Taproot script-path spend for the ord envelope pattern.
2. Associate the inscription with the first sat of the first output (by default).
3. Track that sat across subsequent transfers using Ordinal theory FIFO rules.
Pointer Field and Advanced Envelope Tags
As of protocol updates through 2024-2025, envelopes support additional tags:
- Tag 2 (pointer): Redirect inscription attachment to a specific sat offset in the outputs, overriding the default first-sat rule.
- Tag 3 (parent): Declare a parent inscription, enabling on-chain provenance and collection hierarchies.
- Tag 5 (metadata): CBOR-encoded metadata stored alongside the content.
- Tag 7 (metaprotocol): Declare a metaprotocol identifier (e.g., BRC-20, Runes predecessor patterns).
- Tag 9 (content-encoding): Support
gziporbrcompression. - Delegate inscriptions (tag 11): Point to another inscription's content, enabling on-chain content reuse without duplication.
BRC-20 and Fungible Token Standards
BRC-20 leverages inscriptions to deploy, mint, and transfer fungible tokens via JSON payloads:
`json
{"p":"brc-20","op":"transfer","tick":"ordi","amt":"100"}
`
Critical edge cases:
- Indexer consensus: BRC-20 validity depends entirely on off-chain indexer state. Different indexer implementations have historically diverged, causing balance discrepancies.
- Transfer inscription lifecycle: A BRC-20 transfer inscription must be created and then sent in a separate transaction to the recipient. Simply inscribing a transfer does not move tokens.
- Superseded by Runes: Casey Rodarmor launched the Runes protocol at the April 2024 halving (block 840,000) as an efficient UTXO-based fungible token standard, using
OP_RETURNrather than inscriptions. As of 2025, Runes is the preferred fungible token mechanism on Bitcoin.
Advanced Edge Cases and Pitfalls
Cursed Inscriptions
Early protocol versions failed to index certain inscription types, creating "cursed" inscriptions with negative numbers. These included:
- Inscriptions in inputs beyond the first input
- Multiple inscriptions in a single envelope
- Inscriptions with unrecognized even-numbered tags
Post-Jubilee (inscription number ~62M), the protocol normalized these, assigning positive numbers to previously-cursed patterns.
Reinscription
A sat can be inscribed multiple times. The ord indexer tracks all inscriptions but typically surfaces the first inscription as canonical. Reinscriptions create ambiguity for marketplaces and should be checked when evaluating provenance.
UTXO Hygiene
- Cardinal vs. Ordinal UTXOs: Wallets like Sparrow, Xverse, and the
ordwallet separate inscribed UTXOs from "cardinal" (plain spending) UTXOs. Mixing them risks sending inscriptions to miners. - Dust outputs: Inscriptions typically sit on 546-sat or 10,000-sat outputs. CPFP and RBF interactions require careful handling to avoid orphaning inscribed sats.
- Partial Spend Attacks (PSBT): When signing PSBTs from marketplaces, always verify output mappings. Malicious PSBTs can redirect inscribed sats to attacker addresses.
Sat Hunting and Exotic Sats
Advanced users "hunt" for rare sats using block explorers and custom scripts:
- Parse coinbase transactions for uncommon/rare sats
- Use
ord wallet satsto identify special sats in your UTXO set - Vintage sats (early blocks), pizza sats (from the Laszlo transaction), and Nakamoto-mined sats carry collector premiums
Recursive Inscriptions and On-Chain Composability
Recursive inscriptions reference other inscriptions via /content/ paths, enabling:
- On-chain libraries: Inscribe JavaScript, CSS, or 3D model libraries once; reference them from thousands of child inscriptions.
- Generative art: HTML inscriptions that fetch seed data or shared rendering code from other inscriptions.
- Reduced block space: Instead of duplicating assets, compositions reference existing on-chain data.
This pattern has enabled full on-chain games, interactive SVGs, and complex multimedia collections โ all without any external dependency.
Tooling and Infrastructure (2025)
| Tool | Purpose |
|---|---|
| ord (v0.21+) | Reference indexer, wallet, inscription creator |
| Hiro Ordinals API | REST API for inscription metadata and transfers |
| Magic Eden / OKX | Primary Ordinals marketplaces |
| Sandshrew / Maestro | RPC providers with Ordinals-aware endpoints |
| ord-litecoin, ord-doge | Forks extending Ordinal theory to other UTXO chains |
Conclusion
Bitcoin Ordinals transform the oldest blockchain into a fully on-chain content layer. Mastery requires understanding not just the inscription envelope format, but Taproot witness economics, UTXO management discipline, indexer consensus risks, and the evolving tag system. As the ecosystem matures with recursive patterns, delegation, and Runes integration, Ordinals remain one of the most technically rich areas of Bitcoin development in 2025.