Bitcoin Smart Contracts on the Internet Computer

Coding Bitcoin

Canister with Bitcoin
The Internet Computer integrates at the protocol level with the Bitcoin network. A canister smart contract, the Bitcoin canister, holds the complete set of unspent transaction outputs (UTXOs) of the Bitcoin network in an efficiently-queryable form. A new Bitcoin block appearing in the Bitcoin network is immediately ingested and processed. Any canister on the Internet Computer can query the Bitcoin canister to obtain the balance or UTXO set for any Bitcoin address, as well as current transaction fees. Furthermore, a canister can sign a transaction using chain-key ECDSA signatures, an advanced form of threshold ECDSA, and submit the transaction to the Bitcoin network.
Synced Bitcoin Block Height
Info circle

The block height of the Bitcoin blockchain up to which the Bitcoin canister has synced. This usually lags the Bitcoin blockchain by only a few seconds, which is the time that it takes a mined Bitcoin block to propagate through the Bitcoin network, and to be ingested into the Internet Computer and processed by the Bitcoin canister.

-
Expand chart
Tracked Bitcoin UTXOs
Info circle

The number of Bitcoin unspent transaction outputs (UTXOs) that are being tracked by the Bitcoin canister. This is very close to the number of UTXOs on the Bitcoin network. Differences between this figure and the number of UTXOs on the Bitcoin network are explained by the slight lag of ingesting Bitcoin blocks as well as the UTXOs of unstable blocks, i.e., blocks that are not yet settled and can help resolve forks.

-
Expand chart
Bitcoin Canister Stable Memory Usage
Info circle

The amount of stable memory that the Bitcoin Canister uses to track the UTXO state of the Bitcoin network. The Bitcoin canister stores the Bitcoin UTXO set in stable memory and operates directly on data structures therein.

-
Expand chart