What is Cy[bord] CBRC-20?

Experimentation mode

Convention Proposition. Read every word if you decide to test. This will be worthless. Play at your own risk 😃

Introduction

Cy[bord] CBRC-20 is the proposal of an efficient Metaprotocol standard for fungible tokens on Bitcoin through Ordinals. By utilizing the new metadata and metaprotocol fields introduced in ord 0.10+, which allow for arbitrary properties to be stored directly within the Inscription envelope, CBRC-20 keeps the same functional logic of the BRC-20 Metaprotocol while reducing the cost of each inscription and simplifying the indexing process.


Overview of CBRC-20 Features

  • Reduced Inscription Costs: CBRC-20 lowers the cost per inscription for token deploy, mint, and transfer operations compared to BRC-20/TAP.
  • Simplified Indexing: CBRC-20 provides a simple way to index the CBRC-20 Metaprotocol state due to all information being directly available in the envelope of each Inscription.
  • Flexibility with MIME Types: The CBRC-20 standard allows for any MIME type to be used for deploying, minting, or transferring CBRC-20 tokens.
    • Examples:
      • Deploying, minting, or transferring any CBRC-20 token can be done by simply inscribing the number "0" as a text file, reducing the inscription cost by 10 times compared to other Metaprotocol Ordinal Token Standards.
      • Deploying a CBRC-20 token and allowing users to "mint" as part of a PFP collection, with a specific number of tokens minted on each image. These tokens can then be transferred like any other CBRC-20 token (on a new transfer inscription), without sending the image the tokens were minted on.
      • The potential applications are endless and unexplored!
  • No Limitations of Ord 0.9: Unlike previous standards, CBRC-20 is not constrained by the "freeze" of Ordinals version 0.9 and can utilize the latest features of the ord client.

Before we cover the CBRC-20 Metaprotocol Convention, let’s first take a moment to understand what a metaprotocol is.

WTF is a Metaprotocol?

Quick History of Metaprotocols

"Metaprotocol" is a term used by the Ordinals Community to describe an interactable "protocol" formalized through off-chain indexing of on-chain information, like BRC-20, SNS, Bitmap, etc. Until recently, an "Ordinal metaprotocol" was a conceptual term not officially recognized in the Ordinal client. This changed with ord v0.10open in new window, when the Ord Team introduced fields for writing metaprotocol and metadata information directly in the inscription envelopes. This update allows for the official flagging of Metaprotocols on Ordinals.

The Current Metaprotocol Situation

For Ordinal Metaprotocol token standards, the journey has been complex. To address issues arising post-ord v0.9, all BRC-20 indexers have decided to "freeze" on ord v0.9 for BRC-20 indexing. This means that BRC-20 cannot leverage the "metaprotocol" or "metadata" fields introduced in the latest versions of ord 0.10+, hindering the BRC-20 Metaprotocol's ability to upgrade and become more efficient. As a result, the future of BRC-20 Indexing is stuck in a state of uncertainty, despite market perceptions.

CBRC-20, on the other hand, fully utilizes both the "metaprotocol" and "metadata" field features for token data, leading to significant savings in inscription fees and blockspace. This efficiency is achieved as there are no JSON files inscribed on Bitcoin for CBRC-20, positioning it as the first "real" Ordinals Metaprotocol token standard (according to the latest rules and version of the ord client).

Now let’s get into what CBRC-20 looks like!

CBRC-20 Deep Dive

The Ordinal Envelope

The Ordinal Envelope is a fundamental component of the Ordinals protocol, enabling the unique capability to embed data on individual satoshis within the Bitcoin blockchain. It plays a vital role in creating distinctive digital assets directly on Bitcoin.

Let's take an example of an Ordinal Envelope containing the message "Hello, world!" to understand its structure and function:

OP_FALSE
OP_IF
  OP_PUSH "ord"
  OP_PUSH 1
  OP_PUSH "text/plain;charset=utf-8"
  OP_PUSH 0
  OP_PUSH "Hello, world!"
OP_ENDIF
  • Header (OP_FALSE OP_IF … OP_ENDIF): Acts as a foundational structure for the envelope. It sets up the conditional execution framework, although it primarily serves as a non-operational or 'no-op' component.

  • Identifier (OP_PUSH "ord"): What we call the "magic code," this identifier is crucial for distinguishing Ordinal inscriptions (or other protocols) from other data on the blockchain.

  • Content Specification (OP_PUSH "text/plain;charset=utf-8" and OP_PUSH "Hello, world!"): These lines define the MIME type of the content (in this case, plain text with UTF-8 charset) and the actual content to be inscribed.

Inscribing Metadata with CBOR

To push the Ordinal community in a good direction, the developers of the Ordinals protocol, in version 0.10+, have integrated CBOR as a key component. This integration permits metadata to be inscribed in Ordinal Envelopes using the CBOR format, which is very efficient as CBOR data is 60%-70% smaller in byte size than equivalent data in JSON format.

This inclusion of the metaprotocol field and the usage of CBOR for storing metadata in the Ordinal envelope also significantly enhances data handling efficiency for Indexers. These choices allow for more compact and rapid processing of token-related data. As a result, the Ordinal envelope becomes not just a container, but a robust tool for sophisticated data interactions within the Bitcoin blockchain.

These advancements in the Ordinal envelope pave the way for more dynamic and versatile usecases. Developers can now leverage these improvements to create more nuanced and efficient token-based solutions, further expanding the capabilities of the Bitcoin network. You can read more about CBOR and metadata hereopen in new window.

Definition of a Metaprotocol

In the world of CBRC-20, metaprotocol is a property defined in the ordinal framework (specifically in ord v0.10+), and serves as a field that can carry a "metaprotocol" or "community convention", as well as its metaprotocol operational codes. CBRC-20 is the first proposed standard to utilize this field and definition of metaprotocol properly.

The CBRC-20 Metaprotocol Convention

We use the metaprotocol field in line with the Uniform Resource Name standardopen in new window, adhering to this syntax:

<metaprotocol>:[op]:[tick]=[amt] 

The CBRC-20 Metaprotocol Syntax

  • The parameter [metaprotocol] refers to the well-known metaprotocol to which the current protocol instruction applies.
  • The parameter [tick] can be the term targeted by the predicate operation and [amt] can be the value to be associated with the predicate (in CBRC-20's case, [tick]).

For example, a CBRC-20 mint inscription metaprotocol field would look like this:

cbrc-20:mint:BORD=1000

And a CBRC-20 transfer inscription metaprotocol field would look like this:

cbrc-20:transfer:BORD=500

The CBRC-20 Metaprotocol Logic

The CBRC-20 metaprotocol rules follow directly with BRC-20, meaning CBRC-20 tokens adhere to the exact same rules as the BRC-20 token standard (such as the First is First principle, 4-character names, default decimal of 18, etc, you can read the existing BRC-20 ruleset outlined hereopen in new window)

However, for CBRC-20 mint and transfer inscriptions, there's no need to include the "p", "op", "tick" or "amt" characters whatsoever, as they are specified directly in the Ordinal Evelope. There is no metadata required for mint or transfer inscriptions as we are simply signaling operational actions of an existing token, thus lowering the cost of CBRC-20 mint/transfer inscriptions compared to BRC-20/TAP. Metadata is only required for deploy inscriptions.

Definition of Metadata

Newly defined in the official ord client (ord >0.10), metadata is a field designated for carrying arbitrary information directly within an Ordinal Inscription envelope in the form of a CBOR file. You can read about metadata in ordinal envelopes hereopen in new window.

In CBRC-20 the only time metadata is required is when deploying a new CBRC-20 token. We will now go over some examples of what deploying, minting, and transferring CBRC-20 tokens looks like!

HOW TO PLAY WITH CBRC-20

Read from here if you just want to play!

How to Play [EZ Mode]

If you want to play with CBRC-20 right now but don't have access to an ord 0.10+ client, we've got you covered 😄

You can use the CBRC-20 EZ Crafter we made so everyone can instantly PLAY!

The CBRC-20 EZ Crafter allows for the inscribing of CBRC-20 deploy, mint, and transfer inscription directly in your browser with 0% fees (feel free to donate if you enjoy playing ❤️)

How to Play [Hard Mode]

If you DO have an ord 0.10+ client running locally and want to inscribe in local, here's how CBRC-20 works!

How to Deploy a CBRC-20

Deploying a CBRC-20 token is a straightforward process:

  1. Create a JSON File: Let's say you're creating a "Cy[bord]" token with the ticker "BORD". Because you want to deploy a new CBRC-20, you MUST inscribe your token "metadata" in the CBOR format. To do this, you must first create a JSON file like this:
{
    "tick": "BORD",
    "max": "21000000",
    "lim": "1000",
    "dec": "8"
}
  1. Convert to CBOR File:

After saving your JSON file, use the Cy[bord] JSON to CBOR converter to create your .cbor file.

  1. Inscribe Your Token:

You can inscribe the BORD token using this command:

ord wallet inscribe  --fee-rate FEE_RATE  --metaprotocol=cbrc-20:deploy --cbor-metadata ./deployBORD.cbor --file <literallyanyfile>

How to Mint a CBRC-20

Minting a CBRC-20 token is very easy.

  1. Choose Your File to Inscribe

Choose any file you want to inscribe (cheapest option is a txt file containing only the number 0).

  1. Inscribe Your Mint Operation:

Execute the minting process with the following command:

ord wallet inscribe --fee-rate FEE_RATE --metaprotocol=cbrc-20:mint:BORD=1000 --file <yourchosenfile>

This command will mint the specified amount of "BORD" tokens.

How to Make a CBRC-20 Transfer Inscription

  1. Choose Your File to Inscribe

Choose any file you want to inscribe (cheapest option is a txt file containing only the number 0).

  1. Inscribe Your Transfer Operation:

Use the following command to inscribe the transfer of your "BORD" tokens:

ord wallet inscribe --fee-rate FEE_RATE --metaprotocol=cbrc-20:transfer:BORD=500 --file <yourchosenfile>

This command will create a CBRC-20 transfer inscription which can then be sent to a Bitcoin address as a one-time use "ticket" to signify an ownership change of CBRC-20 tokens, exactly the same as the BRC-20 transfer inscription logic.

A band of cybords

BRC-20 vs CBRC-20

Summarized from this document, here are some of the key of advantages of CBRC-20 over BRC-20

  1. Reduced Inscription Costs:

    • CBRC-20 significantly lowers the cost per inscription for token operations (deploy, mint, transfer) compared to BRC-20.
    • This cost efficiency is primarily due to CBRC-20's ability to embed information directly in the Inscription envelope, eliminating the need for inscribing lengthy text or JSON files.
  2. A Simplified Indexing Process:

    • With all token information directly available in the Inscription envelope, CBRC-20 simplifies the indexing process for token state management.
    • This streamlined format is more straightforward for Indexers to handle, enhancing the overall efficiency of the system.
  3. Support for All MIME Types:

    • CBRC-20 allows for the use of any MIME type in the deployment, minting, or transferring of tokens.
    • This flexibility opens up creative possibilities for token utilization and innovation within the Ordinals framework.
  4. No Limitations of Ordinal Client:

    • Unlike BRC-20, which is limited to the capabilities of Ordinals version 0.9, CBRC-20 leverages the latest features introduced in Ordinals version 0.10 and beyond.
    • This includes the utilization of metadata and metaprotocol fields, allowing for more advanced and efficient token standard development.
  5. Innovative Token Interaction Possibilities:

    • CBRC-20's approach enables unique token interactions, such as minting tokens on images for PFP collections or deploying tokens using simple numerical inscriptions.
    • This opens the doors to new types of practical applications and versatility of token standards on the Bitcoin blockchain.

Ending Thoughts from CyBORg

Here you have it folks, the Cy[bord] CBRC-20 convention. A proposed alternative to BRC-20 standard that follows the exact same logic but in a more efficient/cheaper way thanks to ord 0.10+. The realization of “what could have been” for BRC-20 if Indexers did not decide to freeze to ord v0.9.

This is purely an experiment and should not be treated as an investment.

Let’s keep on finding new ways to play together 😃

Glossary

BRC-20: A token standard for creating and managing fungible tokens on the Bitcoin blockchain, utilizing the Ordinals protocol for data inscription.

CBOR (Concise Binary Object Representation): A binary data serialization format that offers compact size and efficient data processing, used in the context of blockchain for efficient data storage and transmission. Similar to JSON, but more efficient.

Cy[bord] / CBRC-20: A proposed metaprotocol standard for creating and managing fungible tokens on Bitcoin, leveraging the Ordinals protocol. It aims to be more efficient and cost-effective than the traditional BRC-20 standard by using the new metadata and metaprotocol fields.

Metaprotocol (Term): A concept used to describe a protocol within a protocol, often referring to a set of standards or rules established on top of an existing blockchain protocol, like Ordinals.

Metaprotocol (Field): A specific field within the Ordinal envelope used to identify and distinguish different protocols or conventions within the blockchain, utilized in the CBRC-20 standard.

Metadata (Field): A field within the Ordinal envelope that carries arbitrary information, such as a token's deploy-related details, in a CBOR file format. This field plays a significant role in the CBRC-20 standard for storing token data efficiently.

MIME Type: A standard that indicates the nature and format of a document, file, or an assortment of bytes. It stands for Multipurpose Internet Mail Extensions and is used in CBRC-20 for flexibility in token operations.

Ordinal Envelope: A data structure within the Ordinals protocol, featuring extendable properties for storing and managing data related to Ordinal Inscriptions.

Ordinal Inscription: A feature of the Ordinals protocol allowing for the embedding of arbitrary data directly into Bitcoin transactions.

Uniform Resource Name Standard (URN): A protocol for assigning a unique and persistent name to resources. In the context of CBRC-20, it's used in the metaprotocol field to adhere to specific naming conventions for protocol instructions.

References

  1. Ordinals v0.10 Release: Detailed release notes of Ordinals version 0.10, which introduced the metaprotocol and metadata fields, are available hereopen in new window.

  2. Uniform Resource Name (URN) Standards: Learn more about the URN standards, crucial for the metaprotocol field syntax in CBRC-20, at RFC 2141open in new window.

  3. BRC-20 Token Standard Documentation: For insights into the BRC-20 token standard and its operational rules, visit the Layer 1 documentationopen in new window.

  4. Ordinals Inscriptions Metadata: A guide to understanding the metadata field in ordinal envelopes can be found hereopen in new window.

Last Updated:
Contributors: Junkfoodpunkroot