Skip to main content
Bitcoin integrationWhat you need to know about Bitcoin integration

What you need to know about Bitcoin integration and ckBTC

What is Bitcoin integration?

The Internet Computer (ICP) integrates with the Bitcoin network at a protocol level. This means ICP canister smart contracts can create Bitcoin addresses as well as send and receive bitcoin directly on the Bitcoin network. And, Bitcoin can easily and securely be incorporated into DeFi and Web3 services on the Internet Computer blockchain, without having to trust centralized bridging services, which are at high risk of being taken down or hacked.

This integration with the Bitcoin network is made up of two key building blocks: Network integration and chain-key ECDSA. Combining these building blocks, canisters can directly and securely hold, receive, and send bitcoin seamlessly as if the Internet Computer and the Bitcoin network were one blockchain. Another way of looking at it, is that the Bitcoin integration is the same as running a Bitcoin node on chain.

What does direct integration with the Bitcoin network really mean?

One key tech development allowing smart contracts on the Internet Computer to obtain the balances of Bitcoin addresses as well as directly send and receive bitcoin is inter-chain communication. As the ICP blockchain creates transactions for the Bitcoin blockchain, its nodes directly transmit these transactions to the nodes of the Bitcoin network, without any need for intermediaries that might censor them. ICP nodes also directly pull blocks from the Bitcoin network to maintain Bitcoin's current UTXO set, allowing canisters to query the balance of Bitcoin addresses and their UTXOs. Creating bitcoin transactions and querying UTXO sets are made available to canisters by the Bitcoin API.

What is chain-key ECDSA?

The real innovation behind Bitcoin integration is chain-key ECDSA signing — advanced threshold cryptography build into the Internet Computer. In short, chain-key ECDSA is a set of cryptographic protocols that allow ICP nodes to cooperatively create ECDSA signatures, which can be used to sign bitcoin transactions, using a highly fault-tolerant, decentralized network that is resilient to attacks by malicious nodes. The secret key is never stored in one place, instead it is broken down into key shares held by ICP nodes that are re-shared periodically. When requested, nodes use their key shares to collectively sign BTC transactions without recreating the original secret key. This signing protocol assumes a threshold of nodes to be honest.

Chain-key Bitcoin (ckBTC)

What is ckBTC?

Chain-key bitcoin (ckBTC) is a multi-chain bitcoin twin that can be sent with 1-2 second finality and negligible fees. It is trustlessly created by chain-key cryptography and a pair of canister smart contracts that directly hold raw bitcoin without relying on intermediaries.

How can I get ckBTC?

There are two main ways of acquiring ckBTC:

  • Swap on DEXs: If you have ICP, you can swap it for ckBTC on decentralized exchanges running on the Internet Computer, including ICDex or ICPSwap.
  • Convert directly on the protocol: You can convert BTC to ckBTC by simply sending BTC to your NNS wallet (for more details, see next question). ICDex and ICPSwap have similar functionality that allows you to convert your BTC to ckBTC, directly using the ckBTC canisters.

How do I convert BTC to ckBTC using the NNS wallet?

Easy steps to getting ckBTC via your NNS wallet:

1. Go to the NNS frontend dapp and sign in with your Internet Identity. If you don't have one, you will be prompted to create one. Any device that supports WebAuthn can be used as a passkey for II. Alternatively, you can use a YubiKey or a Ledger device.

2. Navigate to "My Tokens" and select ckBTC.

3. Click on "Receive" on the bottom of the screen.

4. Send BTC to your NNS BTC address. Once you see this pop up window, you can copy your NNS BTC address, and send BTC there. Note, that since this is a real bitcoin transaction, it will take roughly an hour, and have the Bitcoin network's transaction fees. Once you acquired ckBTC, you can take advantage of its near instant finality (1-2s) and negligible transaction fees (10 satoshis).

How do I convert ckBTC to BTC using the NNS wallet?

Easy steps to getting ckBTC via your NNS wallet:

1. Go to the NNS frontend dapp and sign in with your Internet Identity.If you don't have one, you will be prompted to create one. Any device that supports WebAuthn can be used as a passkey for II. Alternatively, you can use a YubiKey or a Ledger device.

2. Navigate to "My Tokens" and select ckBTC. If you have ckBTC in a different wallet, send it it to your NNS principal

3. Click on "Send" on the bottom of the screen.

4. Paste a valid BTC address that you control into the "Destination" field

5. Select Bitcoin from the "Network" dropdown

6. Type in the amount you want to send or click "Max"

7. Click "Continue", then confirm the transaction.

Is ckBTC wrapped?

ckBTC isn't considered a wrapped token because it doesn't involve centralized custodians or bridges to work. More than a token, while ckBTC implements the ICRC-1 fungible token standard, it is a pair of canister smart contracts that allow bitcoin to be freely sent between addresses either on the Bitcoin network or the Internet Computer, making it the first true multi-chain asset.

How does ckBTC compare to the Lightning Network?

The Lightning Network is the most well known Layer-2 for Bitcoin. Like ckBTC, it allows fast and cheap transfers of BTC value off the Bitcoin blockchain.

Unlike Lightning, ckBTC does not require peer-to-peer payment channels to be established and funded. This means that your full ckBTC balance can always be transferred — no network liquidity limitations.

Canister smart contracts can programmatically hold and transfer ckBTC, making it possible to develop fully onchain Layer-2 applications for Bitcoin, which is not possible using the Lightning Network.

Another key difference is that ckBTC transaction fees are fixed, and not dependent on the transaction amount, variable intermediate forwarding, or unexpected channel funding fees.

In the future, ckBTC will be available on other networks like Ethereum – also directly, and without bridges, thanks to chain-key cryptography integrations.

Security

Does ckBTC incorporate KYT?

Yes, cross-chain transactions go through KYT checks to protect honest users. Know Your Transaction (KYT) is a process that monitors and tracks financial transactions in order to detect and prevent fraudulent or criminal activity, such as money laundering or terrorist financing.

If ckBTC were to operate without a KYT implementation, there would be a risk of 'tainted' bitcoin entering the Internet Computer, that an honest user could unknowingly withdraw. Such bitcoin may be rejected by CEXs, which means honest users could potentially lose their bitcoin when trying to sell.

KYT is an important security component of ckBTC. Read more about how ckBTC implements KYT and the motivation behind it in this forum post.

Were there any security audits done for BTC integration and ckBTC?

Yes, BTC integration and ckBTC have undergone a security audit by Trail of Bits in 2023 with no severe issues found.

More details on the audit

Resource Center

Navigate your way through the technical aspects of Bitcoin integration and ckBTC.

Technical overview of Bitcoin integration

Technical overview of ckBTC

Blog: ckBTC

Native bitcoin API

Code native bitcoin

Security audit