ckBTC retrieve_btc to Taproot address?

After retrieve_btc the ckBTC was transferred to mqygn-kiaaa-aaaar-qaadq-cai
Usually a burn happens next, is this just network congestion or …

The burn operation in our ledger is done by transfering tokens to the minting account. In the case of ckBTC, the minting account is owned by mqygn-kiaaa-aaaar-qaadq-cai, i.e. the minter, and has default subaccount. You can double check this by calling icrc1_minting_account in the ckBTC Ledger e.g. by using the canister UI or via dfx:

$ dfx canister --network ic call --query mxzaz-hqaaa-aaaar-qaada-cai icrc1_minting_account '()'
  opt record {
    owner = principal "mqygn-kiaaa-aaaar-qaadq-cai";
    subaccount = null;

The relevant code is:

  • ckBTC Minter’s burn_ckbtc function that makes the burn by sending ckbtc to the minting account
  • ckBTC Ledger’s icrc1_transferfunction that creates a burn operation in case the to address is the minting_account
1 Like

what options does one have after the ckBTC has been transferred to the minting account?

retrieve_btc worked with a Native Segwit address.

Hi @AVOlight, if I understand correctly, you’re trying to do retrieve_btc to a taproot address right? If so:

  • We don’t support that yet (but we’ll add it asap!).
  • It sounds like you already transferred ckBTC to your “withdrawal” subaccount of the ckBTC minter. Since a retrieve_btc call with a taproot address gets rejected (due to it not being supported yet), your ckBTC is still there are not burnt.
  • you can get your bitcoin out by calling retrieve_btc with a different non-taproot address.

Hope this helps!


Hi @Manu , what do you think about PSBT(partially signed bitcoin transaction)? Does Difnity have a roadmap for how to implement PSBT on ICP network?

This is not on the roadmap.
What functionality do you think is missing? You can already create any kind of Bitcoin transaction (except for Taproot transactions, which the IC cannot sign).

So are there any updates on t-schoor signature?

Hi @Manu , I know that you know a lot of things about the BTC, so here I want to ask you a question:
There are two rust-electrum clients and rust-bitcoin client, I found the send_transaction in the rust-bitcoin, and the blockchain.transaction.broadcast in the rust-electrum clients, so do you know what are the differences between the two interfaces? Or can I use the send_transaction instead of broadcast_transaction?
Anyone who knows something about it can post here, thx:)

Could you please provide some more information on what you’re trying to do?
In case it is not clear, you cannot run any of these clients in a canister. At the very least, the networking part wouldn’t work.
A canister can send a Bitcoin transaction by calling the function bitcoin_send_transaction on the management canister.

Yeah, I found the send_transaction interface in the ckbtc canister, and now I want to build my own bitcoin dapp canister, first, it needs to sign a psbt(Partially Signed Bitcoin Transaction), and then it needs to broadcast transactions to the BTC mainnet(I found it in the rust-electrum), but I don’t know the low-level fundamentals of the broadcast.

I suggest that you take a look at this sample code (if you prefer Rust, check out this sample code instead).

Basically, you create the transaction, (partially) sign it using the threshold ECDSA API (check out this Motoko function or this Rust function for inspiration), and then simply serialize the transaction and call bitcoin_send_transaction.
The transaction will then be advertised in the Bitcoin network (mainnet or testnet).