On February 1, Binance Web3 Wallet officially launched the inscription market, supporting multiple inscription protocols such as BRC-20 and EVM. A few days ago, OKX also announced its support for inscription protocols such as ARC-20, Runes, Doginals, etc., which triggered the entire market's attention to inscriptions. In this context,due to the complexity and novelty of the inscription protocol, various security issues frequently arise. This not only threatens users’ asset security, but also has a negative impact on the healthy development of the entire Inscription ecosystem.
In response to this, the Beosin security team has sorted out the mainstream inscription protocols to help users understand the purpose and implementation of the inscription protocols and how to protect inscription assets. .
Inscription Introduction
On the blockchain The so-called inscription is to record some specific and meaningful information on the blockchain through certain characteristics of the blockchain. Once this information is recorded on the blockchain, it will be permanently stored on the blockchain and difficult to tamper with. The information recorded to the blockchain can be of many types. For example, simple text information, complex codes, images, etc. can all be written to the blockchain. In this way, we can use a set of standards to implement the functions of digital assets.
Current status of inscriptions
From the initial BRC-20 and other bits With the emergence of Inscription on the coin public chain, an endless stream of new Inscription protocols and new projects are emerging in the Inscription ecology almost every day. The development of Inscription can be said to be advancing by leaps and bounds. Various common public chains have also joined the inscription ecosystem, such as the Ethscription protocol on the ETH public chain, the ARC-20 protocol on the BTC public chain, BSC-20 and other protocols on the BSC public chain, and the PRC- on the Polygon public chain. 20 etc agreement…. These protocols are all generated for the purpose of publishing inscriptions on their public chains. In the following content, we will introduce the implementation methods and use cases of various protocols.
Detailed explanation of inscriptions
Let’s introduce the current market concerns For protocols with higher degree of success, let’s compare the commonalities and differences between the inscription protocols of various public chains.
1. BRC-20
Make clear the BRC -20, first we need to introduce UTXO and Ordinals.
BTC uses the UTXO model, and transactions are transferred in UTXO units. UTXO is the abbreviation of Unspent Transaction Output, which means unspent transaction output. TheUTXO model is different from the account model of public chains such as Ethereum in that it records transaction events but not the final status. To calculate how many Bitcoins a user has, you need to sum up all the UTXOs of his address, and the result is the number of coins held by the user.
Ordinals is a system protocol for numbering satoshis (sats), the smallest unit of Bitcoin. It canbe used for each UTXO (including several Each satoshi is assigned a unique number. Ordinals also supports the function of writing text, pictures, audio, video, etc. to satoshis, making each satoshi unique, similar to the familiar Ethereum non-fungible token NFT, and we will It's called Bitcoin NFT.
The founder of BRC-20 came up with another set of concepts based on the Ordinals protocol. Since the Ordinals protocol can create Bitcoin NFTs by giving each Satoshi different "attributes", it can also create Bitcoin FTs by giving a unified "format" and "attributes", that is, homogeneous tokens. .
BRC-20 writes unified JSON format text data into Satoshi through the Ordinals protocol. This text data is the BRC-20 token. Accounting book, based on this text data, token holdings and transfers can be parsed. Mainly includes the following content:
The above are the three standards of BRC-20. Among them, the op field represents the operations that need to be performed, including deploy ( Deployment), mint (minting) and transfer (transfer), tick represents the name of the token that needs to be operated, max represents the total amount of tokens issued, lim represents the maximum number of coins minted per token, and amt represents the token that needs to be operated. Quantity, in the transfer standard, there are also fields such as "to", but this is not necessary. Transfer achieves balance changes by sending the inscription to the target address, as shown in the following figure:
link: https: //twitter.com/blockpunk2077/status/1725513817982136617
2. ARC-20
ARC-20 is still the inscription protocol on the Bitcoin public chain. Like the BRC-20 protocol, it is implemented by writing standard data in UTXO, but the difference isARC- The 20 protocol does not need to specify the number of ARC-20 tokens in the data. Instead, it uses sats (satoshi, the smallest unit of Bitcoin) in the UTXO to represent the number of ARC-20 tokens. The rule is 1 sat=1 ARC-20 token.
The ARC-20 protocol, like the BRC-20 protocol, is also divided into three steps: deployment, casting, and transfer. In the deployment phase, you need to Fill in the UTXO with the standard token name, total amount of tokens, casting restrictions, block information, image information, etc.; in the casting stage, the user needs to fill in the name of the token into the UTXO, and the number of sats of the UTXO is The minting quantity of ARC-20 tokens is not filled in UTXO together with the token name; when the user mints ARC-20 tokens, they can send the tokens to other addresses. When sending tokens, Users do not need to fill in any data into the UTXO, but directly transfer the UTXO holding the token to other addresses.
link: https://twitter.com/blockpunk2077/status/1725513817982136617
When querying ARC-20 tokens, only one index is needed, The offline index server can read the token registration information and minting and transfer transactions. There is no need for the server to calculate the fund transfer relationship, query the number of ARC-20 tokens owned by the address, and directly read the UTXO holding the token. The number of sats can be obtained.
After understanding BRC-20 and ARC-20, everyone should know why some people mistakenly transfer inscription assets to other addresses or "burn" them.
Since BTC inscription protocols such as BRC-20 and ARC-20 are based on UTXO transactions, inscription transactions are actually appended to BTC transactions. Yes, users may perform ordinary BTC transfer operations without fully understanding Inscription, merge and split their current UTXO with other UTXOs, and then send them to unexpected addresses, resulting in the Inscription assets being transferred by mistake or being "Burn", causing irreversible damage.
3. Ethscription
Ethscription is A protocol for creating and sharing data on Ethereum. Some inscriptions use this protocol to replace smart contracts to implement token issuance. Using inscriptions can reduce user costs to extremely low levels.
Ethereum provides a calldata data block when sending a transaction. Under normal circumstances, this data block will be left blank for ordinary ETH transfers. If a smart contract is called , the data block will be specified as the signature of the calling function and individual parameter data. The Ethscription protocol uses the calldata data block to add some standard data to give relevant meaning when sending ordinary ETH transfers.
How does Ethscription specify these standard data?
First, if you want to create an Ethscription whose content is image data, you need to convert the image (image size is limited to 96KB) into a URI of Base64-encoded data, format is (data:image/png;base64,...); then convert the URI into a hexadecimal string; send an ordinary transfer transaction to the target address through Ethereum, and convert the above hexadecimal string Fill in calldata, as shown below:
In this way, the 0xf1bf address owns the Ethscription, and the Ethscription with the same calldata created later will be considered invalid.
If you want to transfer the Ethscription, the Ethscription owner needs to send an ordinary transfer to the receiving address, and fill in the transaction that created the Ethscription in the calldata. If so, the receiving address will own the Ethscription, as shown below:
4. Inscription of EVM blockchain
For EVM blockchains such as BSC Chain, Ethereum, and polygon have a common inscription burning method, which is to use calldata data blocks to store fixed format data. This method is different from the above-mentioned saving of image data. Writes text data in a standard format to calldata.
Burn inscriptions on the BSC Chain. The inscription format is similar to the BRC20 inscription format. For example, the inscription format is: data:,{"p":"_", "op":"_","tick":"_","amt":"_"}, then the p field represents the protocol name, such as bsc-20, bnbs-20, ltc-20, bep -20, drc-20, nrc-20, src-20, etc.; the op field represents the operation, usually "mint"; the tick field represents the token name; the amt field represents the number of tokens .
Using bnbs tokens as an example here, we can see that as long as an ordinary transfer is sent to the target address, data is filled in calldata:,{ "p":"bsc-20","op":"mint","tick":"bnbs","amt":"1000"} completes the bnbs token minting operation, as shown below. At this time, the 0x22ef address has 1,000 bnbs tokens.
Next, you need to transfer the token. As above, you need to send an ordinary transfer to the receiving address, and fill in the transaction hash that created the bnbs token into the calldata. Then the receiving address will own the bnbs token, as follows Picture:
Ethereum, polygon and other chains are basically the same,but it should be noted that the content of the above BSC Chain is not the only case of creating inscriptions on the evm chain. Fill in the inscriptions between different evm chains or different protocols. There may be differences in the text data fields, and there may also be differences in the way tokens are transferred. But for this type of method, they are all implemented using the calldata attribute in the EVM chain, so they appear to be similar.
Summary
In this article we discussed many The inscription on the chain implements the principle. In summary, the inscriptions introduced are all processes that use some public chain system features to save offline information in the blockchain in accordance with prescribed standards, and then identify and display it through offline servers. None of the inscriptions introduced use smart contracts. Users can reduce a large amount of additional transaction costs when participating. However, users need to fully understand the implementation of the inscription protocol to avoid mistaken transfers or accidental burning of inscriptions, resulting in asset losses.