Joy

Joy

∮欢迎来到web3!现在我们是同志了。
medium

[Popular Science] What are Ordinals? Understanding Bitcoin NFTs.

Ordinals was launched on the Bitcoin mainnet by developer Casey Rodarmor on January 20, 2023. Ordinals NFT is the latest way to create NFTs on Bitcoin. While non-fungible tokens (NFTs) on Bitcoin are not a new concept, second-layer networks on Bitcoin, such as Counterparty and Stacks, have already implemented Bitcoin-based NFTs. However, Ordinals NFT has a fundamentally different architecture compared to other Bitcoin NFTs.

Since their launch, over 200,000 Ordinals NFTs have been minted by an increasing number of users, developers, and enthusiasts who are excited about the potential of Bitcoin-native NFTs. But what exactly are Ordinals NFTs, how do they work, and why are they different?

image

Since their launch, Ordinals NFTs have seen steady growth and now have various media types embedded into individual satoshis.

What are Ordinals Inscriptions?#

Ordinals is the means by which Bitcoin NFTs are created by attaching data such as images, videos, and other information to the Bitcoin blockchain.

Unlike previous Bitcoin NFT solutions, Ordinals NFTs do not exist on Bitcoin's second-layer networks. Instead, they use a random but logically consistent sorting system called the Ordinals theory to give each individual satoshi a unique number. Therefore, Ordinals NFTs are fully Bitcoin-native. They work without changing the Bitcoin protocol, without requiring any additional layers, and are backward compatible with the network.

A satoshi, also known as sat, is equivalent to 1/100,000,000 of a Bitcoin and is the smallest denomination of Bitcoin.

History of Ordinals NFTs#

While Ordinals NFTs were truly unlocked through the conceptualization of the Ordinals theory, the Ordinals NFTs that exist today were made possible by the SegWit and Taproot updates to the Bitcoin protocol, which occurred in 2017 and 2021 respectively.

It is important to note that these updates were not specifically made to enable these new types of NFTs. However, each update expanded the amount of arbitrary data that could be stored on-chain within a block, allowing for the storage of images, videos, and even games. This made Ordinals NFTs inevitable.

SegWit#

SegWit, implemented in 2017, resulted in a soft fork of the Bitcoin blockchain. This update introduced a "witness data" part that can support arbitrary data, effectively segregating Bitcoin transactions into two parts.

SegWit separates transaction and witness (signature) data into different parts and allows arbitrary data to be stored in the witness part.

The witness data was initially created to:

  1. Bypass the strict limitations on block size.
  2. Allow optional and arbitrary data transfers.
  3. Prevent non-malicious transaction malleability.

Technically, the implementation of SegWit meant that transactions no longer needed to include witness data (which would not occupy the 1MB space originally allocated for blocks). Instead, an additional separate space for witness data was created at the end of a block. It supported arbitrary data transfers and had a discounted "block weight" that cleverly kept a large amount of data within the Bitcoin block size limit to avoid the need for a hard fork.

Note: Data placed in the witness data field is "lighter" than data placed in the original block space, so it is cheaper to store data in the witness data field of a SegWit transaction than in the block (e.g., OP_RETURN output).

This was the first precursor to Ordinals NFTs as it expanded the limit on how much arbitrary data could be included in a transaction.

Taproot#

Taproot, implemented in November 2021, is a multifaceted upgrade aimed at improving Bitcoin's privacy, scalability, and security. Taproot created a system that makes it easier to store arbitrary witness data and relaxed the limit on how much arbitrary data can be included in a Bitcoin transaction. The initial goal of this upgrade was to further enhance Bitcoin-based smart contracts, such as time-locked contracts, which are typically expressed in the witness data.

These updates were key driving factors for Ordinals NFTs, as they allowed NFT data to be stored in the spent script of the Taproot script path. This upgrade made it easier to structure and store arbitrary witness data, laying the foundation for the "ord" standard. With the relaxation of data requirements, assuming a transaction could fill the entire block with its transaction and witness data, reaching the 4MB block size (witness data space) limit, it greatly expanded the types of media that could be stored on-chain.

How do Bitcoin NFTs work?#

To understand how Ordinals NFTs work, it is important to distinguish between "Ordinals" and "Inscriptions," which together refer to this new type of Bitcoin NFT.

  • Ordinals is a system for sorting satoshis in a way that provides the "non-fungible" attributes required to create an NFT.
Each satoshi (contained in a UTXO) is assigned an ordinal number based on the order in which it was minted. When transferred, they follow the first-in-first-out rule, moving from the inputs to the outputs of a transaction.
  • Inscriptions are the content of Ordinals NFTs themselves - images, text, videos, or any other data that users deem synonymous with an NFT.

These NFTs can be better understood by comparing them to Ethereum NFTs, which typically consist of two components: tokenID and metadata.

TokenID#

Fungible tokens are interchangeable. For example, there is no way to distinguish between two different Ethereum coins, just as it is impossible to differentiate one dollar from another. TokenID introduces the concept of "non-fungibility" to NFTs - they provide a unique barcode for each NFT, allowing users to distinguish tokens from each other. This is what makes NFTs unique.

NFTs can have the same tokenID if they are created by different smart contracts. In this case, the smart contract address can differentiate one NFT from another.
Ordinal Sorting as TokenID#

Bitcoin is fungible, meaning there is no way to differentiate one Bitcoin from another. This is where the Ordinals theory comes into play.

The key innovation of Ordinals NFTs is that they provide a system for numbering each satoshi. The result is that every satoshi on the Bitcoin blockchain has a unique ID. Each ordinal, in its most basic form, is simply a satoshi assigned a unique number. Here's how it works.

In the Ordinals theory, individual satoshis are numbered based on the order in which they were mined. The first ordinal is the first satoshi minted in the genesis block, which can be traced back to 2008. When a Bitcoin is transferred, the order is preserved through a first-in-first-out system based on transaction order.

For example, if the mining reward for the first block is 50 BTC (1 BTC = 10^8 sat), then the first block will mint satoshis in the range [0;1;2;...;4,999,999,999]. If the mining reward for the second block is also 50 BTC, then the second block will mint satoshis in the range [5,000,000,000;5,000,000,001;...;9,999,999,999].

Since UTXOs actually contain multiple satoshis, the relative order of these satoshis is determined after a transfer transaction.

The Ordinals theory does not violate the fungibility nature of Bitcoin. The Bitcoin protocol does not formally recognize this new sorting of satoshis. Instead, a community of Ordinals enthusiasts collectively assigns meaning to this numbering system and establishes consensus on its use as a tool.

Metadata#

In non-Bitcoin blockchains, metadata is an optional part that can be attached to a non-fungible token to include arbitrary data. It is used to represent and showcase a wide range of assets such as art, in-game items, profile pictures, financial assets, and more, which have become synonymous with the term "NFT."

Inscriptions as Metadata#

Ordinal NFTs do not have a designated metadata point (tokenURI) like non-Bitcoin NFTs. Instead, the metadata of Ordinals NFTs is stored in the witness data of Bitcoin transactions.

An example of a Bitcoin inscription - a CryptoPunk image reused by its owner.

This is where the term "inscription" comes from - the data attached to a specific satoshi is "inscribed" in a specific part of a Bitcoin transaction. To engrave data onto a specific Bitcoin and create an ordered NFT, users must send some satoshis as a separate Bitcoin transaction to a Taproot-compatible wallet and include the desired metadata as part of the transaction. They must also pay attention to the order of transactions to ensure that the required satoshis are not used as network fees. Tools that automate this process help eliminate these risks and make it easier for non-technical users.

How are Bitcoin Ordinals NFTs Different?#

The key difference between Bitcoin Ordinals and more standard NFT types is their liquidity. Because the Bitcoin protocol does not formally recognize the Ordinals theory, an Ordinals can be fungible or non-fungible. This depends entirely on who owns the Ordinals and whether they choose to preserve it as a single satoshi.

For example, if a Bitcoin user does not recognize or care about an Ordinals or the data attached to it, it can simply be used like any other Bitcoin. In this case, the Ordinals is fungible - it can be used to pay network fees or sent as payment, and arbitrary data will still be attached. Ethereum NFTs do not work this way. Ethereum NFTs are fundamentally different from Ethereum fungible tokens, and it is not possible to mix fungible tokens with NFTs because the Ethereum network treats each token type differently.

Debate Surrounding Ordinals NFTs#

The rise of Ordinals NFTs has sparked discussions within the Bitcoin community about the fundamental purpose and spirit of Bitcoin.

Some argue that Bitcoin should be used for secure financial transactions, and the rise of meme-driven Ordinals inscriptions unnecessarily fills up the block space and drives up transaction fees. Others are excited about the meme/cultural value that Ordinals NFTs can bring to the Bitcoin blockchain and the idea of extending Bitcoin's immutable, decentralized database to financial transactions.

Since Ordinals are fully functional in today's Bitcoin software, removing the ability to create Ordinals inscriptions would require an update to the Bitcoin protocol. Ultimately, it will be up to the Bitcoin community to collectively decide whether Ordinals will continue to exist.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.