Analysis of CAT20: Innovative Token Protocol on Fractal Bitcoin

robot
Abstract generation in progress

Analysis of the New Token Protocol CAT20 on Fractal Bitcoin

Recently, Fractal Bitcoin ( has made significant progress in its ecosystem. After multiple rounds of testing, the project officially launched its mainnet in September. One of the key features of Fractal Bitcoin is its smart contract functionality, and it introduced a new Token protocol, CAT20, at the time of the mainnet launch. This article will analyze the design philosophy and implementation details of CAT20 from a technical perspective.

![Technical Analysis of CAT20: A New Token Protocol on Fractal Bitcoin])https://img-cdn.gateio.im/webp-social/moments-8aed56f390689b0122618f4ce4be841b.webp(

Introduction to Fractal Bitcoin

Before understanding CAT20, we need to briefly understand Fractal Bitcoin. It is a completely compatible second-layer network with BTC, with a block confirmation time of only 1 minute, which is much faster than the BTC mainnet. Its basic principle is to duplicate the BTC network multiple times, allowing each chain to process transactions, thereby enhancing the overall processing speed.

A major highlight of Fractal Bitcoin is the re-enabling of the OP_CAT opcode, which was abandoned in the early days of BTC for security reasons. The recovery of this opcode greatly enhances the functionality of Fractal Bitcoin, giving it the capability of smart contracts. It is on this foundation that the CAT20 protocol was born.

![Technical Perspective on CAT20: New Token Protocol on Fractal Bitcoin])https://img-cdn.gateio.im/webp-social/moments-e7063433589252ea275ad154228720e1.webp(

CAT20 Protocol Overview

The CAT20 protocol is a token standard built on fractal Bitcoin, similar to ERC20 on Ethereum. Currently, some trading platforms support the creation and management of CAT20 tokens. Compared to the mature ERC20, CAT20 adopts some unique designs when implementing similar functions.

) Token deployment

When deploying CAT20 Token, users need to specify the wallet address and basic information of the token, such as name, symbol, etc. Unlike ERC20, CAT20 allows setting the pre-mined amount and the single minting limit of ###Mint(.

The deployment process is divided into two stages: "commit" and "reveal:"

  1. Commit Stage: Write the basic information of the Token into the transaction output script. The hashId of this transaction serves as the unique identifier for the Token.

  2. Reveal Phase: Output an OP_RETURN containing the initial state hash of CAT20, as well as a Minter for subsequent minting.

This two-stage deployment method is beneficial for protecting project information, as it is only fully disclosed during the reveal stage.

![Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin])https://img-cdn.gateio.im/webp-social/moments-e900482fd49f488fa34f1a7e823173d1.webp(

) Token Minting

The minting process of CAT20 has the following characteristics:

  • The input for each minting is a Minter### initially generated by the deployment transaction (.
  • The output may include multiple new Minters
  • Each minting produces a Token output.
  • Output order is fixed: Minter first, Token last

The quantity management of Minter is crucial. If only 1 Minter is issued each time, it will cause congestion; issuing too many will increase transaction costs. The V2 version defaults to generating two Minter that are close in status to balance efficiency and cost.

![Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin])https://img-cdn.gateio.im/webp-social/moments-c4ee2f9b3915fce9662f89bddd9ec195.webp(

) Transaction Construction

CAT20 adopts a clever script design, allowing users to construct transactions using UTXO from addresses that do not belong to them:

  • In the reveal phase, by adjusting the public key generation process, the same private key can control UTXOs of different addresses.
  • The Minter stage utilizes OP_CAT to implement smart contract functionality, allowing anyone to use Minter UTXO.

![Technical Perspective on CAT20: New Token Protocol on Fractal Bitcoin]###https://img-cdn.gateio.im/webp-social/moments-4a068837b74c66fa262509c442f9162a.webp(

) State Management

The status of CAT20 is stored in two places:

  1. The state hash is stored in the OP_RETURN of the transaction output.
  2. The specific state is stored in the Minter and Token smart contracts.

After each minting, the minting quota for the new Minter is half of the remaining total amount, until it is exhausted.

It is worth noting that the CAT20 Token is not directly stored on the UTXO of the user's address, but is managed by a smart contract.

![Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin]###https://img-cdn.gateio.im/webp-social/moments-cbca62f8d46cd64c04aa94b61d0bde93.webp(

) transfer and burn

When transferring, the input and output quantities of the transaction's Token must remain consistent. Multiple different Tokens can be handled in the same transaction, as long as they are balanced accordingly.

To destroy a Token, simply transfer it to a regular address.

![Technical Interpretation of CAT20: A New Token Protocol on Fractal Bitcoin]###https://img-cdn.gateio.im/webp-social/moments-e327f5fb8fe3f8d0f8762ee1d421a2d6.webp(

Summary

The design of CAT20 provides users with great operational flexibility while also imposing higher demands on contract verification logic. This design brings several advantages:

  1. To check Token holdings, simply check the Token UTXO without the need to trace history.
  2. You can quickly understand the minting status by searching for transactions containing "cat" in OP_RETURN.

CAT20, as a token standard on fractal Bitcoin, showcases the exploration of the Bitcoin ecosystem in the field of smart contracts. Its unique design provides users with more possibilities while also facing challenges in terms of security. With the development of the ecosystem, CAT20 is expected to bring more innovative applications at the Bitcoin level.

![Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin])https://img-cdn.gateio.im/webp-social/moments-be9094baf3be7cbadff7b63aa73f44fa.webp(

![Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin])https://img-cdn.gateio.im/webp-social/moments-73c817fad835a9a2cb0c727674c81801.webp(

BTC1.26%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 5
  • Share
Comment
0/400
alpha_leakervip
· 7h ago
Another "Bitcoin killer"?
View OriginalReply0
0xSherlockvip
· 7h ago
The chain speed is quite good, much faster than BTC.
View OriginalReply0
airdrop_whisperervip
· 7h ago
Is it another altcoin flash payment coin?
View OriginalReply0
DataChiefvip
· 7h ago
After all this time, it’s still not for the purpose of improving TPS~
View OriginalReply0
DaisyUnicornvip
· 7h ago
Wow, this little flower blooms so fast. I just planted it yesterday and it passed the test today~
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)