CAT20 protocol: a breakthrough development of BTC ecosystem smart contracts

robot
Abstract generation in progress

New Developments of Smart Contracts on BTC: In-depth Analysis of CAT20 Token Protocol

Recently, the Bitcoin ecosystem has welcomed an important development. After multiple rounds of testnet verification, Fractal BTC has officially launched on the mainnet in September. One of the highlights of Fractal is its capability of smart contracts, and at the time of its mainnet launch, it introduced a new token protocol CAT20. This article will delve into the ingenious design of CAT20 at the technical level and the insights it brings.

Technical Interpretation of CAT20: A New Token Protocol on Fractal Bitcoin

Fractal Bitcoin Introduction

Before diving into CAT20, we need to first understand its underlying platform, Fractal Bitcoin. Fractal Bitcoin, also known as 分形比特币, is a fully compatible second layer network with BTC. Compared to BTC, its block confirmation time is faster, taking only 1 minute. The basic principle is to replicate the BTC network multiple times, where each chain can process transactions, thereby increasing the overall processing speed.

A key feature of Fractal is the re-enabling of the OP_CAT opcode that was abandoned early in BTC for security reasons. This move greatly enhances the functionality of Fractal Bitcoin, equipping it with smart contracts capabilities and opening up vast space for future development.

Technical Analysis of CAT20: New Token Protocol on Fractal Bitcoin

Overview of CAT20 protocol

With the underlying support of OP_CAT, the CAT20 protocol has emerged. Currently, this protocol is running in a real environment and has added corresponding display panels on certain block explorers.

CAT20 is designed with the concepts of ERC20 in mind, but it also has its unique features. For example, CAT20 allows for setting a pre-mined amount and a cap on the number of coins minted each time, (Mint), which in ERC20 typically requires additional contract logic to implement.

Technical Analysis of CAT20: New Token Protocol on Fractal Bitcoin

The Lifecycle of CAT20

Deploy(

The deployment process of CAT20 is divided into two phases: "commit" and "reveal:"

  1. Commit phase: Write the basic information of the Token, such as name, symbol, etc., in the transaction output script. The transaction hash generated in this phase will serve as the unique identifier for the Token.

  2. Reveal Stage: Generate an OP_RETURN output containing the hash of the initial state of CAT20, as well as a Minter output for the subsequent minting process.

This two-step deployment method is a common practice in blockchain projects and helps protect certain key information of the project.

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

) Mint ###

The main features of the minting process include:

  • Each minting uses a Minter as input.
  • The output can include multiple Minters
  • Each minting produces a Token
  • The output order has strict requirements; Minter must be before the Token.

It is worth noting that Minter's quantity management strategy has a significant impact on the minting activities of the entire network. To avoid minting congestion, it is generally recommended to output multiple Minters at a time. However, for economic reasons, users may tend to refrain from outputting new Minters, which requires some users to voluntarily bear additional costs to maintain network vitality.

Technical Perspective on CAT20: New Token Protocol on Fractal Bitcoin

( Transfer )

Transfer transactions need to ensure that the input and output Token quantities remain consistent. A single transaction can include transfers of multiple different Tokens, as long as their respective input and output quantities are balanced.

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

) Burn (

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

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

Technical Highlights

  1. Flexible trading construction: All operations are autonomously constructed by the user, providing great flexibility. This also requires that the contract part needs strict verification logic to ensure safety.

  2. Efficient Querying:

    • To check token holdings, simply check the token's UTXO without needing to trace transaction history.
    • You can view the minting status by searching for transactions containing "cat" in OP_RETURN.
  3. State Management: CAT20 uses OP_RETURN and smart contracts (Minter and Token ) to store and manage state information, achieving efficient state tracking and updates.

Technical interpretation of CAT20: New Token Protocol on Fractal Bitcoin

Summary

The CAT20 protocol demonstrates innovative attempts within the Bitcoin ecosystem in the field of smart contracts. Through clever design, it achieves functionality similar to ERC20 on the Bitcoin network while maintaining the characteristics of Bitcoin. This provides new ideas for the expansion of the Bitcoin ecosystem and brings more possibilities for developers and users. As technology continues to improve, we can expect to see more innovative applications based on CAT20.

Technical Interpretation of CAT20: A New Token Protocol on Fractal Bitcoin

BTC0.96%
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
  • 6
  • Share
Comment
0/400
OnchainSnipervip
· 3h ago
This is being hyped again, it's already been overhyped.
View OriginalReply0
fren.ethvip
· 3h ago
BTC is finally no longer an old relic.
View OriginalReply0
BearMarketMonkvip
· 3h ago
btc要To da moon啦?
View OriginalReply0
AirdropHunter9000vip
· 3h ago
It's just another copy of ERC20, it will drop to zero sooner or later.
View OriginalReply0
BearMarketSurvivorvip
· 3h ago
BTC is about to To da moon again.
View OriginalReply0
StakeWhisperervip
· 3h ago
Finally, something good has arrived.
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)