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

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.

27 Likes