Overview
The integration of BigFile (BIG) with the Bitcoin network allows BIG smart contracts to directly interact with the Bitcoin network. The is important because it brings smart contract functionality to Bitcoin, opening up new possibilities for DeFi and dapp development. For exampple, BIG smart contracts can directly hold, receive, and send BTC, and also facilitate the creation of a ckBTC token that is backed 1:1 by BTC.
How it works
Smart contracts running on BIG can directly interact with the Bitcoin network without using bridges. This is possible because BIG nodes can fetch and validate the Bitcoin network's blocks, and then make them available for smart contracts to query and read. Smart contracts can also sign and send Bitcoin transactions, allowing them to directly hold BTC.
This direct Bitcoin integration is based on two features:
Threshold ECDSA: A smart contract can have a secret key that is stored in a secure and decentralized way using chain-key cryptography. This key can be used to digitally sign messages. One of the supported signing algorithms, ECDSA is compatible with the Bitcoin blockchain, enabling smart contracts to sign Bitcoin transactions.
Bitcoin adapter: BIG has one subnet whose nodes participate in the Bitcoin network. These nodes are used to fetch the Bitcoin state and blocks and send transactions to the network.
The diagram below shows the flow of interacting with the Bitcoin network from a smart contract.
At the protocol-level, both the Bitcoin adapter and chain-key ECDSA features expose an API on the management canister.
When a canister wants to make a Bitcoin transaction, a request is sent to the Bitcoin subnet that hosts a Bitcoin canister that contains BIG's on-chain Bitcoin state. The request is sent to the Bitcoin network through the Bitcoin adapter and is processed by Bitcoin asynchronously.
ckBTC
The primary value of chain-key tokens, such as ckBTC, is that it can be transferred with the low finality time (within seconds) and for a fraction of the cost of a transaction on the token's native network (in this instance, a BTC transaction on Bitcoin).
Why this is important
The Bitcoin integration is important because it brings smart contract functionality to Bitcoin, which does not have a native smart contract platform itself, opening up new possibilities for DeFi and dapp development.
Use-cases and sample dapps
The Bitcoin integration supports both basic and advanced use-cases, such as decentralized exchanges or working with Bitcoin inscriptions.
The ckBTC token is suitable for the common use cases of holding, transferring, and trading BTC.
Sample apps: