Skip to main content

Code Bitcoin

The Internet Computer is cryptographically integrated with the Bitcoin network. The canister smart contracts it hosts can create bitcoin addresses, and send and receive bitcoin, directly on the Bitcoin ledger. This means "wrapped bitcoin" from insecure centralized "bridge" services, which have been hacked for billions of dollars, are no longer needed in DeFi and Web3. Say hello to 1-chain-is-many-chains!

How It Works

Two key technology developments make it possible for Internet Computer smart contracts to create bitcoin addresses and directly send and receive bitcoin: inter-node communication between the Internet Computer network and the Bitcoin network, and the use of novel chain key ECDSA cryptography by its protocols.

Network Integration

When the Internet Computer blockchain creates transactions for the Bitcoin blockchain, its nodes directly transmit the transaction to the Bitcoin network's nodes, without any need for intermediaries that might censor them. Internet Computer nodes also directly pulls blocks from the Bitcoin network to maintain Bitcoin's current UTXO set.

Chain Key ECDSA

Novel "threshold cryptography" enables the Internet Computer to distribute, and redistribute, secret key material among its nodes, and have them cooperate to create new bitcoin addresses and sign Bitcoin transactions, using highly fault tolerant decentralized network protocols that are resilient to attacks by malicious nodes.

With the Bitcoin API and ECDSA API, canisters can directly securely receive, hold, and send bitcoins, as though they were smart contracts actually hosted on the Bitcoin network itself.

This means bitcoin can be easily and securely incorporated into DeFi and Web3 services on the Internet Computer, without the need to trust bridging services that might get hacked, or taken down, causing the loss of the bitcoin involved.

For example, DEXs (decentralized exchanges) can easily provide BTC trading pairs, decentralized fundraises can accept bitcoin, and a Web3 SocialFi service might allow satoshis to be sent using chat messages.

Lightning Network-like services can also be created by wrapping bitcoin inside fully autonomous Internet Computer smart contracts, such that bitcoin can be sent between users, Web3 services and DeFi contracts, in only 1-2 seconds.

Start building

Release Timeline

August 2022

Beta Release

Bitcoin integration

Bitcoin Testnet

Threshold ECDSA

ECDSA test key, deployed on a medium-replication-factor subnet

Example code & doc

Example dApps & web-based documentation

On-chain-tradable asset

n.a.

Purpose

Development, Bitcoin testing and threshold ECDSA canisters

Status

Experimental

Bug Fixes

Code Audits

Developer Feedback

Performance Updates

Operational Experience

2022

GA Release

Bitcoin integration

Bitcoin Mainnet

Threshold ECDSA

Production ECDSA key, deployed on two high-replication-factor subnets

Example code & doc

Additional video tutorials

On-chain-tradable asset

ckBTC Bitcoin (advanced wrapped Bitcoin)

Purpose

Production use of Bitcoin and threshold ECDSA canisters

Status

Production

Bitcoin Videos

From concept to coding - learn all about the Bitcoin Integration feature on the Internet Computer through these videos.

Explore more videos

Interview

The What, the How and Why of Bitcoin Integration

With Andrew Chepreghy & Manu Drijvers

Code Bitcoin

Directly process bitcoin on the Bitcoin ledger using ICP smart contracts. Add bitcoin to your ICP Web3 services or create native Bitcoin DeFi.