← Back to list

FAIR CAT-20: A Fair Experimental Bitcoin Token Standard Leveraging OP_CAT & Ordinal Consensus

Welcome to the official documentation for CAT-20, an innovative and experimental metaprotocol standard for fungible tokens on the Bitcoin…

ilertha · 2024-10-21 03:45 · 21 claps · 5.6 min read
#bitcoin #op-cat #cat20 #ordinals-nft #bitcointoken
Open on Medium ↗
Wiki topics: RAG · RAG & Retrieval CRY · Crypto & Web3 🔬 · Science · General

FAIR CAT-20: A Fair Experimental Bitcoin Token Standard Leveraging OP_CAT & Ordinal Consensus

Welcome to the official documentation for CAT-20, an innovative and experimental metaprotocol standard for fungible tokens on the Bitcoin blockchain. This version of CAT-20, created by X user @james980114, predates the newer CAT-20 standard by sCrypt by one month. Inspired by BRC-20 and rooted in Ordinals, this experimental CAT-20 introduces the use of Bitcoin’s OP_CAT opcode to streamline token creation and management.

Note: This CAT-20 is purely experimental and will only be operational on Fractal Mainnet after block 21,000. As such, anyone is free to build an indexer for it, and it operates similarly to BRC-20 in terms of minting, deploying, and transferring tokens via Ordinal inscriptions.

For more information on the newer CAT-20 standard created by sCrypt, you can check out ProtocolCAT. However, this document will focus solely on the experimental CAT-20 designed by bc1plainview, which is based on Ordinals and should feel familiar to users accustomed to BRC-20.

What is CAT-20?

CAT-20 is a cutting-edge token standard specifically designed for Bitcoin, leveraging the powerful capabilities of the OP_CAT opcode to handle token operations more efficiently. With CAT-20, token creation, minting, and transferring are all performed directly within Bitcoin’s script language, minimizing off-chain dependencies and ensuring efficient on-chain operations.

This experimental version of CAT-20 is fully compatible with Bitcoin’s Ordinal system, meaning that deploying, minting, and transferring tokens is as simple as creating Ordinal inscriptions, just like with BRC-20 tokens.

Why CAT-20?

CAT-20 introduces several key advantages over previous standards, such as BRC-20:

  • Efficiency: Using OP_CAT, CAT-20 can concatenate and manage token data directly within Bitcoin’s script, reducing the need for off-chain processing and allowing for more efficient transactions.
  • Flexibility: CAT-20 scripts dynamically build and execute token operations, offering more versatility and control over how tokens are managed.
  • Integration: CAT-20 operates natively on the Bitcoin blockchain while introducing new capabilities through Bitcoin’s scripting language and the OP_CAT opcode.

The Power of OP_CAT in CAT-20

At the heart of CAT-20 is the OP_CAT opcode, a critical tool that allows the concatenation of two values on the Bitcoin stack. This capability is essential for constructing efficient token operations within a single Bitcoin transaction.

How OP_CAT Works:

  1. Pushing Values to the Stack: The script pushes various components of the token operation (e.g., protocol identifier, operation type, ticker, etc.) onto the stack.
  2. Concatenation with OP_CAT: OP_CAT pops the top two items from the stack, concatenates them, and pushes the result back onto the stack. This process is repeated for each element, gradually building the final operation string.
  3. Final Output: The final output is a concatenated string that represents the token operation (e.g., deployment, minting, or transferring), which is then inscribed on the blockchain.

Example: Deploying a CAT-20 Token

Let’s walk through a simple example to demonstrate the power of OP_CAT in a CAT-20 token deployment. In this case, we will deploy a CAT-20 token called CAT with a maximum supply of 210,000,000 tokens, a mint limit of 1 token per inscription, and 8 decimal places.

Deployment Script:

OP_FALSE OP_IF
    OP_PUSH "ord"                  # Ordinal magic code
    OP_PUSH 1                      # Version number
    OP_PUSH "text/plain;charset=utf-8"  # MIME type
    OP_PUSH 0                      # Push 0 to signal start of data
    # Begin CAT-20 deploy operation
    OP_PUSH "cat20:"
    OP_CAT
    OP_PUSH "deploy:"
    OP_CAT
    OP_PUSH "CAT="
    OP_CAT
    OP_PUSH "210000000,"
    OP_CAT
    OP_PUSH "lim=1,"
    OP_CAT
    OP_PUSH "dec=8"
    OP_CAT
    # End of CAT-20 deploy operation
OP_ENDIF

Concatenated Output:

“cat20:deploy:CAT=210000000,lim=1,dec=8” This script showcases the efficiency and simplicity of CAT-20. Each component of the deployment is pushed to the stack and concatenated using OP_CAT, resulting in a fully-formed deployment string that is inscribed on the Bitcoin blockchain.

Experimental Nature of CAT-20

This version of CAT-20 is experimental, and its full functionality will only be available after block 21,000 on the Fractal Mainnet. As an open standard, anyone can create an indexer for CAT-20 tokens, making it a highly flexible and community-driven protocol. Since CAT-20 is based on Ordinals, users familiar with BRC-20 will find the process of minting, deploying, and transferring tokens straightforward and familiar.

Keep in mind that this CAT-20 is purely for experimentation and development purposes. It provides the opportunity for the Bitcoin community to explore new ways of handling fungible tokens on Bitcoin using OP_CAT, while maintaining the simplicity and compatibility of the Ordinals system.

Conclusion

CAT-20 represents a significant step forward in how tokens can be managed on Bitcoin. By incorporating the OP_CAT opcode, CAT-20 simplifies token operations, reduces reliance on off-chain systems, and enhances Bitcoin’s native scripting capabilities. As an experimental protocol, it is open for developers and enthusiasts to test, modify, and build indexers.

In the following sections, we will explore how to deploy, mint, and transfer CAT-20 tokens, as well as the specific rules that govern the CAT-20 metaprotocol. Stay tuned as we delve deeper into the world of CAT-20, where efficiency and innovation meet on the Bitcoin blockchain.

CAT-20 Token Operations: Deploying, Minting, and Transferring

In this section, we’ll walk through the detailed process of deploying, minting, and transferring CAT-20 tokens on the Bitcoin blockchain. Each operation leverages the power of the OP_CAT opcode within the Ordinal Envelope to ensure efficient and streamlined execution. Whether you’re creating a new token or managing an existing one, these instructions will guide you through the steps.

1. Deploying a CAT-20 Token

The deployment process initializes a new CAT-20 token with specific parameters like the ticker, maximum supply, mint limit, and decimal precision. Here’s how to deploy a CAT-20 token:

Script for Deploying a CAT-20 Token:

OP_FALSE OP_IF
    OP_PUSH "ord"                  # Ordinal magic code
    OP_PUSH 1                      # Version number
    OP_PUSH "text/plain;charset=utf-8"  # MIME type
    OP_PUSH 0                      # Push 0 to signal start of data
    # Begin CAT-20 deploy operation
    OP_PUSH "cat20:"
    OP_CAT
    OP_PUSH "deploy:"
    OP_CAT
    OP_PUSH "CAT="
    OP_CAT
    OP_PUSH "210000000,"
    OP_CAT
    OP_PUSH "lim=1,"
    OP_CAT
    OP_PUSH "dec=8"
    OP_CAT
    # End of CAT-20 deploy operation
OP_ENDIF

Final Concatenated String:

“cat20:deploy:CAT=210000000,lim=1,dec=8”

Explanation:

  • “cat20:”: Specifies the protocol and identifies it as a CAT-20 token.
  • “deploy:”: Indicates that this is a deploy operation.
  • “CAT=”: The ticker for the token.
  • “210000000,”: The maximum supply for the token.
  • “lim=1,”: The mint limit per wallet.
  • “dec=8”: The number of decimals for the token.

Once this script is inscribed on the Bitcoin blockchain, it creates a new CAT-20 token with the specified parameters.

2. Minting CAT-20 Tokens

Minting creates new tokens within the limits set during deployment. The first wallet to inscribe a mint operation will receive the specified amount of tokens.

Script for Minting CAT-20 Tokens:

OP_FALSE OP_IF
    OP_PUSH "ord"                  # Ordinal magic code
    OP_PUSH 1                      # Version number
    OP_PUSH "text/plain;charset=utf-8"  # MIME type
    OP_PUSH 0                      # Push 0 to signal start of data
    # Begin CAT-20 mint operation
    OP_PUSH "cat20:"
    OP_CAT
    OP_PUSH "mint:"
    OP_CAT
    OP_PUSH "CAT="
    OP_CAT
    OP_PUSH "1"
    OP_CAT
    # End of CAT-20 mint operation
OP_ENDIF

Final Concatenated String:

“cat20:mint:CAT=1”

Explanation:

  • “mint:”: Indicates that this is a mint operation.
  • “CAT=”: The ticker for the token.
  • “1”: The number of tokens to be minted.

This script mints 1 CAT token to the wallet that inscribes this operation. The minting process respects the limits set during the deployment.

3. Transferring CAT-20 Tokens

Transferring CAT-20 tokens involves moving a specified amount from one wallet to another. The transfer script ensures that the correct amount is deducted from the sender’s balance and added to the receiver’s balance.

Script for Transferring CAT-20 Tokens:

OP_FALSE OP_IF
    OP_PUSH "ord"                  # Ordinal magic code
    OP_PUSH 1                      # Version number
    OP_PUSH "text/plain;charset=utf-8"  # MIME type
    OP_PUSH 0                      # Push 0 to signal start of data
    # Begin CAT-20 transfer operation
    OP_PUSH "cat20:"
    OP_CAT
    OP_PUSH "transfer:"
    OP_CAT
    OP_PUSH "CAT="
    OP_CAT
    OP_PUSH "5"
    OP_CAT
    # End of CAT-20 transfer operation
OP_ENDIF

Final Concatenated String:

“cat20:transfer:CAT=5”

Explanation:

  • “transfer:”: Indicates that this is a transfer operation.
  • “CAT=”: The ticker for the token.
  • “5”: The amount of tokens to be transferred.

When this script is executed, 5 CAT tokens are transferred from the sender’s wallet to the receiver’s wallet.

Summary

Deploying, minting, and transferring CAT-20 tokens are all managed through Bitcoin’s script language, enhanced by the OP_CAT opcode. Each operation concatenates its respective components into a final string that represents the action on-chain. This method not only leverages Bitcoin’s existing infrastructure but also introduces a level of efficiency and simplicity that makes CAT-20 a powerful tool for token management on the Bitcoin blockchain.

In the next section, we will dive into the specific rules and guidelines that govern the CAT-20 metaprotocol, ensuring consistent and reliable operation across the network.


메타데이터
post_id
ebd957de1a6e
slug
fair-cat-20-a-fair-experimental-bitcoin-token-standard-leveraging-op-cat-ordinal-consensus-ebd957de1a6e
url
https://medium.com/@ilertha/fair-cat-20-a-fair-experimental-bitcoin-token-standard-leveraging-op-cat-ordinal-consensus-ebd957de1a6e
canonical_url
https://medium.com/@ilertha/fair-cat-20-a-fair-experimental-bitcoin-token-standard-leveraging-op-cat-ordinal-consensus-ebd957de1a6e
author_url
https://medium.com/@ilertha
status
ok
fetched_at
2026-06-27 07:40:21