Bitcoin Integration Layer
The Bitcoin Integration Layer is responsible for anchoring IBVM state to the Bitcoin blockchain and managing the movement of BTC between the base layer and IBVM.
BTC Bridge Protocol
The bridge protocol uses a combination of threshold signatures and time-locked contracts to enable secure deposits and withdrawals.
Deposit Process
User initiates deposit by sending BTC to a special bridge address
Bridge monitors for deposit transactions on the Bitcoin blockchain
Upon confirmation (typically 6 blocks), the bridge contract mints equivalent BTC tokens on IBVM
The deposit is recorded in the IBVM state with a reference to the Bitcoin transaction
Mathematical representation:
Let $TX_{BTC}$ be the Bitcoin transaction
Let $Addr_{bridge}$ be the bridge address
Let $Amount_{BTC}$ be the deposit amount
Let $User_{addr}$ be the user's IBVM address
The bridge contract executes: $IBVM.mint(User_{addr}, Amount_{BTC}) \iff TX_{BTC}.recipient = Addr_{bridge} \land TX_{BTC}.confirmations \geq 6$
Withdrawal Process
User initiates withdrawal from IBVM
System burns the equivalent BTC tokens on IBVM
Bridge validators sign a multi-signature transaction
After the challenge period expires, BTC is released to the user's Bitcoin address
Mathematical representation:
Let $H_s$ be the IBVM state root before withdrawal
Let $H_{s'}$ be the IBVM state root after withdrawal
Let $Proof_w$ be the validity proof for the withdrawal
Let $Addr_{BTC}$ be the recipient's Bitcoin address
The bridge validators verify: $Verify(H_s, H_{s'}, Proof_w) = true$
Then execute: $TX_{withdrawal} = Sign_{threshold}(Addr_{BTC}, Amount_{BTC})$
Commitment Scheme
The commitment scheme anchors IBVM state roots to the Bitcoin blockchain, using an efficient representation to minimize on-chain data.
The state root $H_s$ is a Merkle root of all accounts and their states in IBVM
For each batch of transactions, a new state root $H_{s'}$ is computed
A ZK-SNARK proof $\pi$ is generated that verifies the correctness of the state transition from $H_s$ to $H_{s'}$
The commitment $C = Hash(H_{s'} || \pi)$ is stored on the Bitcoin blockchain
This commitment uses OP_RETURN or Taproot to store the minimal footprint on Bitcoin:
OP_RETURN <IBVM_IDENTIFIER> <BATCH_ID> <STATE_ROOT_HASH> <VALIDITY_PROOF_HASH>
Last updated