📢 Gate Square Exclusive: #WXTM Creative Contest# Is Now Live!
Celebrate CandyDrop Round 59 featuring MinoTari (WXTM) — compete for a 70,000 WXTM prize pool!
🎯 About MinoTari (WXTM)
Tari is a Rust-based blockchain protocol centered around digital assets.
It empowers creators to build new types of digital experiences and narratives.
With Tari, digitally scarce assets—like collectibles or in-game items—unlock new business opportunities for creators.
🎨 Event Period:
Aug 7, 2025, 09:00 – Aug 12, 2025, 16:00 (UTC)
📌 How to Participate:
Post original content on Gate Square related to WXTM or its
CAT20 protocol: A new breakthrough in smart contracts on Fractal Bitcoin
Smart Contracts on BTC: An In-Depth Analysis of the Fractal Bitcoin CAT20 Protocol
Recently, the Bitcoin ecosystem has witnessed a significant advancement. After several rounds of testnet, Fractal BTC officially launched its mainnet in September. One of the highlights of Fractal is its smart contracts functionality, and it introduced a new token protocol CAT20 at the launch of the mainnet. So, what clever features does CAT20 have in its technical design? What can we learn from it?
Fractal Bitcoin Introduction
Before delving into CAT20, we need to understand Fractal Bitcoin. Their relationship is similar to ERC20 and ETH, as the CAT20 protocol is deployed on the Fractal Bitcoin network.
Fractal Bitcoin, also known as Fractal 比特币, is a fully compatible "layer two" network with BTC. Compared to BTC, its block confirmation time is shorter, taking only 1 minute. The basic principle, as its name suggests, is to replicate the BTC network multiple times, allowing each chain to process transactions, thereby increasing the overall processing speed.
One important feature of Fractal is the re-enabling of the BTC opcode OP_CAT, which was abandoned in the early days for security reasons. This move significantly enhances the functionality of Fractal Bitcoin, equipping it with the capability of smart contracts and opening up more possibilities for future development.
CAT Protocol Analysis
With the underlying support of OP_CAT, the CAT Protocol has emerged. Currently, the CAT20 protocol is already running in practical applications.
deployment process
Before deploying the CAT20 token, users need to specify the wallet address and the basic information of the token. Compared to ERC20, CAT20 also allows for setting the pre-mining amount and the limit on the number minted each time.
The deployment is divided into two stages: "commit" and "reveal". In the "commit" stage, the output script of the transaction will write the basic information of the token. The transaction hash generated in the "commit" stage will serve as the unique identifier for that token.
The "reveal" phase will generate two key outputs: one OP_RETURN to store the initial state hash of the CAT20, and the other is the Minter, which is used for the subsequent minting process.
minting mechanism
During the minting process, the input of the transaction is a minter, initially generated during the deployment phase. Each minting has only one minter as input, but there can be multiple minters as outputs.
Interestingly, the number of outputs from the minter can be flexibly set. If only 1 is output each time, the available number of minters in the network will remain unchanged, which may lead to minting congestion. On the other hand, outputting multiple minters requires paying additional UTXO fees, which means some users need to voluntarily bear this part of the cost.
In the V2 version, two Minter with similar states are generated by default to balance efficiency and cost.
technical details of transaction construction
The trading construction of CAT20 employs some clever techniques. For example, during the reveal process, by adjusting the logic of the Bitcoin script, users can control UTXOs that appear to be from different addresses. Meanwhile, the minter's UTXO may utilize the smart contract capabilities provided by OP_CAT, allowing anyone to use these UTXOs as inputs.
State Management
CAT20 stores state information in the minter, stored in OP_RETURN and smart contracts. After each minting, the newly generated minting amount of Minter will equal half of the remaining mintable amount until all have been minted.
transfer and burn
When transferring, the number of input and output tokens in the transaction must remain consistent. To destroy tokens, simply transfer them to a regular address.
Summary
The design of CAT20 provides users with great flexibility, while also placing higher demands on the verification logic of the smart contracts. This design facilitates the querying of token holdings and minting status, improving efficiency.
With the development of Fractal Bitcoin and CAT20, the Bitcoin ecosystem is moving towards richer application scenarios, bringing new possibilities for decentralized finance and smart contracts.