Ordinals on Bitcoin without SegWit and Taproot

This post was first published on Medium.

Ordinals have become a hot topic in BTC circles for creating non-fungible tokens (NFTs). The main function is to store the NFT itself completely on chain.

We show that the original Bitcoin protocol can already support it. No breaking changes, including both SegWit and Taproot, are required for Ordinals to work. In fact, it works better on the original protocol: 100,000X cheaper and 12.5X bigger.

How Ordinals Work

Ordinals are the latest manifestation of color coins, marking individual satoshis (thus “coloring” them) so that they can carry additional information. More specifically, each satoshi is sequentially sorted 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 “ordinal”) assigned. Each unique satoshi can then be inscribed with other information to create NFTs (aka inscriptions).

When an Ordinal NFT is minted in a transaction, it is written on first satoshi of the first output of the transaction. The transaction contains some additional data: text, images, videos, etc. Afterwards, it can be transferred just like regular bitcoins.

Consider an example of a transaction with three inputs and two outputs.

ordinals on bitcoin without segwit and taproot 1
Caption: Credit

There are six satoshis from three addresses in the inputs. The outputs contain five satoshis to two different addresses. The remaining satoshi is used as a fee to pay the miner.

Ordinals use 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

Previously colored coins usually uses OP_RETURN, a useless output with only 80 bytes of metadata maximum, which means a link/reference to NFT is stored.

Ordinals store the entire NFT image/content on-chain using these techniques.

  1. The stilt root Upgrade in 2021 removed the data limit completely, as long as it fits within one block. Segregated Witness (Segwit) Software update in 2017 allows up to 3 MB of witness data to be stored “outside” the 1 MB blocking limit. Together, they provide up to 4 MB of storage space for the inscription content.
  2. Inscriptions are stored in a “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 expendable and thus unmanageable. The following example enters the text “Hello, world!”:
ordinals on bitcoin without segwit and taproot 2
Caption: Credit

Ordinals on Bitcoin SV

The original Bitcoin protocol today, Bitcoin SV (BSV), pioneered fully storing NFTs 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 work overwhelmingly better than on BTC.

  1. Cost: BTC fees are around 10 sat/byte, while BSVs are only 0.05 sat/byte¹. Given the price of $25,000/BTC vs. $45/BSV as of today, is minting of the same NFT >100,000X cheaper!
  2. Data Size: BSV has restored the entire script after the Genesis upgrade, so the same envelope works. It also has several ways to embed the data in a transaction. For example, OP_RETURN can be used in a consumable output. Currently, up to 50MB of data can be included in a single transaction, 12.5X greater than the 4MB limit on BTC. Here is a transaction of 27MB and another of 12MB. The data limit is expected to increase continuously as usage increases. More advanced NFT protocol on top has already stored NFT over 1GB, by splitting it across multiple transactions.

BSV does it without changing the protocol. No SegWit and Taproot required.

References
[1] https://docs.ordinals.com/
[2] https://medium.com/coinmonks/ordinals-an-overview-of-bitcoin-nfts-795c39447e23
[3] https://tara-annison.medium.com/a-comprehensive-explanation-of-ordinals-nfts-on-bitcoin-67b11868e74f
[4] https://www.chain.com/blog/what-are-bitcoin-ordinals

***

NOTE:
[1] We compare the average fee rate. In BTC, SegWit can give a 4X discount, and in BSV, some miners take 0.01 sat/byte, a 5X discount.

See: Smart contracts and calculations at BSV

width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”>

New to Bitcoin? Check out CoinGeeks Bitcoin for beginners section, the ultimate resource guide for learning more about Bitcoin – as originally envisioned by Satoshi Nakamoto – and blockchain.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *