Fractal Bitcoin innovative CAT20 protocol: BTC smart contracts new chapter

robot
Abstract generation in progress

Smart Contracts on BTC: Exploring Fractal Bitcoin and CAT20 Protocol

Fractal Bitcoin, as an important innovation in the Bitcoin ecosystem, has officially launched its mainnet after several rounds of testing. One of the highlights of this project is the introduction of smart contracts functionality, along with the simultaneous launch of the new token protocol CAT20. This article will delve into the technical design of CAT20 and its potential impact.

Technical Perspective on CAT20: New Token Protocol on Fractal Bitcoin

Fractal Bitcoin Introduction

Fractal Bitcoin, also known as Fractal BTC, is a layer-2 network that is fully compatible with BTC. Compared to the Bitcoin mainnet, it has a faster block confirmation time, taking only 1 minute to complete. The basic principle is to replicate multiple BTC networks, with each chain capable of processing transactions, thus increasing the overall processing speed.

A significant technological breakthrough of Fractal lies in the reactivation of the OP_CAT opcode, which was abandoned in the early days of BTC for security reasons. This move greatly enhances the functionality of Fractal Bitcoin, giving it the potential for smart contracts.

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

CAT20 Protocol Analysis

The CAT20 protocol is a new type of token standard developed based on Fractal Bitcoin, similar to ERC20 on Ethereum. Its implementation relies on the support of the underlying OP_CAT opcode.

deployment process

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

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

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

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

minting mechanism

The main features of the minting process include:

  • The input is a Minter( initially generated by the deployment transaction ).
  • Each minting produces one token and any number of Minter outputs.
  • The output order is fixed, Minter must be before the token.

It is worth noting that the number of Minters set will affect the minting activity of the entire network. Increasing the Minter output can improve availability, but it will also increase transaction costs.

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

transaction construction

The transaction construction of CAT20 employs a clever script design that allows users to control UTXOs from non-owned addresses. This is achieved by using specific public and private key pairs in the script.

Technical Perspective on CAT20: New Token Protocol on Fractal Bitcoin

state management

CAT20 adopts a dual state storage mechanism:

  • The current state hash is stored in the OP_RETURN of the transaction output.
  • Specific state information is stored in the smart contracts ( Minter and Token ).

After each minting, the minting amount of the newly generated Minter is half of the remaining mintable amount.

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

transfer and burn

When transferring, the input and output token quantities of the transaction must remain consistent. To destroy a token, simply transfer it to a regular address.

Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin

Summary

The design of the CAT20 protocol provides users with great operational flexibility, but it also imposes higher requirements on the smart contracts verification logic. This design has the following advantages:

  1. Simplified Token holding status inquiry, just check the Token's UTXO.
  2. It is convenient to monitor the minting situation, and transactions containing "cat" in OP_RETURN can be searched.

The emergence of CAT20 has brought new possibilities for the Bitcoin ecosystem, promising to drive the development of more innovative applications. However, its security and stability still need further verification and improvement.

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

Technical Interpretation of CAT20: New Token Protocol on Fractal Bitcoin

FB-0.71%
BTC0.74%
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
liquidation_surfervip
· 4h ago
Here comes the nonsense again, it's useless.
View OriginalReply0
NftCollectorsvip
· 11h ago
On-chain data clearly points to CAT20 as the new era of Web3 art liberation.
View OriginalReply0
BearMarketLightningvip
· 11h ago
Wow, Bitcoin is also playing with smart contracts.
View OriginalReply0
LiquiditySurfervip
· 11h ago
Bitcoin is finally going to play with smart contracts.
View OriginalReply0
ConfusedWhalevip
· 12h ago
Just have fun and consider it a profit.
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)