James Bachini

Bitcoin Ordinals

Bitcoin Ordinals

Bitcoin ordinals are a means of creating NFTs by attaching data such as images, videos, and more to an individual satoshi on the base Bitcoin blockchain. They use an arbitrary but logical ordering system called ordinal theory to give each individual Bitcoin satoshi a unique non-fungible reference.

  1. What Are Bitcoin Ordinals?
  2. How Do Bitcoin NFTs Work?
  3. Ordinal Theory Explained
  4. Creating & Managing Ordinals
  5. Conclusion

What Are Bitcoin Ordinals?

Bitcoin ordinals, also known as digital artifacts or Bitcoin NFTs, are a way to inscribe digital content onto the Bitcoin blockchain.

Launched in January 2023 by Casey Rodarmor, the protocol is based on ordinal theory, which gives individual identities to satoshis and allows them to be tracked, transferred, and imbued with meaning.

Bitcoin has 8 decimals so 1 BTC = 100,000,000 Satoshis or SATs. Ordinals are essentially a numbering scheme for sats. Bitcoin ordinals can be mined by running a Bitcoin node or via a wallet/application which integrates with a node on the network.


How Do Bitcoin NFTs Work?

To understand how ordinal NFTs work, it’s important to make a distinction between the terms ordinals and inscriptions both of which are used to refer to this new type of Bitcoin NFT.

  • Ordinals are a system for ordering sats in a way that creates the “non-fungible” property necessary to create NFTs.
  • Inscriptions are the contents of the ordinal NFT itself such as the image, text, video, or any other arbitrary data that a user would consider synonymous with an NFT.

Bitcoin’s Taproot upgrade, implemented in November 2021, was designed to improve Bitcoin’s privacy, scalability, and security. Taproot also created an easier system for storing arbitrary witness data and relaxed the limitations on how much arbitrary data could be placed inside a Bitcoin transaction. The initial goal of this upgrade was to further enhance Bitcoin-based smart contracts like time-locked contracts, which are often outlined in witness data. These changes were a key enabler for ordinal NFTs, which store NFT data in Taproot script-path spend scripts. The upgrade made it easier to structure and store arbitrary witness data.

Bitcoin NFTs can be best understood by drawing a parallel to Ethereum NFTs, which are unique, 1-of-1 tokens that generally have two components: tokenID and metadata. TokenId is stored on-chain and metadata is usually stored in IPFS, a semi-decentralized filesystem and linked to within the contract.

Ordinal theory provides the link between the tokenId and the individual Bitcoin Satoshi.

Ordinal Theory Explained

Satoshis are numbered based on the order in which they are mined, and their transfer from transaction inputs to outputs follows a first-in-first-out scheme. This numbering scheme is called ordinals because it relies on order. Ordinal numbers can be represented in different ways, such as integer notation, decimal notation, degree notation, and percentile notation. The scheme can be used to attach arbitrary assets like NFTs, security tokens, accounts, or stablecoins to satoshis using ordinal numbers as stable identifiers.

To assign input satoshis to output slots, each satoshi in the inputs is assigned to the first available slot in the outputs, in the order in which they appear. In transactions that have a fee, the excess satoshis are treated as extra inputs to the coinbase transaction, and are ordered according to the order of their corresponding transactions in the block.

Ordinal theory allows for rarity levels to be assigned to satoshis based on periodic events in Bitcoin, such as blocks, difficulty adjustments, halvings, and conjunctions. Common, uncommon, rare, epic, legendary, and mythic levels of rarity are assigned to satoshis based on their order of creation.

Satoshis can be inscribed with arbitrary content, which creates Bitcoin-native digital artifacts, and archaeologists have created a community for cataloging and collecting early NFTs based on this scheme.

Inscriptions Explained

By inscribing satoshis with arbitrary content they can be transferred using bitcoin transactions, sent to bitcoin addresses, and held in bitcoin UTXOs. The content of inscriptions consists of a MIME type and a byte string, which allows for creating HTML inscriptions that use and remix the content of other inscriptions. Inscription content is stored on-chain in taproot script-path spend scripts, which have very few restrictions on their content and receive a witness discount, making storage relatively economical.

Inscriptions are made using a two-phase commit/reveal procedure because taproot script spends can only be made from existing taproot outputs. In the commit transaction, a taproot output committing to a script containing the inscription content is created. In the reveal transaction, the output created by the commit transaction is spent, revealing the inscription content on-chain. Inscription content is serialized using data pushes within unexecuted conditionals called “envelopes.” Envelopes are effectively no-ops that do not change the semantics of the script in which they are included and can be combined with any other locking script.

A text inscription containing the string “Hello, world!” is serialized using the following steps: First, the string “ord” is pushed to disambiguate inscriptions from other uses of envelopes. OP_1 indicates that the next push contains the content type, and OP_0 indicates that subsequent data pushes contain the content itself. Multiple data pushes must be used for large inscriptions because individual data pushes may not be larger than 520 bytes in taproot. The inscription content is contained within the input of a reveal transaction and made on the first sat of its first output. Inscriptions can be tracked using the familiar rules of ordinal theory, allowing them to be transferred, bought, sold, lost to fees, and recovered.

Bitcoin Ordinals Inscriptions

Creating & Managing Ordinals

You need a special wallet for managing ordinals. There is an open-source version available at:

You need a special wallet for managing ordinals. There is an open-source version available at: https://github.com/casey/ord/

At time of writing ordinals are still in their early stages of development and gaining traction. More 3rd party wallets and marketplaces may be available since this article was written.


Conclusion

Bitcoin Ordinal NFTs represent a rare new development in the Bitcoin ecosystem. By attaching arbitrary data to individual sats on the Bitcoin blockchain using ordinal theory, it’s possible to create NFTs that are Bitcoin-native.

Will Bitcoin Ordinals take over from Ethereum NFTs? Unlikely because Bitcoin doesn’t have an application layer so it doesn’t have the infrastructure in place to create programmable digital assets in the same way that Ethereum does. Ordinals provide a simple way to link data to a individual Satoshi and make that a non-fungible product.

It’s great to see innovation on top of the Bitcoin network and I hope that Bitcoin ordinals will start to gain traction in the space. The toxic maximalism has damaged Bitcoin’s reputation within the blockchain community and this is a step in the right direction to increasing the utility of the worlds largest digital asset.


Get The Blockchain Sector Newsletter, binge the YouTube channel and connect with me on Twitter

The Blockchain Sector newsletter goes out a few times a month when there is breaking news or interesting developments to discuss. All the content I produce is free, if you’d like to help please share this content on social media.

Thank you.

James Bachini

Disclaimer: Not a financial advisor, not financial advice. The content I create is to document my journey and for educational and entertainment purposes only. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. Do your own research and do not play with funds you do not want to lose.


Posted

in

, , ,

by

Tags: