CAT20 protocol: New breakthrough in BTC smart contracts Fractal innovation leads the future

robot
Abstract generation in progress

Analysis of Smart Contract Technology on BTC: Fractal Bitcoin and CAT20 Protocol

Recently, the Bitcoin ecosystem has welcomed an important development. After multiple testnet operations, Fractal BTC officially launched its mainnet in September. One of the main features of Fractal is its smart contracts capability, and at the same time as the mainnet launch, a new token protocol CAT20 was released. This article will analyze the clever design of CAT20 from a technical perspective and explore its innovations.

Technical Perspective on CAT20: A New Token Protocol on Fractal Bitcoin

Fractal Bitcoin Introduction

Before delving into CAT20, we need to first understand its operating environment, Fractal Bitcoin. Fractal Bitcoin, also known as Fractal BTC, is a fully compatible second-layer network with BTC. Compared to BTC, its block confirmation time is reduced to 1 minute. The basic principle is to replicate multiple chains of the BTC network, each of which can process transactions, thereby improving overall processing speed.

A major highlight of Fractal is the reactivation of the OP_CAT opcode, which was abandoned in the early days of BTC for security reasons. The restoration of this opcode greatly enhances the functionality of Fractal Bitcoin, equipping it with smart contract capabilities and providing more possibilities for upper-layer application development.

Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin

CAT Protocol Overview

With the support of OP_CAT, the CAT Protocol has emerged. Currently, the CAT20 protocol is running in a real environment, and you can view the relevant panel on the Unisat platform.

CAT20 is designed based on ERC20, but it has its unique features. The following will analyze the lifecycle of CAT20:

Deployment ( process

Before deployment, users need to specify the wallet address and basic information of the token. CAT20 allows setting pre-mining and single Mint quantity limits.

Deployment 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 the transaction at this stage serves as the unique identifier for the token.

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

This two-step deployment method follows the commonly used commit-reveal pattern in blockchain, which helps protect sensitive data of the project.

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

) Minting ### process

The characteristics of Mint transactions are as follows:

  • The input is a minter, initially generated by deploy.
  • Each mint has only one minter input, but can have multiple minter outputs.
  • Each mint generates a token
  • The output order is fixed, and the token must come after the minter.

The design of the Mint process is quite ingenious. The setting of the output quantity by the minter affects the Mint activity of the entire network. By default, two minters with similar states are generated to balance network congestion and economic costs.

Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin

( transaction construction mechanism

The trading construction mechanism of CAT20 is distinctive:

  1. The Reveal process cleverly utilizes script logic, allowing the deployer to control the UTXO of different addresses.

  2. The Minter stage allows everyone to use specific UTXOs as inputs, which may be achieved through the smart contracts capability of OP_CAT.

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

( Transaction Status Management )V2###

There are two states saved in Minter:

  • The Hash storing the current transaction output state in OP_RETURN
  • The remaining Mint times stored in the smart contracts ( Minter and Token ).

After each Mint, the mint quantity of the newly generated Minter is half of the remaining mintable quantity. This design ensures the balance of the minting process.

It is worth noting that the CAT20 Token itself is also a smart contract, recording the quantity and ownership addresses, which is different from the UTXO model of BRC20 or inscriptions.

Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin

( Transfer ) and Burn ###

When transferring, the input and output quantities of the tokens in the transaction must remain consistent. Multiple different tokens can be processed in the same transaction.

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

Technical Perspective on CAT20: New Token Protocol on Fractal Bitcoin

Summary

The design of CAT20 provides users with great operational flexibility, while also imposing higher requirements on the verification logic of smart contracts. This design brings the following advantages:

  1. To check the Token holding status, simply retrieve the token's UTXO without the need for backtracking.
  2. You can understand the mint status by searching for transactions containing "cat" in OP_RETURN.

The innovative design of CAT20 brings new possibilities to the Bitcoin ecosystem and is worth the industry's continued attention to its development trends.

Technical Perspective on CAT20: A New Token Protocol on Fractal Bitcoin

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

CAT4.35%
BTC2.15%
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
BearMarketSurvivorvip
· 07-08 14:15
Bitcoin is not made of paper!
View OriginalReply0
BoredStakervip
· 07-07 03:31
This CAT20 is stable.
View OriginalReply0
OffchainOraclevip
· 07-06 18:00
Following the trend of speculation is all a trap.
View OriginalReply0
GasFeeCriervip
· 07-06 02:19
Might as well go all in on BTC.
View OriginalReply0
BridgeNomadvip
· 07-06 02:07
just another erc20 clone... wake me up when they patch those juicy deployment vulnerabilities
Reply0
NFTragedyvip
· 07-06 02:06
Is that it? Just copy ERC.
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)