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 Twitter user @bc1plainview, 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.
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.
CAT-20 introduces several key advantages over previous standards, such as BRC-20:
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.OP_CAT
opcode.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.
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.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.
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
"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.
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.
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.
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.
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:
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
"cat20:deploy:CAT=210000000,lim=1,dec=8"
"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.
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.
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
"cat20:mint:CAT=1"
"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.
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.
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
"cat20:transfer:CAT=5"
"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.
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.
In this section, we'll provide practical, hands-on examples of how to deploy, mint, and transfer CAT-20 tokens on the Bitcoin blockchain. These examples will guide you through the process step by step, using the scripts and rules outlined in the previous sections.
Let’s start with an example of deploying a new CAT-20 token called CAT with a maximum supply of 210,000,000 tokens, a mint limit of 1,000 tokens per inscription, and 8 decimal places.
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
"cat20:deploy:CAT=210000000,lim=1,dec=8"
This deployment script initializes a new CAT-20 token with the ticker CAT, a maximum supply of 210,000,000 tokens, a mint limit of 1,000 per inscription, and 8 decimal places. The script is inscribed on the blockchain, making the CAT token officially deployed and available for minting.
Once a token is deployed, you can mint additional tokens up to the maximum supply defined during deployment. In this example, we’ll mint 1,000 CAT 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
"cat20:mint:CAT=1"
This minting script creates 1,000 CAT tokens and assigns them to the first wallet that inscribes this operation. This operation respects the mint limit of 1,000 tokens per inscription, as specified during deployment.
After minting, you may want to transfer tokens to another wallet. In this example, we’ll transfer 500 CAT tokens from one wallet to another.
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
"cat20:transfer:CAT=5"
This transfer script moves 500 CAT tokens from the sender’s wallet to the receiver’s wallet. The script ensures that the correct amount is deducted from the sender's balance and added to the receiver's balance upon completion of the transfer.
For users who wish to perform multiple operations in a single script, CAT-20 allows for flexibility. Here’s an example of minting and then immediately transferring 200 CAT tokens to another wallet.
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
# Begin CAT-20 transfer operation
OP_PUSH "cat20:"
OP_CAT
OP_PUSH "transfer:"
OP_CAT
OP_PUSH "CAT="
OP_CAT
OP_PUSH "2"
OP_CAT
# End of CAT-20 operations
OP_ENDIF
"cat20:mint:CAT=1"
"cat20:transfer:CAT=2"
This combined script first mints 200 CAT tokens and then immediately transfers them to another wallet. This example demonstrates the flexibility of CAT-20 scripts, allowing multiple operations to be chained together in a single transaction.
These practical examples provide a clear roadmap for using CAT-20 tokens on the Bitcoin blockchain. By following these scripts, you can confidently deploy, mint, and transfer tokens, taking full advantage of the power and flexibility offered by the OP_CAT
opcode.
Whether you’re a developer, a token creator, or simply exploring the possibilities of CAT-20, these examples will serve as your guide to executing token operations efficiently and effectively. As CAT-20 continues to evolve, so too will the strategies and best practices for managing tokens on Bitcoin, opening up new opportunities for innovation and growth.
The CAT-20 standard is governed by a set of rules and guidelines that ensure consistent behavior, compatibility, and security across the Bitcoin network. Understanding these rules is essential for anyone looking to deploy, mint, or transfer CAT-20 tokens. This section outlines the key rules and best practices to follow when working with CAT-20 tokens.
uint64_max
(18,446,744,073,709,551,615).Available Balance = Overall Balance - Valid Transferable Balance
OP_CAT
for concatenation. These inscriptions must be correctly formatted to be valid.By adhering to these rules and guidelines, you can ensure that your CAT-20 tokens are managed effectively and securely on the Bitcoin blockchain. Understanding these principles is key to leveraging the full potential of CAT-20, whether you are deploying new tokens, minting additional supply, or transferring tokens between wallets.