Although the application is still very pale, as an interesting attempt to break the circle, it opened the imagination of Bitcoin programmability
Author: Fourteen Jun
“The Times 03/Jan/2009 Chancellor on brink of second bailout for banks.”
——Bitcoin Genesis Block
Recently, the proportion of fee block income on BTC is as high as 74%, about 4.85 BTC fee, and only about 2% two months ago, due to the birth of several hundred times coins and the sentiment of public fomo, the BRC20 market Ushering in an explosion, there were more than 400,000 transactions to be confirmed on the Bitcoin network on May 7. Although he and the ERC20 we are familiar with are both called token standards, the mechanism and principles of their implementation are very different. This article will try to Interpret its implementation and value.
1. The core idea of the Ordinals protocol
1.1. Overview
Each bitcoin is composed of 100 million "Satoshis" (1 BTC = 10^8 sat), each of which is uniquely identified and indivisible.
1. According to the "ordinal" of sat in Bitcoin,
2. Give each Satoshi a specific meaning "Inscriptions"
This is the Ordinals protocol.

2. How are satoshis numbered?
He uses Bitcoin's unique block generation process and UTXO model to give each "sat" a unique number.
Bitcoin is generated in "mining". The mining process is that miners obtain block rights by solving complex mathematical problems (POW) to verify new transactions and add them to the blockchain. A new block will be generated, each block contains a set of new transactions and the hash value of the previous block, and the miner's income is also called Coinbase block
The "account balance model" is adopted in Ethereum, that is, each address has a separate storage structure and space balance (balance) is one of the fields.
The advantages of this model are:
- Simple, very easy to understand and code to implement.
- Efficient, each transaction only needs to verify whether the sending account has enough balance to pay for the transaction;
Disadvantage: double spending attack will occur.
Expandable reading: [Frontier Interpretation] Stanford Researcher Paper - Mechanism, Innovation and Limitations of Ethereum Reversible Transaction Standard ERC20/721R
But the Bitcoin network is different. The balance of his account is not indicated by a number, but is composed of all UTXOs (unspent transaction outputs) related to the current account in the current blockchain network.
2.1. UTXO model of Bitcoin
UTXO (Unspent Transaction Output) is a ledger model. In the Bitcoin system, each transaction generates some outputs. For example, the output of a transfer transaction is the receiver’s Bitcoin address and transfer amount. These outputs are stored in UTXO collections, which are used to record unspent transaction outputs.
Each transaction consists of several inputs (Input) and several outputs (Output). Every transaction costs an input and generates an output, and the output it generates is the "unspent transaction output"; an Input points to an Output in the previous block, only Coinbase transactions do not Input, only output out of thin air.
The advantage of the UTXO model is more security and privacy protection, because it has no centralized account records and account balance information that may be leaked by the traditional account model.
The disadvantage of the UTXO model is that it increases the transaction verification cost and storage cost. Every time a transaction needs to be verified whether the payment and receipt of the transaction is legal, it also needs to store a large amount of UTXO information.
Therefore, any transaction can always be traced from the Input to the Coinbase transaction, and then trace the serial number of each Satoshi when it was mined .

So we say how many bitcoins we have (bitcoins) actually refers to the number of bitcoins (bitcoins) specified in those UTXOs that we own, so if we want to count the number of BTC in an address:
- Start scanning from the genesis block;
- When a certain output of a certain transaction is a specified address, the balance increases;
- When an input in a certain transaction is a specified address, the balance decreases;
2.2. The relationship between sat and UTXO
Note that each sat is not UTXO! Since UTXO is the smallest transaction unit that cannot be divided, sat can only exist in UTXO, and UTXO contains a certain range of sats, and can only generate new output after spending a certain UTXO Split the sats number in
For example, I got 50 BTC rewards in the Genesis block or CoinBase block, and the corresponding Input and Output are ### inputs //empty### outputs: addr_a:[0 -> 4,999,999,999] sats
If I make a transfer of 20BTC to address B, the UTXO will appear in the centralization, and the input here is the output of the previous transaction
### inputs"addrA: [0 -> 4,999,999,999] sats### outputs# 30 btc to addrA, index=0addrA: [0 -> 2,999,999,999] sats# 20 btc to addrB, index=1addrB: [3,000,000,000 -> 4,999,999,999] satsThe consumption order of sats here is based on the FIFO "First-In-First-Out" (First-In-First-Out) principle. In the case of the same transaction fee, the earlier UTXO will be used for transactions more preferentially than the later UTXO.
These are the core technical support of Ordinal NFT, which is very simple but can generate a lot of fun things! This Ordinal Number can even be used to represent domain names, etc.
2.3. Representation of Ordinal number
Ordinal Number has many representations, such as degree notation (Degree Notation)
A°B′C″D‴│ │ │ ╰─ Index of sat in the block(每10 分钟一个块)│ │ ╰─── Index of block in difficulty adjustment period(每2016 个块调整一次,~2 周)│ ╰───── Index of block in halving epoch(每210,000 个块减半,~4 年一次)╰─────── Cycle, numbered starting from 0(减半和难度调整时间重合,~24 年一次)What's interesting about this notation is that it artificially creates a scarcity for sats based on Bitcoin's own cyclical nature:
- common: all sats that are not the first sats from block mint
- uncommon: the sat is the first sat mined from a certain block (D==0)
- rare: the first sat mined when the difficulty is adjusted (C==0&&D==0)
- epic: the first sat dug up during halving (B==0&&D==0)
- legendary: the first sat mined when Cycle rotation occurs (B==C==D==0)
- mythic: the first sat mined from the genesis block (A==B==C==D==0)
For example: https://ordinals.com/sat/1°0′0″0‴, so the core point of Fomo chasing is not what is contained in the content of mint, but the corresponding serial number value such as Ordinal Number.
If the serial number is generated by combining many original technical features of Bitcoin, then Inscriptions is a method of injecting the specific content of sat, so the question arises, how does a sat with a unique identifier define any content bound to it? Woolen cloth?
3. How to Inscriptions any content
Before discussing engraving, let's first understand the two major upgrades of Bitcoin expansion: SegWit and Taproot
3.1. SegWit (Segregated Witness)
It is a major upgrade of Bitcoin that was activated in August 2017. The main purpose is to optimize Bitcoin's transaction processing capabilities, reduce transaction costs, and achieve Bitcoin expansion under safer conditions. SegWit is a soft fork (Soft Fork) upgrade, covering multiple BIPs (141, 142, 143, 144 and 145). The so-called soft fork is compatible with the old version of the Bitcoin client, without destroying the Bitcoin network. compatibility.
Its core change is to separate the signature (Witness Data) in the transaction from the transaction data , making the transaction data smaller, thereby reducing transaction costs and increasing the capacity of the Bitcoin network.
The implementation of SegWit is to divide all transaction data into two parts, one part is the basic information of the transaction (Transaction Data), and the other part is the signature information of the transaction (Witness Data), and save the signature information in a new data structure , is in a new block called a "segregated witness" and transmitted separately from the original transaction.
In this way, the upper limit of the transaction data size of the Bitcoin transaction is increased, while the transaction fee of the signature data is reduced. Before the SegWit upgrade, the capacity limit of Bitcoin was 1MB, but after SegWit, the capacity limit of Bitcoin transactions reached 4MB.
So the essence of Oridnals Inscription is to hide the inscription data in the witness data.
3.2. Taproot upgrade
Similar to the SegWit upgrade, the Taproot upgrade is also a soft fork upgrade. It is a Bitcoin upgrade proposal proposed by Bitcoin Core contributor Gregory Maxwell in 2018. To improve the currency trading mechanism.
The upgrade mainly includes 3 technical concepts - P2SH, MAST and Schnorr. The result is to make complex transactions such as multi-signature transactions and time-lock transactions look like ordinary Bitcoin transactions, which enhances the privacy of Bitcoin, and the purpose is to promote the upgrade of various scenarios such as the deployment of smart contracts and the expansion of use cases for Bitcoin. .
In the SegWit upgrade, a new version number was added to the Bitcoin protocol to represent the new transaction format. In the Taproot upgrade, the most important change to the Bitcoin protocol is updating the script verifier from the ScriptVerify flag to the ScriptVerifyv2 flag to support Tapscript.
The chaining of a Tapscript needs to be divided into two steps: commit and reveal. The content of Inscription is included in the first input of the reveal transaction, thus inscribed on the first sat of the first output of this transaction. For example OP_FALSEOP_IF OP_PUSH “ord” OP_1 OP_PUSH “text/plain;charset=utf-8” OP_0 OP_PUSH “Hello, world!” OP_ENDIF
There are multiple operation instructions here, but the beginning must be OP_FALSE. After this instruction is pushed into the execution stack, the script will stop running, but it is still stored on the chain.
So the essence of Ordinal Inscription is: on the Bitcoin network , with the help of a script tapscript that will never be executed, a simple accounting layer is built to perform statistics and records of assets and data
Since there is only bookkeeping, this means that there will be no script execution and verification process similar to smart contracts, and it must be highly dependent on centralized management and reporting results under the chain .
4. What is BRC20?
At first glance, the name of BRC-20 looks a lot like Ethereum’s ERC20, but in fact the two technologies are very different. The holding status of ERC-20 tokens is stored on the chain, and network consensus can be obtained on the chain. BRC20 is a **JSON format inscription inscribed with the help of the Ordinals protocol.** This specification only defines the deployment, casting and transfer behavior of brc-20 tokens, and the holding status of BRC-20 tokens is maintained by off-chain services .
What does the deployed json look like?
{ "p": "brc-20",//Protocol: 帮助线下的记账系统识别和处理brc-20 事件 "op": "deploy",//op 操作: 事件类型(Deploy, Mint, Transfer) "tick": "ordi", //Ticker: brc-20 代币的标识符,长度为4 个字母(可以是emoji) "max": "21000000",//Max supply: brc-20 代币的最大供应量 "lim": "1000"//Mint limit: 每次brc-20 代币铸造量的限制}The corresponding OP also has Mint and Transfer. The two formats are almost the same. Of course, if you are familiar with transactions on Ethereum, you will find it strange. How to express the transfer recipient here?
This is because when the transfer transaction takes effect, it is when the sat corresponding to the inscription is traded, so whoever receives the sat corresponding to the inscription is the transfer object, so the transfer of brc-20 must be accompanied by the transfer of bitcoin ownership (not It is only consumed as a handling fee).
The centralized organization derives the current balance that the user should have based on each OP registered on the chain.
For example, client software (indexer) such as unisat.io, which is obtained through statistics based on mint and transfer events. For example, if the UTXO contains the mint inscription, it will be added to the first owner, and the transfer will deduct the balance from the initiator's address, and add the balance to the receiver's address.
Extended reading: [Source Code Interpretation] What exactly is the NFT you bought?
In this process, the inscriptions are 'attached' to the transaction (Satoshi). Bitcoin miners will not process these inscriptions. From the perspective of the chain, they are still no different from other satoshis. They are all transferred as ordinary satoshis. of.
5. How to evaluate Ordinals and BRC20
BRC-20 and Ordinals NFT have brought a lot of controversy to Bitcoin, basically divided into two camps:
Supporters believe that as long as you pay the transaction fee, you have full rights to use the block space in any way , no matter what the transaction is. They believe that BRC-20 and NFT have brought new culture and narrative to Bitcoin, which is beneficial to Improve the practical application value of Bitcoin.
Opponents believe that these BRC-20 and NFT are worthless and are junk transactions. Excessive junk transactions will occupy transaction bandwidth, resulting in longer transaction time and higher handling fees.
From the author’s point of view, through the above technical implementation route, it can be clearly felt that although new things are popular in terms of price, their technical defects are also very obvious.
1. Too centralized
The Ordinals protocol must be based on offline services outside the Bitcoin network for state maintenance. If the underlying status service is unavailable or defective, it may lead to asset loss, because the Bitcoin network has no way to prevent invalid inscriptions from being uploaded to the chain , and the centralized platform has to decide whose inscription is valid, and it is valid on this platform.
2. Lack of credible verification mechanism
It does not adopt the open and transparent code rules of smart contracts, so the protocol cannot meet the needs of consensus, double spending prevention and other financial security requirements.
Expandable reading: Interpretation of the latest Final ERC-6147: a minimalist semi-mandatory NFT property rights separation standard
3. Bitcoin network performance limitations
At present, the block interval of Bitcoin is as long as ten minutes, and the transaction confirmation speed is too slow, which will also lead to poor transaction experience. Moreover, the transaction cost of Bitcoin is too high, and a successful on-chain inscription transaction will deduct three-party commissions, platform network data delays, and estimated error costs caused by various lags, so the miner's fee is at least It takes 2-3 times
4. Lack of infrastructure
For example, as the core transaction and pricing service of token, now it mainly relies on the order system guarantee of the trading platform, and the result of complete centralization lacks authoritative trading methods and pricing methods. For example, if there is no centralized platform ruling in its transaction scene, it is very easy to be double-spending. The logical paradox of the first-come-first-served fomo mechanism of inscriptions and the mechanism of miners’ priority packaging according to miners’ fees determines that mint is not necessarily fair
5. Lack of security
BRC20 is easy to give users the illusion that BRC20 is a token created using the security of Bitcoin, which will be as safe and stable as Bitcoin, but in fact it is not the same as BTC . The security of BTC is based on Supported by encryption and consensus algorithms, it has been running relatively stably for quite a long time and has withstood the test of time. BRC20 uses the Ordinals protocol to bind with BTC . The Ordinals protocol currently runs for a short time and is still in the initial stage of development , which may have some potential safety hazards that have not been discovered yet.
SlowMist also issued a reminder of the security risks of BRC 20:
Recently, BRC-20 has become popular. We have noticed that BRC-20 may have security risks from Mint tokens to transactions: on Mint tokens, the security of the related BRC20 token casting platform is doubtful, and the defense measures are relatively weak, and it is easy to be maliciously attacked Tampering with the code, resulting in the theft of assets while users of Mint. In terms of trading methods, there are two ways: one is to find a third party to guarantee the transaction in private, and it is easy to encounter scammers, counterfeit currency, etc.; the other is to place orders on special trading platforms, and the security of these trading platforms cannot be guaranteed.
Although the author is not optimistic about the Ordinals in front of him, after all, his application of block space is still too monotonous, just putting pictures and NFTs in it does not generate more value. But as an interesting attempt, such a circle-breaking innovation can also arouse everyone's thinking:
How to take advantage of Bitcoin programmability? After all, there will be no stronger consensus and security than Bitcoin in today's public chain.
It’s all about the use of storage space. In fact, the financial transactions output by the Ordinals protocol in OP-Ruturn are essentially no different from other things stored by the full node, but does Bitcoin only serve high-net-worth transactions? Is it free to use the block space to store and execute some low-cost data?
This also reminds me of what Vitalik once said on behalf of the representative: "When you use technology reasonably and pay the corresponding expenses, then your behavior is legal."
appendix
https://docs.ordinals.com/introduction.html
https://github.com/casey/ord/blob/master/bip.mediawiki#specification
https://docs.lightning.engineering/the-lightning-network/taproot-assets/taproot-assets-protocol
https://learnblockchain.cn/article/3050
https://www.wu-talk.com/index.php?m=content&c=index&a=show&catid=6&id=13659
https://learnblockchain.cn/article/5376
Disclaimer: As a blockchain information platform, the articles published on this site only represent the personal views of the authors and guests, and have nothing to do with Web3Caff's position. The content of this article is for information sharing only, and does not constitute any investment advice or offer, and please abide by the relevant laws and regulations of your country or region.





