🎉 [Gate 30 Million Milestone] Share Your Gate Moment & Win Exclusive Gifts!
Gate has surpassed 30M users worldwide — not just a number, but a journey we've built together.
Remember the thrill of opening your first account, or the Gate merch that’s been part of your daily life?
📸 Join the #MyGateMoment# campaign!
Share your story on Gate Square, and embrace the next 30 million together!
✅ How to Participate:
1️⃣ Post a photo or video with Gate elements
2️⃣ Add #MyGateMoment# and share your story, wishes, or thoughts
3️⃣ Share your post on Twitter (X) — top 10 views will get extra rewards!
👉
CAT20 Protocol Analysis: How Fractal BTC Implements Bitcoin Smart Contracts
Is the BTC smart contracts coming soon? Analysis of the new Token protocol CAT20 on Fractal BTC
Recently, a layer two network called Fractal BTC in the Bitcoin ecosystem has officially launched its mainnet after undergoing multiple rounds of testing. One of the highlights of Fractal BTC is its smart contracts capability, and on the occasion of the mainnet launch, it introduced a new token protocol CAT20. So what clever technical designs does CAT20 have? What can we learn from it?
Fractal Bitcoin Introduction
Before understanding CAT20, we need to briefly understand Fractal Bitcoin. Fractal Bitcoin is a "layer two" network that is fully compatible with BTC, with a block confirmation time of only 1 minute, which is faster than BTC. Its basic principle is to replicate the BTC network multiple times, with each chain capable of processing transactions, thereby increasing the overall processing speed.
One of Fractal's key features is the activation of the OP_CAT opcode, which was abandoned in the early days of BTC for security reasons. This gives Fractal Bitcoin capabilities similar to smart contracts, providing more possibilities for future development.
CAT Protocol Overview
Based on the support of the underlying OP_CAT, the CAT Protocol has emerged. Currently, the CAT20 protocol is in actual operation, and a certain trading platform has also added corresponding interface support. CAT20 is similar to ERC20 in both name and functionality, so how does it achieve a lifecycle similar to that of ERC20?
deployment process
When deploying the CAT20 Token, users need to specify the wallet address and the basic information of the Token. Unlike ERC20, CAT20 allows for pre-mining and a single minting cap.
Deployment is divided into two phases: "commit" and "reveal":.
This two-step deployment method is relatively common in blockchain projects and can reveal the complete information of the project only during the reveal phase.
Minting Mechanism
The minting process has the following characteristics:
The quantity management of minters is crucial. If only one is produced each time, it can cause congestion; producing too many increases costs. The V2 version defaults to generating two closely related Minters to balance efficiency and cost.
transaction construction
CAT20 can construct transactions using UTXOs from non-ownership addresses, thanks to its clever script design:
State Management
The minter stores state information, including:
The newly generated Minter can mint an amount equal to half of the remaining total, until all minting is complete.
The CAT20 Token itself is also a smart contract, recording the quantity and ownership address. This is different from the inscription mechanisms like BRC20.
transfer and burn
The input and output token amounts must remain consistent during the transfer. Multiple tokens can be transferred in a single transaction.
To burn a Token, simply transfer it to a regular address.
Summary
The design flexibility of CAT20 is very high, allowing users to independently construct various operations. This design has the following advantages:
However, flexibility also brings security risks, and it is necessary to strengthen the verification logic in the contract. Overall, CAT20 brings new possibilities to the BTC ecosystem, and it is worth our continued attention to its development.