This post was first published on Medium.
We show that the original Bitcoin protocol can already support it. No breaking changes, including both SegWit and Taproot, are needed for Ordinals to work. Actually, it works better on the original protocol: 100,000X cheaper and 12.5X bigger.
How Ordinals Works
Ordinals is the latest manifestation of color coins, which marks individual satoshis (thus “coloring” them) such that they can carry extra information. More specifically, every satoshi is sequentially ordered based on the time it is mined, which was first proposed in the Bitcoin forum in 2012. Each satoshi will have an ordinal number between 0 and 2,100,000,000,000,000 (hence the term “ordinals”) assigned. Each unique satoshi can then be inscribed with some other information to create NFTs (aka inscriptions).
When an Ordinal NFT is minted in a transaction, it is inscribed on the first satoshi of the first output of the transaction. The transaction contains some extra data: text, images, videos, etc. Afterward, it can be transferred just like regular bitcoins.
Consider an example transaction with three inputs and two outputs.
There are six satoshis from three addresses in the inputs. The outputs contain five satoshis to two different addresses. The remaining one satoshi is used as a fee to pay the miner.
Ordinals uses the first-in-first-out algorithm to assign each satoshi of the inputs to the outputs. Any missing ordinals go to the miner. In the example, Ordinals (and their represented NFTs, if any) A, B, C, and D go to the first output, F to the second, and F to the miner.
Compare with other Bitcoin-based NFTs
Previous colored coins usually use OP_RETURN, an unspendable output with only 80 bytes of metadata maximally, which means a link/reference to NFT is stored.
Ordinals stores the entire NFT image/content on-chain using these techniques.
- The Taproot upgrade in 2021 removed the data limit entirely, as long as it fits inside a block. Segregated Witness (Segwit) software upgrade in 2017 allows up to 3MB of witness data to be stored ‘outside’ of the 1MB block limit. Together, they provide up to 4MB worth of storage space for the inscription content.
- Inscriptions are stored in an “envelope” between Opcodes OP_IF and OP_ENDIF. OP_FALSE precedes OP_IF to ensure that this data is never actually used in script execution and does not take up stack space. No OP_RETURN is used, and the output containing an inscription is spendable and thus unprunable. The following example inscribes the text “Hello, world!”:
Ordinals on Bitcoin SV
The original Bitcoin protocol of today, Bitcoin SV (BSV), pioneered storing NFT entirely on chain as early as 2021. Since BSV and BTC share the same algorithm for issuing satoshis, they can assign satoshis ordinal numbers in the same way. Ordinals on BSV works overwhelmingly better than on BTC.
- Cost: BTC fees are around 10 sat/byte, while BSV’s are only 0.05 sat/byte¹. Given the price of $25,000/BTC vs. $45/BSV as of today, minting the same NFT is >100,000X cheaper!
- Data size: BSV has restored the full Script after the Genesis upgrade, so the same envelope works. It also has more ways to embed the data in a transaction. For example, OP_RETURN can be used in a spendable output. Currently, up to 50MB of data can be included in a single transaction, 12.5X bigger than the 4MB limit on BTC. Here is a transaction of 27MB and another of 12MB. Data limit is expected to increase continuously as usage grows. More advanced NFT protocol on top has already stored NFT over 1GB, by breaking it up across multiple transactions.
At 1.07 GB in size, this single NFT is ~1/300th the size of the #BTC blockchain.
— Relysia (@Relysia_SV) October 7, 2021
BSV does so without changing the protocol. No SegWit and Taproot is needed.
 We compare the average fee rate. In BTC, SegWit can bring 4X discount, and in BSV, some miners take 0.01 sat/byte, a 5X discount.
Watch: Smart Contracts and Computation on BSV
New to blockchain? Check out CoinGeek’s Blockchain for Beginners section, the ultimate resource guide to learn more about blockchain technology.