Ordinals were launched on mainnet on January 21, 2023, and as you can see that in recent weeks, the usage of ordinals has skyrocketed. Here’s more data on cumulative fees paid to inscribe ordinals:
Ordinals enable “digital artifacts” (think NFTs) to be inscribed onto the Bitcoin blockchain, creating a new variation of Bitcoin-native NFTs. But what exactly are they?
What Is Ordinal Theory?
The concept behind ordinal theory is relatively simple. Bitcoin has a fixed supply. Bitcoin’s supply is capped at 21M, and each individual Bitcoin has 100M satoshis (sometimes called “sats” for short), the smallest transferable unit of Bitcoin.
Ordinal theory is in essence just a numbering system. If you can agree upon a way to order the satoshis within a Bitcoin, then you can uniquely number each and every sat that has ever existed as well as every sat that will exist in the future. Ordinal theory proposes numbering satoshis in the order they are mined.
This is a convention—the theory is only valuable to the degree that people accept the numbering system. And in fact, a numbering system isn’t a new idea and goes back to as early as 2012. This concept of numbering satoshis has since been independently proposed by several different entities.
Once you have a numbering scheme in place, you can then represent that scheme in different ways, be it numeric, decimal, coordinates, etc. For example, decimal notation may look something like 3891094.16797, in which the first number is the block height and the second number is the order of the satoshi within that block.
That is essentially the theory behind ordinals, but how do they work mechanically? How do you add non-fungibility to a fungible token?
What Are Inscriptions?
A numbering/naming scheme by itself has limited utility. Once you’re able to attach some content to a name/number, then things get a lot more interesting. To talk about how ordinals accomplish this, we first need to establish some basic concepts to understand how it all works.
Inputs and Outputs
A Bitcoin transaction is basically information that describes the flow of bitcoins. Transactions can have multiple outputs and inputs:
- outputs are the bitcoins generated by a transaction. Each output has a “lock”, to ensure that it can only be spent in a future input by those who have the correct “key”.
- Inputs are just outputs from previous transactions that this transaction intends to spend. Per above, an input must supply the right key to unlock the output.
This “key” is often referred to as a signature, or proof, or “witness”.
Prior to 2017, the way Bitcoin transactions were formatted, the inputs and outputs were laid out sequentially along with their corresponding locks and keys. Thus the unlocking code was spread out throughout the transaction (and hence the block).
In 2017, an upgrade – known as SegWit – went into effect that collects all the unlocking code in a dedicated section at the end of the transaction. Hence SegWit – for “segregating” all the “witness” data.
The Taproot upgrade, which came later in November 2021, introduced some new capabilities to the Bitcoin network. Relevant to us here is that the upgrade supports more complex “proofs”. To use an oversimplified analogy, Taproot lets you construct outputs with a “lock” that can be opened by one of many “keys”. Critically, to “unlock”, one need not “reveal” all the possible keys, only the one specific key that the input trying to spend that output is using.
How that works out in practice is something like:
- Transaction 1: the first transaction creates an output that says “here’s a lock that can be unlocked by one of N keys (one multisig, one biometric, one time-locked, etc)”
- Transaction 2: the second transaction is an input that “reveals” one of the keys (and only that one)
Taproot puts relatively few constraints on these keys (also called “tapscripts” or “spend scripts” in this context, because the script is trying to spend a previous output). And so you could, in theory, encode arbitrary data within a spend script.
Putting all of that together, this is how you inscribe an ordinal:
- Transaction 1: the first transaction is an output of 1 sat (the ordinal) that “commits” to a Taproot spend script – meaning, specifies a lock that can only be unlocked by a specific tapscript.
- Transaction 2: the second transaction is an input that spends the above output, revealing the contents on-chain in the process.
The specific encoding of content is done by using the following structure. The various `OP_*` instructions are called opcodes – they are keywords in the Bitcoin scripting language. The main thing to note is that the contents of this script are never executed because of the `OP_FALSE` conditional at the top.
How Are Ordinals Different From Other NFTs?
At first glance, ordinals share some similarities with other NFTs, such as those found on Ethereum, but it’s worth pointing out a couple important differences with their structure.
First, it is more expensive to inscribe an ordinal on Bitcoin. The user has to pay a Bitcoin transaction fee, and with market congestion, users have already paid nearly $1M in fees to inscribe just over 100K ordinals. In the past few weeks, we have seen increasingly large numbers of users willing to pay higher sats/vbyte in order to successfully inscribe their ordinal:
Secondly, there’s an argument to be made that ordinals have more longevity and more durability than NFTs on other chains. All ordinal data is inscribed on-chain. There is no IPFS or external storage solution, with the NFT itself just containing a url that points to the NFT. What happens if what is on the other side of that url changes?
Ordinals are self-contained on Bitcoin, tying neatly into Bitcoin’s whole ethos of decentralization and security.
How to Inscribe an Ordinal
The state of things today is that ordinal tooling is bad. It is not particularly easy to inscribe your own ordinal. If you want to inscribe your own ordinal on your own, it’s a tedious process that can take 3+ days—at least, that’s how long it took me.
At a high level, the process involves running a Bitcoin core node, creating an `ord` wallet that then indexes all ordinals, and then broadcasting your ordinal txns to the mempool. It’s a lot of work, and you can learn more about my experience in this Twitter thread.
The good news is that you don’t have to create ordinals on your own anymore.
Meet the First Wave of Ordinal Tooling
While ordinals have been live for less than a month, we’re already seeing a range of ordinal tooling crop up to make inscribing and interacting with ordinals easier. Here’s some of the tools now available:
- Inscribing ordinals: the process I described in the previous section is now far less painful thanks to work being done by Ordinalsbot (created by the Satoshibles team) and Gamma. Both have launched no code tools where users can easily inscribe ordinals with just a few clicks in their web browser. No need to run your own Bitcoin node.
- Ordinal functionality in wallets: Xverse has launched ordinal support in their wallet, and users can see their ordinals alongside their Stacks NFT collection. The Hiro wallet also rolled out ordinals and Bitcoin support yesterday. Learn more about this new support and how to easily inscribe your own ordinals via Gamma here.
- Ordinal inscribing stream: Ordinals.com and the Twitter account ord_bot both provide a running stream of new ordinal inscriptions, so you can monitor the latest ordinal creations.
How to Trade Ordinals
Right now, trading options for ordinals are limited, but this is a problem teams are actively working on, and I won’t be surprised if a proper ordinals marketplace launches in the near future. There are a few important logistics that need to be ironed out first, such as how you identify collections for ordinals (something the founder of Gamma talked about in a recent Hiro webinar on ordinals).
However, that hasn’t stopped users from trading. Today, most ordinals trading occurs by wrapping ordinals via Emblem Vault (which wraps the asset as an ERC-20 token), and then those users are trading on OpenSea.
We are also seeing other innovations around ordinals trading. For example, Stacks enables trustless swaps, and Stacks builders have already created ordyswap, which enables trustless swaps between ordinals and STX. A neat innovation, and I expect more to come soon.
A simple way of thinking about ordinals is that they are a “dumb” data store on Bitcoin with little to no semantic structure. That in itself is interesting, but the real opportunity lies with overlaying meaning on top of that inscription data (and the projects that succeed here will need to achieve social consensus around a particular standard or convention). Ordinals have galvanized the Bitcoin community, and I haven’t seen so much excitement around BTC in years. We love to see it!
We’re here to help developers building on Bitcoin, and we are actively looking into what tools developers need for Ordinals. If there’s specific ordinal tooling you’d like to see, let us know and reach out to the Hiro team on the HIRO-PUBLIC channels on the Stacks discord.