ckBTC: a canister-issued bitcoin twin token on the IC, 1:1-backed by BTC

Hi everybody!

We have talked about “chain-key Bitcoin” aka ckBTC in a previous forum thread which led to motion proposal Proposal: 50135 - IC Dashboard. The motion proposal was accepted and DFINITY has been busy building ckBTC. I am starting a new forum topic here to talk about the implementation of ckBTC.

What is ckBTC?

  • Canister smart contracts on the IC can hold real bitcoin, on the bitcoin blockchain, by building on Threshold ECDSA Signatures and Direct Integration with Bitcoin. The strength of this approach is that one only needs to trust the ICP and the BTC networks for this integration, and no intermediate parties. However, as this is real bitcoin, one also has the downsides of bitcoin, meaning that transactions are relatively slow and expensive.
  • ckBTC can be seen as wrapped bitcoin, but it is wrapped by a canister smart contract that builds on the direct bitcoin integration. That means that ckBTC is a token native to the Internet Computer, meaning it can be transferred quickly and with low fees, while being securely backed by real bitcoin on the Bitcoin blockchain. The planned fee for ckBTC transactions is 0.0000001 ckBTC, the equivalent of 10 satoshi.
  • Users can use the “ckBTC minter” canister smart contract to deposit real bitcoin (on the bitcoin blockchain) to their personal deposit address, and receive an equal amount of ckBTC (minus fees). Similarly, users can use the ckBTC minter canister to return ckBTC tokens, and receive an equal amount of real bitcoin on a specified bitcoin address (again, minus fees).
  • ckBTC follows the ICRC-1 token standard.
  • ckBTC will be owned by the Network Nervous System (NNS), meaning upgrades to the canisters can only be done with approval of the NNS, there is no individual party controlling the canisters.
  • ckBTC will be fully transparent: users will be able to see exactly how much bitcoin the ckBTC minter holds, as it will show all the bitcoin UTXOs that it holds. Similarly, one can see the supply of ckBTC tokens, and ensure that all ckBTC is always backed by BTC.

When will ckBTC be available?
We are planning to release ckBTC in early 2023.

38 Likes

We have installed a test version of ckBTC called ckTESTBTC on mainnet! This is the code of ckBTC, but it wraps testnet bitcoin instead of real bitcoin. You can help test this, and developers can use this to test integrating with ckBTC. Note that we don’t have a nice front-end for this yet, so you’ll need to use some dfx commands. Here are the things you can do today with ckTESTBTC.

Step 1: send testnet bitcoin to your deposit address
You can clone the ic repository, and cd to ic/rs/bitcoin/ckbtc/testnet/. This directory has the right canister_ids.json file:

{
  "index": {
    "ic": "mm444-5iaaa-aaaar-qaabq-cai"
  },
  "ledger": {
    "ic": "mc6ru-gyaaa-aaaar-qaaaq-cai"
  },
  "minter": {
    "ic": "ml52i-qqaaa-aaaar-qaaba-cai"
  }
}

From this directory, you can run the commands as outlined in the “Bitcoin to ckBTC” section of the README. You can use a bitcoin testnet faucet (eg https://bitcoinfaucet.uo1.net/) to send testnet bitcoin to your deposit address. The ckTESTBTC waits for 3 confirmations, so you have to wait some time between sending the testbtc and calling “update_balance”.

Step 2: transact in ckTESTBTC
Now that you have ckTESTBTC, you can send it around quickly and for low fees. The Bitfinity wallet by infinityswap already supports ICRC-1 tokens, so you can for example set that up. If you go that path, you have to click “import token”, choose “custom”, and enter the ledger canister id “mc6ru-gyaaa-aaaar-qaaaq-cai” with “ICRC1” as token standard.

You can send ckTESTBTC to a different address using

dfx canister --network ic call ledger icrc1_transfer "(record { to = record { owner = principal \"PRINCIPAL\" }; amount = AMOUNT; })"

Note that the amount should be specified in 10^-8 ckTESTBTC (ie, the equivalent of satoshis).

Step 3: redeem ckTESTBTC to obtain testnet BTC
If you have ckTESTBTC and you want to trade it in for testnet bitcoin, you can follow the steps in the “ckBTC to Bitcoin” section of the README.

Other things to check out
The minter exposes a dashboard that exposes what the minter is doing, which operations are ongoing, and which UTXOs are controlled by the minter. You can use this to convince yourself that all ckTESTBTC is backed by testnet bitcoin. You can obtain the total supply of ckTESTBTC by calling:

dfx canister --network ic call ledger icrc1_total_supply

You can compare the resulting number with the total amount of testnet bitcoin held by the minter as shown on the dashboard.

Feedback
Please use this forum thread to let us know if you run into any problems or if you have questions about ckBTC.

24 Likes

Thanks for the updates, @Manu!

What happens to the BTC that is accumulated due to the ckBTC exchange fees?

3 Likes

That’s a great question. For now, nothing. In future upgrades to ckBTC we can do something with these, and one thing that definitely would make sense is to let small amounts be transferred out such that they can be used to pay the cycles of these canisters. When there would be even more BTC accumulated due to fees that exceeds what is needed to pay for cycles, one idea i had is that we could move those out into an account that uses it to buy ICPs and burn the ICPs, such that it’s for the good of the ICP holders. Do you have any suggestions @Jonathan?

And to be clear, all these ideas would need to come in the form of upgrades to the ckBTC canisters that are approved by the NNS, no individual can access those underlying BTCs.

7 Likes

I like the idea, I think we should have more ICP burn sources. . This would help create deflationary pressure. In addition to contributing to the integration of DEFI in bitcoin, it would provide extra value by burning ICP, benefiting all of us who financed the project, buying and holding ICP.

1 Like

@Manu, I think your idea helps to balance the ecosystem.

Increased value of BTC:ICP
→ more ICP burned from (ck)BTC tx
→ increased value of ICP

I like that, but I’ll follow up if I have other suggestions.

1 Like

I have tried to add cktestbtc to ME wallet and it succeeded, using the following canister ID: mc6ru-gyaaa-aaaar-qaaaq-cai

3 Likes

In future upgrades to ckBTC we can do something with these, and one thing that definitely would make sense is to let small amounts be transferred out such that they can be used to pay the cycles of these canisters.

I thought NNS canisters (including ckBTC) don’t need to pay for cycles.

Good question! The term “NNS Canister” is not entirely precise, I think it’s used for both canisters that run on system subnets, and for canisters that are controlled by the NNS.

  • if a canister runs on a system subnet (as shown here), they do not cost cycles.
  • a canister that is controlled by the NNS but does not run on a system subnet, the canister pays cycles as usual

The canisters of ckTESTBTC run on the new fiduciary subnet (pzp6e), so this canister does pay cycles. Even more so than on other subnets, because it’s a larger subnet. We plan on running the real ckBTC on the same subnet.

3 Likes

I’ve just learned about this bitcoin integration. So, I don’t know if it is possible to swap between BTC vs ICP through ckBTC.So, if it can, how can I do it pls? Thanks

You’ll have to go through exchanges to swap ckBTC to ICP. But AFAIK there’s no ckBTC for mainnet bitcoin yet, so you’ll have to be patient for some more time

3 Likes

Correct, ckBTC is still under development and not available yet.

While trading ICP for BTC and vice versa is already possible technically, DEXs do not support this trading pair yet (as far as I know).

4 Likes

I still think that the naming breakdown should be
ckBTC - “chain key Bitcoin” that makes updates on the Bitcoin ledger with “real” Bitcoin
wBTC - “wrapped Bitcoin” a standard naming convention for a token on another blockchain

So, an ICRC-1 token would be wBTC, which could be burned for ckBTC. Any blockchain can wrap Bitcoin, but ckBTC should describe what is uniquely possible on the IC - making updates natively on the Bitcoin blockchain

5 Likes

But what would ckBTC refer to exactly then? If it’s the token, it’s just BTC, so I think it would be misleading to name it anything other than BTC.

For naming the “wrapped” token, this was named in [Feedback Wanted] Wrapped Bitcoin Ledger on the Internet Computer, I would be a bit hesitant to change it so late in the process. Wrt wBTC, I think that has the downside that other tokens are already called wBTC, most notably wrapped BTC on ETH, so I would prefer a more unique name.

2 Likes

hello,i have a quastion,how to mint new tokens with ckbtc?

ckBTC would refer to BTC that is securely held and transferred by a smart contract, rather than an individual’s wallet.

I think that using the name wBTC for wrapped tokens is actually a gesture of good faith to other communities, particularly Ethereum. It’s important to use like terminology where features are in fact similar, and using a ledger to trade new tokens that are backed by a balance of BTC is called wBTC in the rest of the crypto ecosystem

edit: I do see the issue where it may be hard to list IC wBTC on traditional exchanges. However, it does seem like there is a pattern of simply using the original ticker and associating the platform with a suffixed number Bitcoin [Polygon] (BTC) (BTC) Price Today, Value, Real-Time Charts & News

1 Like

Welcome to the forum @Damirbek1997! The real ckBTC is not live yet, but ckTESTBTC is live (which wraps testnet bitcoin). You can find the instructions on how to use that in an earlier post. We don’t have a nice font-end yet though, so it’s all on the command line for now.

But isn’t how the token is held irrelevant? An ICP is an ICP irrespective of whether I hold it in a ledger nano or the FE dapp via II right? Calling real bitcoin held by canisters ckBTC sounds a bit like calling ICP held via II something like iiICP.

2 Likes

There could be wrapped BTC on the IC without BTC integration, correct? Should such wrapped BTC not have a separate designation so as not to be confused with ckBTC which is a direct product of BTC integration?

1 Like

Thank you, I too am glad to be part of the internet community
I read your post about ckbtc canister, searched ckbtcTest repositories, didn’t find information about minting, is it possible to implement minting at all?