The claim mechanism is how a Bitcoin holder converts their QBTC entitlement into spendable QBTC. Everything described here is implemented inDocumentation Index
Fetch the complete documentation index at: https://docs.qbtc.net/llms.txt
Use this file to discover all available pages before exploring further.
x/qbtc in the chain code.
What’s in QBTC’s state
At genesis, the chain ingests a snapshot of the Bitcoin UTXO set. For every UTXO at the reference height, QBTC stores a claim entry that includes:- The Bitcoin Hash160 (the 20-byte address hash).
- The UTXO’s BTC amount, scaled 1:1 to QBTC.
- An
EntitledAmountfield, initially set to the claim amount and decremented to 0 when claimed.
ebifrost (see Architecture), the mirror updates:
- New UTXOs add new claim entries.
- Spent UTXOs are reconciled.
- Coinbase outputs add new claim entries; Bitcoin miners receive a corresponding QBTC claim.
The proof
To claim, a holder submits aMsgClaimWithProof transaction containing:
- A PLONK zero-knowledge proof of ownership of a Bitcoin address.
- The list of UTXOs to claim, up to 50 UTXOs per transaction.
- A destination QBTC address.
- Hash160 of the Bitcoin address being claimed.
- The destination QBTC address.
- The Bitcoin public key.
- The Bitcoin private key.
- An ECDSA signature.
Validator handling
When a validator receives aMsgClaimWithProof, the handler (x/qbtc/keeper/handle_msg_claim_with_proof.go) executes:
- Proof verification. The on-chain PLONK verifier checks the proof against the public inputs.
- For each claimed UTXO:
- Verify the UTXO exists in QBTC’s state.
- Verify its
EntitledAmount > 0(not previously claimed). - Verify the UTXO’s stored Hash160 matches the proven address.
- Atomic disbursement. If any check fails, the entire batch reverts (cache-context semantics). If all pass, the cumulative
EntitledAmountis transferred to the destination, and each claimed UTXO’sEntitledAmountis set to 0.
Double-claim prevention and taint propagation
A claimed UTXO hasEntitledAmount == 0. Any subsequent attempt to claim it fails at step 2 of validator handling.
The claimed status also propagates through Bitcoin spends. When the ebifrost module ingests a new Bitcoin block, any transaction whose inputs include claimed UTXOs carries the claimed status to its outputs in proportion to the value contributed by claimed inputs. A child of a fully-claimed parent has EntitledAmount = 0 and cannot be claimed. A child of a partially-claimed set of parents inherits a proportionally-reduced EntitledAmount.
Propagation makes governance reclamation (see Tokenomics) permanent: once a UTXO is reclaimed into the Reserve Module, the Bitcoin holder cannot recover the QBTC entitlement by spending the UTXO to a new address.
What claims do not do
- Claims do not move BTC. Your Bitcoin remains on the Bitcoin chain after claiming.
- Claims do not expire. An unclaimed entry sits in QBTC’s state indefinitely.
- Claims do not require any prior registration.
Proof generation
Proofs are generated client-side. Two paths exist:- Native wallet flow. An established multi-chain MPC wallet partner is implementing native ML-DSA signing and ZK claim-proof generation, with rollout planned at mainnet. Users see claiming as a normal in-wallet action. The partner will be named ahead of launch.
- Hosted proof service. Independent operators run
proof-serviceHTTP endpoints that wallets can use to offload computation on constrained devices. Multiple operators run these so users can choose. - Local CLI prover.
zkproverlets advanced users generate proofs themselves.
References
x/qbtc/keeper/handle_msg_claim_with_proof.go: handler logic.x/qbtc/zk/: PLONK circuit definition.proto/qbtc/qbtc/v1/msg_claim_with_proof.proto: message format.- Protocol Specification §2.3, §2.4.