Need a crash course on Bitcoin layers?
→ READ OUR FREE GUIDE
Need a crash course on Bitcoin layers?
→ READ OUR FREE GUIDE
Need a crash course on Bitcoin layers?
→ READ OUR FREE GUIDE
Need a crash course on Bitcoin layers?
→ READ OUR FREE GUIDE
Need a crash course on Bitcoin layers?
→ READ OUR FREE GUIDE

What Are Bitcoin Ordinals?

Ordinals is a metaprotocol on Bitcoin that has revitalized builder culture since it launched in January 2023. Since then, over 70M ordinals have been created, and Bitcoin blocks have been almost entirely full. Let’s take a closer look at what exactly ordinals are and how they work.

Type
Deep dive
Topic(s)
Bitcoin
NFTs
Published
November 11, 2024
Author(s)
CTO
A circle made of numbers, with Bitcoin Ordinals laid over it
Contents

What Are Bitcoin Ordinals?

Bitcoin Ordinals enable “digital artifacts” (think NFTs) to be inscribed onto the Bitcoin blockchain, creating a new variation of Bitcoin-native NFTs. Ordinals assign a unique number to each satoshi (the smallest unit of Bitcoin) and enable devs and users to inscribe additional data onto those satoshis (such as text, images, video, audio, and more).

Ordinals were launched on Bitcoin mainnet on January 21, 2023, and since then, adoption has soared, with more than 70M ordinals inscribed to date, though inscription volume has tapered noticeably after the Bitcoin Halving.

Cumulative number of inscriptions, source

To create those inscriptions, users have paid 6,900 BTC in fees, or roughly $588M at today’s Bitcoin price.

Ordinals inscription fees, source

In order to create ordinals, you need a way to identify and number individual satoshis. That’s where ordinal theory comes in.

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.

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 inscribe data on a satoshi?

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”.

SegWit

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 <code-rich-text>OP_*<code-rich-text> 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 <code-rich-text>OP_FALSE<code-rich-text> conditional at the top.


OP_FALSE
OP_IF
  OP_PUSH "ord"
  OP_1
  OP_PUSH "text/plain;charset=utf-8"
  OP_0
  OP_PUSH "Hello, world!"
OP_ENDIF

How Are Ordinals Different From Other NFTs?

At first glance, ordinals share some similarities with other NFTs, such as those found on Ethereum or Solana, but it’s worth pointing out a couple important differences with their structure.

First, there’s an argument to be made that ordinals are more durable and reliable than NFTs on other chains. There are two reasons supporting this argument:

  • 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 an image somewhere else off-chain (which can be changed or even go offline). Since ordinals are inscribed on-chain, they are more durable and reliable.
  • Ordinals are on Bitcoin. Bitcoin is more decentralized and secure than any other blockchain. Because of those traits, there’s a strong argument that Bitcoin will last longer than any other blockchain, and ordinals will be around as long as Bitcoin is.

Second, it is expensive to inscribe an ordinal on Bitcoin (to date, the average inscription fee is around $4). That cost comes into play because Bitcoin blocks have been consistently full since the launch of Ordinals:

Source

And that fullness translates to higher sats/vbyte in order to transact on Bitcoin:

Source

However, these higher inscription costs and block fullness are great for Bitcoin and the network’s sustainability long term, and this higher fee market also works as an automatic filter. Higher inscription fees filter out the high-volume, low-cost “NFT spam” that clutters many other chains.

Altogether, these properties make Ordinals appealing to luxury brands, auction houses, and anyone who prioritizes durability and reliability.

How Are Ordinals Different From BRC-20 and Runes?

Bitcoin Ordinals sparked a wave of innovation on Bitcoin, which led to other metaprotocols being released on Bitcoin, including two popular ones for fungible tokens called BRC-20 and Bitcoin Runes.

BRC-20 is a metaprotocol built on top of Ordinals that uses the same ordinal theory to identify individual satoshis, but where Ordinals focuses on creating a version of NFTs native to Bitcoin, BRC-20 is for creating fungible tokens. To date, BRC-20’s most popular use case is creating meme coins, and the majority of ordinals activity is actually BRC-20 activity.

Bitcoin Runes are a much newer protocol that launched in April 2024 alongside the Bitcoin Halving. Designed by ordinals creator Casey Rodarmor, Runes are a fungible token protocol that are more efficient onchain than BRC-20 tokens. They haven’t gained the same traction as early Ordinals adoption, and as of October 18th, 160K Runes have been “etched” (created).

How to Inscribe an Ordinal

If you want to inscribe your own ordinal on your own, 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 not for the faint of heart. But the good news is you don’t have to create (or build) with ordinals on your own.

Explore Ordinals Apps and Tooling

There’s a wide range of ordinals tooling available to you, whether you want to inscribe your own ordinals, integrate ordinals into your application, or just explore what’s been inscribed already. Here are some of the popular tools available today:

  • Inscribing ordinals: There are many tools in the market for inscribing ordinals, including no code tools where you can inscribe ordinals with just a few clicks in your web browser. Popular options include OrdinalsBot (created by the Satoshibles team) as well as creator portals from marketplaces Gamma, Unisat, and Magic Eden.
  • Ordinals wallets: Ordinals support has become common in many Bitcoin wallets, including Leather, Xverse, Unisat, Ordinals Wallet, Trust, Magic Eden, and more.
  • Ordinals marketplaces: The marketplaces above (Gamma, Unisat, and Magic Eden) all offer ordinals trading, as does OKX, Magisat, and Ordinals Wallet.
  • Ordinals devtools: If you’re looking to integrate ordinals into your application, we offer some tooling at Hiro that you may find helpful, including our Ordinals API, which reliably serves inscription data, Ordhook, if you want to build an event stream for ordinals, and the Ordinals Explorer, if you’re simply looking to explore inscriptions.

Conclusion

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 we 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 if there’s specific ordinal tooling you’d like to see, let us know and reach out to the Hiro team on the Hiro Developer Tools channels on the Stacks discord.

Product updates & dev resources straight to your inbox
Your Email is in an invalid format
Checkbox is required.
Thanks for
subscribing.
Oops! Something went wrong while submitting the form.
Copy link
Mailbox
Hiro news & product updates straight to your inbox
Only relevant communications. We promise we won’t spam.

Related stories