Cregis Research: Interpreting the Past and Present of BRC-20

Cregis
2023-05-22 21:16:52
Collection
The recent popularity of BRC-20 is due to its status as a token standard based on Bitcoin, bringing NFTs and other tokens into the Bitcoin ecosystem.

Author: Cregis Research

# 1. Background and Development of BRC-20

With the rapid development of blockchain technology, various cryptocurrencies and token protocols have emerged. As Ethereum's ERC-20 token protocol became the industry standard, the Bitcoin community also welcomed the experimental BRC-20 token standard. The BRC-20 standard adopts a simple and secure design concept, enabling the deployment, minting, and transfer of tokens. BRC-20 is based on the Bitcoin network and achieves token issuance and management by recording data on satoshis. This article will introduce the principles, applications, advantages, and disadvantages of BRC-20, aiming to provide readers with a comprehensive understanding.

For a long time, people believed that the Bitcoin ecosystem lacked scalability compared to Ethereum, as almost no data could be stored on the blockchain except for transfer transactions. The recent popularity of BRC-20 is due to its being a Bitcoin-based token standard that introduces NFTs and other tokens into the Bitcoin ecosystem.

Important Milestones:

In January 2020, Bitcoin core developer Pieter Wuille released BIP 341 and BIP 342 Bitcoin Improvement Proposals, bringing possibilities to the Bitcoin ecosystem.

In June 2022, Casey Rodarmor technically extended and expanded Tapscript in BIP 342 and proposed new Bitcoin improvement proposals, ordinal and inscription, mainly achieving the function of storing data on the Bitcoin chain.

In March 2023, Domodata conducted ERC-20 experiments, using the Ordinal protocol and inscriptions feature to store JSON data on the Bitcoin chain, proving off-chain token balance states, thus indirectly achieving the function of issuing tokens to the Bitcoin ecosystem.

Domodata (the author of BRC-20) believes that the BRC-20 standard is merely an interesting experiment that shows us how to prove off-chain token balance states by creating on-chain inscriptions. He feels this is just an attempt, and the BRC-20 standard should not be considered the only standard, while encouraging the Bitcoin community to work together to fix and optimize the standard. The author of BRC-20 also believes that there are currently better solutions for issuing assets on Bitcoin.

# 2. Prerequisite Knowledge of BRC-20

BRC-20 is a token standard based on the Ordinal protocol. The Ordinal protocol is an extension protocol for the Bitcoin network that allows data to be inscribed on Bitcoin satoshis. Based on the Ordinal protocol, BRC-20 can achieve token issuance, transfer, and trading.

The principles of BRC-20 are relatively complex and require an understanding of some concepts on the Bitcoin network, such as satoshis, Ordinal, Inscription, and Taproot upgrade. Among them, satoshis are the smallest unit of the Bitcoin network, the Ordinal theory assigns a number to each satoshi, Inscription is the process of inscribing data on each satoshi, and the technology related to the Taproot upgrade controls these inscriptions. These concepts together form the operational logic of the BRC-20 standard.

(1) Satoshis

Satoshis are not Bitcoin but the smallest unit of Bitcoin, where 1 Bitcoin can be divided into 100 million satoshis.

(2) Ordinal

Ordinal theory is a protocol used to assign serial numbers to satoshis (the smallest subdivisions of Bitcoin) and track these satoshis during transaction spending. These serial numbers are large numbers, such as 804766073970493. Each satoshi, which is ¹⁄₁₀₀₀₀₀₀₀₀ of a Bitcoin, has a serial number.

Ord is an open-source project (https://github.com/casey/ord). This project includes several parts: one is the ordinal proposal for Bitcoin improvement, and the other is the ord tool developed in Rust, which integrates indexing, block explorer, and command-line wallet functionalities. We will later explain how to inscribe your own inscriptions using the ord toolkit.

(3) Inscription

The Ordinal protocol achieves extended functionality by assigning a unique number to each satoshi and adding annotations. This process is called inscription, which gives derived meaning to satoshis. The annotations, which are the content of the inscriptions, are written into the transaction witnesses, allowing satoshis to inscribe any type of content. The size limit for inscription content is kept below 3.9 MB for safety, as the content is included in the transaction, meaning larger content incurs higher transaction fees.

We can create our own inscriptions by downloading Bitcoin Core and ord.

Install ord

curl --proto '=https' --tls v1.2 -fsLS https://ordinals.com/install.sh | bash -s

Print ord version number

ord --version

Create Bitcoin Core wallet

ord wallet create

Get wallet address

ord wallet receive

View pending transactions

ord wallet transactions

Create Inscriptions

ord wallet inscribe --fee-rate FEE_RATE FILE

Send inscription

ord wallet send --fee-rate <FEE_RATE> <ADDRESS> <INSCRIPTION_ID>

(4) BIP 341 and BIP 342

BIP 341 and BIP 342 are two proposals related to Bitcoin improvements. BIP stands for Bitcoin Improvement Proposal, which describes new features, processes, or specifications for the Bitcoin protocol, clients, or environment. BIP 341 and BIP 342 are related to the Taproot upgrade, primarily aimed at improving Bitcoin's privacy and scalability, rather than directly writing data to the blockchain. However, the Taproot upgrade can use Bitcoin scripts and write data to the blockchain at a low cost through transactions, laying the technical groundwork for the BRC-20 standard.

  • BIP 341: Segregated Witness (SegWit) output, this proposal defines a new output type that implements Taproot functionality. This allows transactions supporting Taproot to coexist with other types of transactions in a block while maintaining backward compatibility. BIP 341 provides detailed descriptions and specifications for the new output type.
  • BIP 342: Tapscript, this proposal describes the scripting language inside Taproot, called Tapscript. Tapscript is based on Bitcoin's existing scripting language and has been extended and optimized. BIP 342 defines the syntax, runtime environment, and execution rules of Tapscript. These improvements make executing complex smart contracts on the Bitcoin network more efficient and private.

Typically, we can use the OPRETURN opcode to attach a small piece of data (up to 80 bytes) to a transaction output, thus permanently writing data to the Bitcoin blockchain. If we need to store more data, we must use data segmentation, creating multiple transactions containing OPRETURN to write a piece of data to each small block, which significantly increases transaction costs.

When BIP 341 and 342 emerged, we could use P2WSH (Pay-to-Witness-Script-Hash). P2WSH is part of Segregated Witness, allowing you to create a Bitcoin address that represents the hash of the Witness-Script. To spend funds from this address, inputs must meet the unlocking conditions of that script. The specific process is as follows:

  1. Create a witness script containing the data you want to store. You can use the OP_PUSHDATA opcode to embed the data in the script.
  2. Calculate the hash of the witness script (SHA-256).
  3. Use the hash to create a P2WSH address.
  4. Create a Bitcoin transaction to send funds to the P2WSH address.
  5. Broadcast the transaction to the Bitcoin network.

When we conduct transactions, we separate the unlocking script from the transaction body and store it in the witness data. Through this technology, we can store up to 4 MB of arbitrary data in the witness section of any Bitcoin block. This sets the upper limit for any Bitcoin inscriptions to 4 MB.

# 3. Technical Principles of BRC-20

Based on ordinal inscriptions, the BRC-20 standard utilizes satoshis to store and manage various information about tokens, such as token name, symbol, total supply, etc., encoding this information in JSON format and writing it into satoshis, forming individual inscriptions. Finally, by aggregating the activities of all inscriptions, the balance state of BRC-20 tokens can be found, thus achieving token deployment, minting, and transfer.

BRC-20 is an experimental token standard based on Bitcoin, with the core idea of creating, minting, and transferring BRC-20 tokens through ordinal theory to achieve asset management on the Bitcoin blockchain. This experiment mainly includes the following aspects:

Deployment: To create a BRC-20 token, parameters such as token symbol, maximum supply, and minting limit need to be set. The deployment process is only for initializing BRC-20 and does not affect the state.

{
  "p": "brc-20",
  "op": "deploy",
  "tick": "ordi",
  "max": "21000000",
  "lim": "1000"
}

Notes

"p": "brc-20": Specifies the protocol as BRC-20, helping other systems identify and process BRC-20 events.

"op": "deploy": Specifies the operation type as deployment.

"tick": "ordi": Specifies the 4-letter identifier for the token, using "ordi" as an example in this document, which has reached its maximum supply.

"max": "21000000": Sets the maximum supply of the token to 21,000,000.

"lim": "1000": Sets the minting limit per ordinal to 1000.

Minting: Use the minting function to mint a certain number of BRC-20 tokens. The minting operation provides the corresponding balance to the initial owner of the minting function. If the token has a minting limit, ensure it is not exceeded.

{
  "p": "brc-20",
  "op": "mint",
  "tick": "ordi",
  "amt": "1000"
}

Notes

"p": "brc-20": Specifies the protocol as BRC-20, helping other systems identify and process BRC-20 events.

"op": "mint": Specifies the operation type as minting.

"tick": "ordi": Specifies the 4-letter identifier for the token, using "ordi" as an example.

"amt": "1000": Sets the number of tokens to be minted to 1000.

Transfer: Use the transfer function to transfer a certain number of BRC-20 tokens. The transfer operation deducts tokens from the sender's balance and adds them to the receiver's balance. The transfer function only takes effect on the first transfer.

{
  "p": "brc-20",
  "op": "transfer",
  "tick": "ordi",
  "amt": "100"
}

Notes

"p": "brc-20": Specifies the protocol as BRC-20, helping other systems identify and process BRC-20 events.

"op": "transfer": Specifies the operation type as transfer.

"tick": "ordi": Specifies the 4-letter identifier for the token, using "ordi" as an example.

"amt": "100": Sets the number of tokens to be transferred to 100.

State Tracking: By creating on-chain inscriptions and storing JSON data that conforms to the BRC-20 standard, we can prove the state of off-chain token deployment, minting, and transfer. By aggregating the activities of all on-chain inscriptions, we can find the balance state of BRC-20 tokens.

# 4. Applications and Operations of BRC-20

(1) How to Create a BRC-20 Wallet

  1. Download and create a wallet: ordinalswallet.com
  2. Click on your wallet profile.
  3. Click "Receive."
  4. Copy the wallet address.
  5. Go to any exchange that supports Taproot and withdraw some BTC to this address (e.g., Binance, Bybit).

(2) How to Buy BRC-20 Tokens

  1. Click the BRC-20 tab and select any token from the list (e.g., $PEPE).
  2. Now check the token quantity and price per token. Click "Buy Now."
  3. Confirm your password.
  4. Click "Buy Now" and confirm the transaction.

(3) How to Mint Your Own BRC-20 Tokens

  1. Go to the "Inscription" section.
  2. Select "BRC-20," enter the token abbreviation (4 letters) and quantity, then click "Submit."
  3. Choose the network fee and click "Inscribe."

(4) How to Mint Other Tokens for Free

  1. Go to the BRC-20 list and check the progress bar under each token supply (if the progress bar is not 100%, you can mint that token).
  2. Click the token >> Check details >> Mint.
  3. Set the fee >> Inscribe.
  4. Confirm the transaction.

# 5. Risks of BRC-20

(1) Deviation from Decentralization Principles

The issuance and usage mechanism of BRC-20 tokens leads to a certain degree of centralization. This is because BRC-20 tokens rely on specific platforms and exchanges for issuance, trading, and management, which often hold more resources and power. This contradicts the core spirit of Bitcoin's decentralization, as Bitcoin aims to achieve a decentralized, fair, and open monetary system.

(2) Lack of Fairness and Security

The first-come, first-served mechanism of BRC-20 token inscriptions may lead to unfairness. This is because, on the Bitcoin network, miners can choose which transactions they want to process, and the first-come, first-served mechanism for BRC-20 token inscriptions makes miners more inclined to process transactions that pay higher fees, ignoring others. This may exclude some users who cannot afford high transaction fees. Additionally, the security of BRC-20 tokens is not as robust as that of the Bitcoin network itself, as it relies on second-layer technologies above the Bitcoin network, which may have security vulnerabilities and risks.

(3) Risks

BRC-20 tokens may trigger MEV strategy attacks known as time-bandit attacks. This is because transactions and applications of BRC-20 tokens on the Bitcoin network may give miners opportunities to exploit MEV (Miner Extractable Value) strategies by manipulating transaction order for profit. This negatively impacts the overall security and reliability of the network. Furthermore, BRC-20 tokens may also raise regulatory risks against Bitcoin. This is because the issuance and trading of BRC-20 tokens may involve illegal activities such as money laundering and financial fraud, leading governments and regulatory agencies to worry about the entire Bitcoin network and take measures to suppress it.

# 6. Investment Advice on BRC-20

Although the BRC-20 protocol is currently in the experimental stage, it provides a new way of token implementation for the Bitcoin community. The emergence of the BRC-20 protocol helps promote innovation in the Bitcoin ecosystem and attract more developers and users to join the Bitcoin community. In the future, as the Bitcoin community optimizes and improves the BRC-20 protocol, it will play a greater role in the cryptocurrency field.

Currently, there are some challenges. First, compared to Ethereum's ERC-20, BRC-20 cannot interact with smart contracts and cannot execute automated operations, such as automatic transfers or dividends. This limits the application potential of BRC-20 in certain scenarios. Its application in decentralized finance (DeFi) and other scenarios may be restricted. Additionally, since the BRC-20 protocol is still in the experimental stage, its scalability and compatibility require further exploration.

As an experiment based on the Ordinal protocol, BRC-20 is essentially an application experiment of the Ordinal protocol, providing us with new ideas. Investors should have a long-term perspective when making investments. In the future, there may be more optimizations and innovations based on the Ordinal protocol, and investors should pay attention to these trends to make more informed investment decisions.

# About Cregis Research

Cregis is an asset management collaboration platform in the web 3.0 era, providing users with MPC wallets and enterprise-level financial SaaS tools, and has been operating securely for 6 years.

Cregis Research is its knowledge-sharing platform, aiming to provide web 3.0 enthusiasts with zero fluff, zero misleading information, and zero commercial bias content about blockchain and cryptographic underlying technologies.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators