~/bitcoin-payments/spec
[llms.txt][github]

v2 (v3.1.0-rfc) · public rfc · zero-federation · not mainnet-active

[changelog]

Part 1: Zero-Federation Bitcoin Taproot Vault Enforcement (BTC-BITVMX-V1), Stage 1B clArk Gate & Track B Soft-Fork Annex

Document Class: Normative Bitcoin Custody Specification (v2 / v3.1.0-rfc; supersedes archived v1 v3.0.0-rfc and v0 BTC-ENFORCEMENT-V1)
Spec Identifier: BTC-BITVMX-V1
Precedence: Highest normative layer (SPEC.md §2.1) — Bitcoin L1 scripts, deleted-key Taproot graphs, AdmissionTicketUTXOs, StakeChain timelocks, and ExitSlotUTXO consensus rules cannot be overridden by any Zenon contract, Pillar, or spork.
Target Chain: Bitcoin Mainnet TODAY (bip-0141 SegWit, bip-0340 Schnorr, bip-0341 Taproot, bip-0342 Tapscript, bip-0068/bip-0112 relative CSV timelocks, bip-0431 TRUC v3 + 0-sat P2A ephemeral dust + 1P1C package relay requiring Bitcoin Core >= 29.0, v31.0 preferred — zero Bitcoin soft forks, zero custodial federated multisigs)
Consistency Checker: scripts/verify_spec_bounds.py


1. Cryptographic Boundaries (Proposition 1 & Proposition 2) & Prohibition of Federated Custody

1.1 Explicit Prohibition of Custodial Federated Multisigs

Pooled custodial k-of-n multisig federations (whether OP_CHECKSIGADD, FROST, or HSM-backed, with or without custodial backup recovery leaves) are STRICTLY FORBIDDEN in v2. Federated custody introduces up to 100% collusion loss, breaks liveness whenever n - k + 1 signers refuse to sign Mike's 0.25 BTC exit, and stalls under 49% Zenon DPoS consensus splits.

1.2 Formal Boundary Propositions

Proposition 1 (4-Way Impossibility of Pure 0-of-N Arbitrary Unilateral Exit on Bitcoin Mainnet Today): On Bitcoin Mainnet today (BIP-340/341/342, zero covenant soft forks), no protocol can simultaneously achieve: (1) pooled cross-depositor deposit UTXOs U_A (1 BTC), U_B (1 BTC) created at t_0, (2) 0-of-N unilateral liveness at t_1 allowing an unknown future recipient Mike (P_Mike, 0.25 BTC unknown at t_0) to spend U_A or U_B paying 0.25 BTC → P_Mike while locking 0.75 BTC back into custody with zero new signatures at t_1, (3) zero per-hop key-deletion / statechain trust across prior owners, and (4) non-expiring fungible liquidity:

  1. BIP-342 Tapscript lacks output introspection (nValue/scriptPubKey); any spend succeeding without a signature committing to outputs is trivially RBF-replaced by miners substituting (1.0 BTC → P_miner).
  2. Pre-signed transactions at t_0 using SIGHASH_ALL/SINGLE fix outputs before (P_Mike, 0.25 BTC) exist; SIGHASH_NONE permits total theft.
  3. Corollary 1A (Bob's 0.5 BTC): Depositor CSV refund leaves on active admitted vault U_B are forbidden after fungible minting (Bob would spend 0.5 zBTC then reclaim 1.0 BTC via CSV).
  4. Corollary 1B (Optimistic Reimbursement Bound): On Bitcoin Mainnet today, every BitVM-family bridge (BitVM2/BitVMX/BitVM3) requires 1-of-N ephemeral setup deletion + challenger/verifier safety + 1-of-M pre-committed operator exit liveness.

Proposition 2 (Young Low-Cap Engineering / Capital / Trust Trilemma — 0 Federation, 0 Soft Forks, ~25–33 BTC ZNN MCap): With 0 federated signers, 0 soft forks, and 0% ZNN slashing usable (~25–33 BTC ZNN mcap), no current Bitcoin Script / ZK-proving design fits inside 2–20 BTC total hard capital while simultaneously achieving (A) instant non-expiring fungible cross-depositor zBTC, (B) 1-of-∞ permissionless challenging surviving 200–500 sat/vB, and (C) 0-of-N unilateral arbitrary L1 exit:

  • Minimal BitVM2 (M = 3–5, L = 1) fails C ≤ 20 BTC: Current Groth16 AssertTx (~1.0–1.3M vB / 4.0–4.8 MB W-OTS) imposes 13.30–18.175 BTC/lane (39.9–90.9 BTC in bonds alone before fronting liquidity; under-bonding breaks above 50 sat/vB).
  • Stage 1A Right-Sized BitVMX (n = 8, M = 3–5, L = 1, N = 7) achieves (A) with 12.80–18.80 BTC locked protocol capital (14.75–21.25 BTC single-dispute operational baseline; ~17–26+ BTC multi-dispute headroom) by accepting 1-of-N (N = 7) pre-committed online verifiers and 1-of-M (M = 3–5) operator liveness.
  • Stage 1B clArk achieves post-round (C) inside 2–5 BTC by sacrificing (A) (discrete expiring VTXOs, pre-round arkoor sender+ASP collusion, no global pooled zBTC).
Custody TrackSoft Fork?Bootstrap Hard BTCZenon Trust (49%–100%)Custody SafetyMike 0.25 BTC Liveness (0 Zenon Signers)Status in v2
Stage 0 (SPV + PTLC/LN)No0 BTC bonds (0–5 LP)0-of-NPure self-custody (conditional on bounded chain progress)N/A (no pooled zBTC)Mandatory Stage 0
Stage 1A (BitVMX n=8 Rollup)No (Core >= 29.0)14.75–21.25 BTC op baseline (12.8–18.8 locked; 17–26+ multi-dispute)0-of-N1-of-N setup/cohort + 1-of-7 online verifier (native L1 payouts)1-of-M (M=3–5) op (~10m front; 94–104d 100% run; 0-of-M locks BTC)Primary Stage 1A (pre-mainnet R&D)
Stage 1B (clArk VTXOs)No (Today)2–5 BTC liq0-of-NPost-round 0-of-N (pre-round arkoor trusts ASP)Post-round 0-of-N until expiry (whole VTXO)Explicit Stage 1B Alt
Appendix A: Track B Covenant+ZKYes (OP_CCV+ZK or OP_CAT)0 BTC bonds0-of-NPure 0-of-NPure 0-of-N (1 L1 tx direct from pooled UTXO)Non-Normative Annex

2. Stage 1A Deleted-Key Vaults, Acyclic Deposit Ceremony, L1 AdmissionTicketUTXO & Zero-TTP Cohort Rule

2.1 Multi-Tier Vault Split ({0.50, 0.25, 0.25} BTC)

Every 1.0 BTC deposit splits at deposit time into three standardized deleted-key vault UTXOs:

  • Canonical Stage 1A Split: {0.50, 0.25, 0.25} BTC (3 vaults/BTC, average vault 0.333 BTC, maxVaultDenom = 0.50 BTC).
    • Bob's 0.50 BTC recovery maps 1:1 to a 0.50 BTC vault immediately; Mike's 0.25 BTC recovery maps 1:1 to a 0.25 BTC vault immediately; arbitrary non-bucket amounts (>= MIN_EXIT_SATS = 100,000 sats = 0.001 BTC) are paid in exact satoshis by FrontingTx and batched via ReimbursementCredit[O_j] (plus TransferCredit for < 0.25 BTC residual consolidation, spec/03 §2.4) until hitting an available 0.25/0.50 BTC vault (zero new presigning needed).
    • Throughput Option: Deployments prioritizing faster bank-run recycling over direct 0.25 BTC vault mapping may configure {0.50, 0.50} BTC (2 vaults/BTC, avg 0.50 BTC, reducing 100% bank-run duration by ~33% with identical maxVaultDenom = 0.50 BTC and zero bond increase).

2.2 Acyclic DepositTx Ceremony With L1 AdmissionTicketUTXO Cap Exclusion (Closes R8-C01, R8-C03, R8-H06)

Because vk_STF is immutably hard-pinned and never rotates with PoS epochs, Stage 1A vault graphs carry no CLTV expiration and never require re-graphing. There is NO ProvisionalDepositScript, NO RolloverTx, and NO standing CommitteeIdentityKey:

  1. Confirmed Self-Custodial Staging UTXO (U_dep_wallet) & Acyclic vault_id (R8-C01):
    • Depositor first confirms 1.0 BTC + fee on Bitcoin L1 in staging UTXO U_dep_wallet (funding_txid:funding_vout, Tapscript OP_DROP <pk_depositor> OP_CHECKSIG).
    • Because funding_txid:funding_vout is already confirmed on-chain and Bitcoin consensus prevents spending U_dep_wallet twice, each output vault vout ∈ {0, 1, 2} has a globally unique, pre-Taproot-construction deterministic identifier:
      vault_id = SHA256("zbtc:vault-id:v1" || funding_txid(32B) || u32BE(funding_vout)
                        || u32BE(vault_vout) || u64BE(amount_sats) || u64BE(opBitmask))
      
      Zero SHA-256d fixed-point cycle: Every vault's Lamport TakeTx Tapscript leaf commits to vault_id (NOT SHA256(outpoint_d)!), so Taproot script construction, Q_setup_d Taproot tweaking, and txid_dep computation form a strict DAG.
  2. L1 Consensus Cap_TVL Mutual Exclusion via Denomination-Matched AdmissionTicketUTXOs (R8-C03):
    • At cohort genesis, setup mints exact denomination-matched 546-sat AdmissionTicketUTXO connectors matching the total vault cap Cap_TVL_total = Cap_user + M × B_zbtc (e.g., for M = 5, Cap_user = 15.0 BTC + 3.0 BTC operator B_zbtc = 18.0 BTC total vaults ⇒ 18 × Ticket_050 + 36 × Ticket_025 = 54 tickets totaling 29,484 sats; operator initial B_zbtc deposits consume their dedicated M × 0.60 BTC allocation, leaving exact 15 × Ticket_050 + 30 × Ticket_025 for 15.0 BTC of external user deposits!).
    • Every 1.0 BTC DepositTx MUST spend vin[0] = U_dep_wallet AND vin[1] = Ticket_050, vin[2] = Ticket_025, vin[3] = Ticket_025 (signed via cohort ticket key with zero BTC value risk — tickets carry 546 sats dust only) → vout[0..2] = vault UTXOs U_0 (0.50 BTC), U_1 (0.25 BTC), U_2 (0.25 BTC) + vout[3] = 69 B standard OP_RETURN:
      OP_RETURN <"ZBTX"(4B) || 0x00(1B) || recipientAcctHash(32B) || vaultParamsHash(32B)>
      
    • Every pre-signed TakeTx_{d,j,l,r} spending vault U_d recreates the exact matching-denomination AdmissionTicketUTXO at vout[1] (Ticket_050 or Ticket_025), so Bitcoin L1 consensus itself enforces sum(live_vaults) <= Cap_TVL_total by strict UTXO conservation! If two depositors race across the last remaining slot, Bitcoin consensus confirms at most ONE DepositTx; the loser's DepositTx fails with missing-inputs and the loser's 1.0 BTC never leaves U_dep_wallet (0 BTC burn!).
    • (Optional Alternative — Two-Stage PreDepositUTXO:) Deployments opting out of ticket connectors MAY instead lock 1.0 BTC first into PreDepositUTXO (MuSig2(Q_setup_d) OR (<144> OP_CSV <pk_depositor>)), deferring ephemeral key deletion and sweep into the active vault until K-deep slot admission confirms. Normative Prohibition: An active admitted vault U_d MUST NEVER retain an unconditional depositor CSV leaf (Corollary 1A). AdmissionTicketUTXO is the normative Stage 1A default.
  3. Ephemeral Deleted-Key Presigning & Hall's Marriage Admission Check (R8-C04):
    • Before presigning, presigners verify that admitting {U_0, U_1, U_2} with opBitmask satisfies the $2^M$ Hall's Marriage Invariant (§6.2).
    • Depositor + N = 7 presigners + all online operators (≥ M_min, encoded in opBitmask u64) generate fresh per-deposit ephemeral keys (x_{i,d}, P_{i,d}) (including the depositor's own ephemeral key P_{dep,d}!) forming Q_setup_d = MuSig2_KeyAgg(P_{1,d}, ..., P_{N,d}, P_{dep,d}). They presign ONE TakeTx_{d,j,l,r} per eligible operator lane (j, l) and unused round r ∈ {r_cur..R} (Stage 1A M = 5, L = 1, R = 64 ⇒ 320 pre-signed TakeTxs per vault, ~40 KB off-chain, < 100ms batch MuSig2 ONCE at deposit).
  4. Immediate Ephemeral Key Deletion, Non-Spending Attestation & Public zbtc-vault-bundle-v1 DA (R8-H06):
    • Each presigner i permanently deletes x_{i,d} and signs a non-spending identity attestation σ_cert (64 B MuSig2 over id_1..id_N, co-verified by eligible operators) covering (txid_dep, Q_setup_d, opBitmask, vaultParamsHash):
      certBlob = σ_cert(64B) || Q_setup_d(32B) || opBitmask(8B)   [exact 104 B <= 520 B BIP-342 limit]
      
    • The ceremony MUST publish the canonical zbtc-vault-bundle-v1 artifact (vault_id, funding_txid:vout, DepositTx, full Taproot Merkle tree scripts & control blocks, all L_{j,l,r} Lamport & W-OTS pubkeys, certBlob, and all 320 pre-signed TakeTxs, content-addressed by SHA256(bundle)) to >= 3 independent public archival mirrors (IPFS/Arweave/Git/HTTP mirrors operated independently of operators).
  5. Zero-Stranding Broadcast: Only after verifying every pre-signed TakeTx, σ_cert, and cryptographic retrieval of zbtc-vault-bundle-v1 from >= 3 public mirrors does the depositor delete x_{dep,d}, push witness stack [sig_depositor, certBlob, script, controlBlock] into DepositTx.vin[0].witness, and broadcast. Because witness stacks are excluded from txid_dep and authenticated by wtxid_dep in the coinbase BIP-141 witness commitment, there is zero hash cycle. At K = 18 confirmations, the Rollup STF (spec/02 §3) verifies real satoshi outputs, AdmissionTicketUTXO consumption, Taproot script derivation from vault_id, σ_cert, and Hall's invariant, and credits 1.0 zBTC.

2.3 Zero-TTP Cohort Lifecycle Rule (R8-C06 Clarified)

Inside a single fungible zBTC pool, NO governance key, Pillar vote, or threshold committee can EVER add a new presigner cohort:

  1. Voluntary Handover (Same vk_STF Only): Only N-of-N (7-of-7) of Cohort 1 (preserving strict 1-of-N safety!) may sign a handover certificate registering Cohort 2.
  2. Involuntary 1-of-N id_i Key Loss: All existing Cohort 1 vaults carry no CLTV expiration and remain safe and redeemable 1:1 to native BTC strictly subject to 1-of-M active eligible operator liveness (zero id_i bricking), while new deposits on v1 halt cleanly. Future deposits launch a clean, non-commingled sovereign deployment (zBTC_v2) with fresh Cohort 2. (Long-term id_i uses redundant HSM backup; ephemeral x_{i,d} is NEVER backed up.)
  3. Explicit Residual Open-Cohort Bound: While a cohort accepts new deposits, at least 1-of-N {id_1..id_N} must remain uncompromised (otherwise all N compromised id_i keys could attest a fake new deposit into the shared pool; existing deleted-key vaults still cannot be swept directly).

3. Right-Sized BitVMX (n = 8, RV32IM) StakeChain, Acyclic 256-Bit Lamport TakeTx & Core >= 29.0 TRUC v3 Wiring

3.1 Launch-Time StakeChain & PoW Anchor (t = 0, M = 3–5, L = 1, N = 7, R = 64)

Before accepting deposits, each operator O_j (j ∈ {1..M}) launches L = 1 serial StakeChain lane (j, l) (R = 64 finite rounds):

  • Launch-Time Bitcoin PoW Anchor (Zero Pre-Broadcast Cycle): Each lane pins an already-confirmed Bitcoin block (h_lane_init, H(h_lane_init), D(h_lane_init)) inside its wrapped SNARK verifier vk_STF at t = 0 (before Q_lane_{j,l} deletion). Header verification inside the off-chain ZK prover enforces full Bitcoin PoW + 2,016-block retargeting from h_lane_init with minimum difficulty floor D(h) ≥ 0.50 × D(h_lane_init) across the lane's finite R = 64-round horizon, PLUS interactive heaviest-chainwork competing-header comparison (spec/02 §4).
  • Halving-Indexed Confirmation Depth (K >= 18 Hard Minimum Floor, R8-H03): Sized via the conditional unpublished-fork opportunity-cost heuristic 0.50 × K × Subsidy(era) > Cap_TVL_total (Cap_user + M × B_zbtc), subject to a hard minimum floor K >= 18 (~3.0h nominal):
    • Cap_user ≤ 10 BTC (11.80 BTC total incl. M=3 B_zbtc): K = 18 (28.125 BTC floor / 56.25 BTC nominal in 2024–2028).
    • Cap_user ≤ 15 BTC (18.00 BTC total incl. M=5 B_zbtc): K = 18 (28.125 BTC floor / 56.25 BTC nominal in 2024–2028).
    • Cap_user ≤ 50 BTC (62.00 BTC total, Stage 2): K = 42 (65.625 BTC floor / 131.25 BTC nominal).
    • Cap_user ≤ 200 BTC (224.00 BTC total, Stage 2): K = 144 (225.00 BTC floor / 450.00 BTC nominal). (See spec/02 §4 for full Budish winning-fork subsidy-offset disclosure and 2028–2036 halving table.)
  • Pre-Signed Linear StakeChain (Stake_0 → RoundTx_1 → Stake_1 → ... → RoundTx_R):
    • O_j locks Bond_BTC = 2.00 BTC in Stake_0 under ephemeral Q_lane_{j,l} (all N = 7 presigner ephemeral shares permanently deleted after presigning the R = 64 rounds!).
    • Each round r ∈ {1..R} binds a one-time 256-bit Lamport keypair L_{j,l,r} (256 OP_HASH160 pairs (H_{k,0}, H_{k,1})) signing the acyclic pre-funding vault_id (§2.2).
    • RoundTx_r (spends Stake_{r-1} after <1,872> OP_CSV, revealing 256 Lamport preimages = 5,376 B witness ≈ 1,344 vB, total RoundTx_r ≈ 1.8 kvB ≤ 10,000 vB TRUC v3) creates:
      • Out 0 = Stake_r (Bond_BTC = 2.00 BTC):
        • Leaf 1 (Next Round): <1,872> OP_CSV (13.0d — enforces W_max = 1 active kickoff per lane on L1!) → RoundTx_{r+1}.
        • Leaf 2 (Clean Retirement): <2,016> OP_CSV (14.0d) → RetireStakeTx_r (returns 2.00 BTC to O_j; spending Stake_r permanently double-spends and kills RoundTx_{r+1..R} forever! The STF forbids unlocking O_j's B_zbtc until RetireStakeTx_r confirms K-deep, AssignedObligations[O_j] == 0, AND removing O_j's remaining rounds satisfies Hall's Marriage Invariant §6.2!).
        • Leaf 3 (Native-L1 Multi-Challenger Bisection Slash — Closes R8-H02 & R8-N05): Immediate → DisproveTx_{r,i} / TimeoutSlashTx_{r,i} (MUST spend BOTH vin[0] = Stake_r AND vin[1] = VaultConnector_r!) paying:
          • vout[0] = 0.15 BTC immediately in native Bitcoin L1 BTC to winning verifier P_{V_i},
          • vout[1..6] = 6 × 0.15 BTC ChalPayoutEscrow_{r,j} (j ≠ i) — each a 2-leaf Taproot output: Leaf 1 co-spends ChalProofConnector_{r,j} (created ONLY when V_j actually broadcast ChallengeTx_{r,j} during [0, 144]) + <P_{V_j}> OP_CHECKSIG → pays 0.15 BTC native L1 BTC directly to P_{V_j}; Leaf 2 <144> OP_CSV → pre-signed OP_RETURN burn if V_j did NOT challenge!
          • vout[7] = 0.95 BTC immediate OP_RETURN burn (0.95 min burn if all 7 challenge; up to 1.85 BTC burn if 1 challenges!),
          • vout[8] = 0-sat P2A ephemeral anchor! (Zero 2^7 = 128 subset explosion: only 7 pre-signed DisproveTx/TimeoutSlashTx pairs per round + 6 tiny 2-input claim/burn txs per verifier!)
        • Leaf 4 (256-Leaf Lamport Equivocation Slash, Depth 8, Pre-Signed at t = 0): Leaf k ∈ [0..255] verifies OP_HASH160 <H_{k,0}> OP_EQUALVERIFY OP_HASH160 <H_{k,1}> OP_EQUALVERIFY <Q_lane_{j,l}> OP_CHECKSIG → BurnBondTx_{r,k} (~200 vB TRUC v3, spends Stake_r alone) burning 100% of 2.00 BTC Bond_BTC to OP_RETURN.
      • Out 1 = VaultConnector_r (546 sats): <1,728> OP_CSV (12.0d > max_dispute_end = 1,584 blks!) → ONE single TakeTx_{d,j,l,r} (OR spent immediately as vin[1] of DisproveTx_{r,i}/TimeoutSlashTx_{r,i}, guaranteeing 0 satoshis stolen from U_d on any bisection slash!).
      • Out 2..8 = VerifierSlot_1..7 (546 sats each): Simultaneous non-staggered [0, 144] block challenge window — ALL N = 7 slots open at block 0 (<P_{V_i}> OP_CHECKSIG) and expire at <144> OP_CSV (24h). Each ChallengeTx_{r,i} creates BOTH ChalEscrow_{r,i} (F_chal = 0.40 BTC) AND a 546-sat ChalProofConnector_{r,i} unlocking V_i's 0.15 BTC native L1 payout in ChalPayoutEscrow_{r,i} if O_j is slashed!
      • Out 9 = 0-sat P2A Ephemeral Anchor (0x51024e73).

3.2 n = 8 BitVMX-CPU (RV32IM) Wrapped-SNARK Verifier Bisection & Core >= 29.0 TRUC v3 Compliance (R8-H04, R8-H05)

  • Normative RV32IM Guest Computation Boundary (R8-H05 Closed):
    • The disputed RV32IM guest program running inside BitVMX-CPU (≤ 8^9 = 2^27 = 134,217,728 RISC-V instructions) is STRICTLY a constant-size wrapped SNARK verifier (vk_STF) (verifying a succinct BN254 Groth16 or compact recursive STARK proof over constant-size authenticated public inputs (h_prev, R_prev, h_tip, R_tip, claimHash, competingChainWork)).
    • Bare 1 MB Bitcoin stripped-block SHA-256 scanning and SMT reconstruction MUST NOT execute directly inside RV32IM — they run inside the off-chain ZK prover proved by vk_STF (spec/02 §3.2).
    • Mandatory Gate G2 (spec/05 §5): Before Stage 1A code freeze, the team MUST publish reproducible Rust → RV32IM source and compiled ELF binary demonstrating init_steps + exec_steps <= 0.5 × 8^9 = 67,108,864 on worst-case adversarial inputs (if exceeded, either bump search depth l = 9 → 10, 8^{10} = 1.074B steps adding +2 steps / +144 blks, or adopt reusable BitVM3-GC).
  • n = 8 Search Branching (3 bits/round, 7 × 20 B OP_HASH160 Intermediate Trace Hashes):
    • W-OTS cost per prover search tx: 7 hashes × 43 digits (40 data nibbles + 3 checksum nibbles per 20-byte hash) = 301 W-OTS digits × 95.5 WU/digit = 28,746 WU (7,186.5 vB) + ~250 vB tx overhead ≈ 7,437 vB (7.44 kvB) ≤ 10,000 vB (100% BIP-431 TRUC v3!).
    • Search depth: ceil(27 / 3) = 9 search rounds (9 prover txs + 9 verifier 3-bit interval choice txs) + 1 Start/Read (~3.0 kvB prover) + 1 Final Trace (~5.0 kvB prover) / Execute-1-RISC-V-Opcode (~8.0 kvB verifier) = 20 sequential steps.
    • Total Worst-Case Dispute Weights (INCLUDING 10 × 153 vB = 1,530 vB P2A CPFP Children, R8-H02/R8-H04):
      • Prover (O_j): 9 × 7.44 + 3.0 + 5.0 = 74.96 kvB (cap 75.00 kvB) + 10 × 153 vB P2A CPFP (1.53 kvB) = 76.53 kvB.
      • Verifier (V_i): Challenge (0.35) + 9 × 0.35 (3.15) + Execute/Disprove (8.0) = 11.50 kvB (conservative cap 15.00 kvB) + 10 × 153 vB P2A CPFP (1.53 kvB) = 16.53 kvB.
  • Widened Exact Timelock Ordering (T_step = 72 blocks = 12h/step, R8-H04):
    Challenge Window [0, 144] (24h)
      → Max Dispute End: 144 + (20 * 72) = 1,584 blocks (11.00 days)
      → VaultConnector_r (T_take):         1,728 blocks (12.00 days) [+144 blk / 24h margin]
      → Stake_r -> RoundTx_{r+1} (T_cool): 1,872 blocks (13.00 days) [+144 blk post-TakeTx equivocation margin]
      → RetireStakeTx_r:                   2,016 blocks (14.00 days) [+144 blk clean retirement margin]
    
  • Bitcoin Core >= 29.0 (v31.0 Preferred), TRUC v3 (nVersion = 3), P2A & Out-of-Band Relay Audit (R8-H04, R8-M09):
    • Normative Node Floor: Zero-value (0-sat) P2A ephemeral dust + 1P1C package relay requires Bitcoin Core >= 29.0 (v31.0 preferred; Core 28.0 rejects 0-sat P2A outputs as non-standard!).
    • Every pre-signed tx is ≤ 10,000 vB (RoundTx_r 1.8 kvB, TakeTx ~`3.17 kvB, Prover search tx 7.44 kvB, Execute-1-Opcode ≤ 8.0 kvB, Verifier choice/Slash/Burn 0.2–0.5 kvB`).
    • Zero Unconfirmed TRUC Child Chaining: Because TakeTx (~3.17 kvB) and prover search txs (7.44 kvB) exceed BIP-431's 1,000 vB child limit, EVERY protocol step spends ONLY confirmed parent outputs (ancestor_count = 1), attaching at most ONE ~153 vB ≤ 1,000 vB CPFP child via 0-sat P2A (descendant_count = 2).
    • Sibling-Eviction Mitigation: All operators and verifiers MUST maintain direct-to-miner out-of-band submission rails (e.g., Slipstream / mining-pool RPC) alongside public P2P 1P1C relay; T_step = 72 blocks (12h) absorbs prolonged sibling-eviction pinning and transient fee spikes.
  • Honest Fee-Rate Design Envelope (500 sat/vB Sustained Across ALL 20 Steps):
    • Prover worst-case fee @ 500 sat/vB (incl. 10 × 153 vB CPFP): 76,530 × 500 = 38,265,000 sats (0.38265 BTC) ≤ F_chal = 0.40 BTC (exact break-even 522 sat/vB sustained across all 10 prover txs!).
    • Verifier worst-case fee (incl. 10 × 153 vB CPFP): 16,530 × 500 = 8,265,000 sats (0.08265 BTC @ 500 sat/vB; 12,397,500 sats = 0.12398 BTC @ 750 sat/vB).

3.3 Acyclic 256-Bit Lamport TakeTx Leaf (Zero ReimburseEscrow, Zero RecoveryVault, R8-C01)

At deposit d, U_d's Tapscript leaf for (j, l, r) verifies L_{j,l,r}(vault_id) directly inside TakeTx_{d,j,l,r} (vin[0] = U_d, vin[1] = VaultConnector_r, vout[0] = D_d → P_{O_j}, vout[1] = AdmissionTicketUTXO recycled at 546 sats, vout[2] = 0-sat P2A):

# 256 iterations (k = 0..255, b_k = bit k of pre-funding acyclic vault_id):
OP_HASH160 <H_{k, b_k}> OP_EQUALVERIFY
...
<Q_setup_d> OP_CHECKSIG
  • Exact BIP-342 & TRUC v3 Weights:
    • Tapscript size: 256 × 23 + 34 = 5,922 B.
    • Preimages in witness: 256 × 21 = 5,376 B.
    • Control block: 321 B (depth 9 for 320 leaves at Stage 1A M = 5, R = 64) or 417 B (depth 12 for 2,560 leaves at Stage 2 40 lanes × 64).
    • Peak stack elements: 258 << 1,000 BIP-342 limit.
    • Total TakeTx weight (incl. VaultConnector_r input + recycled AdmissionTicketUTXO output + P2A): ~3,142 vB (depth 9) / ~3,166 vB (depth 12) ≤ 3,200 vB ≤ 10,000 vB TRUC v3 parent (must spend confirmed VaultConnector_r only).
  • Equivocation Solvency: If O_j committed vault_id_1 in RoundTx_r, passed T_take = 1,728, and broadcast TakeTx on vault_id_2 ≠ vault_id_1, O_j MUST reveal both preimages for ~128 differing bits k, letting any 1-of-∞ challenger execute BurnBondTx_{r,k} on Stake_r Leaf 4 during [1,728, 1,872] (144-blk window). 100% of 2.00 BTC Bond_BTC burns to OP_RETURN, and the STF burns D_d (≤ 0.50 BTC) from O_j's hard-partitioned B_custody (0.55 BTC) + pays 0.05 BTC equivocation bounty (and restores R[O_k] += D_d if vault_id_2 was assigned to another honest operator O_k) — keeping remaining zBTC 100% 1:1 solvent (0 user loss).

4. Native-L1, Collusion-Proof, Crisis-Discount-Immune Verifier Economics (R8-H02, R8-N05 Closed)

Every ChallengeTx_{r,i} opened by Verifier V_i during [0, 144] locks F_chal = 0.40 BTC in ChalEscrow_{r,i}, creates 546-sat ChalProofConnector_{r,i}, and appends 41 B OP_RETURN "ZBTX" || 0x04 || kickoffTxid || verifierAcctId_i:

  • ChalEscrow_{r,i} pays 0.40 BTC to O_j ONLY IF O_j wins Dispute_i (covering full 76.53 kvB honest prover fees + CPFP up to 522 sat/vB); otherwise V_i reclaims 100% of 0.40 BTC cleanly.
  • Each operator lane locks B_zbtc = 0.60 BTC inside canonical Rollup state, HARD-PARTITIONED into two non-overlapping sub-buckets (R8-H01, R8-N05):
    • B_custody = 0.55 BTC (0.50 BTC max-vault Lamport equivocation restitution + 0.05 BTC equivocation bounty; NEVER debited by ExitSlotUTXO griefing!), AND
    • B_grief = 0.05 BTC (strictly dedicated ExitSlotUTXO grief buffer).
  • 100% Native Bitcoin L1 Verifier Payouts (0% zBTC Crisis Discount, 0% R8-N05 Coupling!): Because DisproveTx_{r,i} / TimeoutSlashTx_{r,i} spends BOTH Stake_r (2.00 BTC) AND VaultConnector_r (0 BTC stolen from U_d), EVERY active honest challenger receives 0.15 BTC in native Bitcoin L1 BTC (vout[0] immediately for winner V_i, and vout[1..6] ChalPayoutEscrow_{r,j} claimed via ChalProofConnector_{r,j} for every other challenger V_j; unclaimed slots burn after 144 blks, plus 0.95 BTC minimum immediate OP_RETURN burn!). On L2, O_j's 0.55 BTC B_custody is additionally slashed to the protocol insurance/honest-verifier pool (not needed for positive verifier EV!).

Native-L1 Bisection Slash Matrix (k_collude ∈ {0..6} of N = 7 Colluding Verifiers; 16.53 kvB incl. CPFP + 0.00285 BTC lockup + 30% zBTC crisis discount):

Colluding Verifiers (k_collude)Vault StolenEvery Active Honest Verifier L1 Payout (Stake_r)Min Stake_r L1 BurnedHonest Verifier Net EV @ 500 sat/vB (0.08265 fee + 0.00285 lockup)Honest Verifier Net EV @ 750 sat/vB (0.12398 fee + 0.00285 lockup)Combined (O_j + k_collude) Net P&L (L1 Only / Incl. B_custody)
0 (all honest)0.00 BTC0.1500 BTC native L10.95–1.85 BTC+0.0645 BTC+0.0232 BTC-2.00 BTC L1 / -2.55 BTC total
1 (V_1 throws & claims L1)0.00 BTC0.1500 BTC native L10.95–1.70 BTC+0.0645 BTC+0.0232 BTC-1.85 BTC L1 / -2.40 BTC total
6 (worst case: ONLY V_7 honest; V_1..V_6 claim L1)0.00 BTC0.1500 BTC native L10.95 BTC+0.0645 BTC (V_7 strictly profitable!)+0.0232 BTC (V_7 STILL profitable!)-1.10 BTC L1 / -1.65 BTC total

*Result: Even under 6-of-7 verifier collusion, 750 sat/vB sustained fees with 10 × 153 vB P2A CPFP, 0.00285 BTC lockup cost, 100% B_grief exhaustion (R8-N05), AND a 30% (or even 100%!) zBTC crisis discount, the lone honest verifier V_7 earns +0.0645 BTC @ 500 sat/vB (+0.0232 BTC @ 750 sat/vB, break-even 890 sat/vB), while the cheating cartel loses -1.10 to -2.00 BTC on Bitcoin L1 alone (-1.65 to -2.55 BTC incl. B_custody) with 0 sats stolen from users!*


5. Atomic Active-Operator (2M_active + 1)-Leaf ExitSlotUTXO (Cyclic Priority, Zero B_custody Overflow — R8-H01, R8-M03, R8-N01)

Every Stage 1A exit (grossSats >= max(dust(destScriptPubKey), MIN_EXIT_SATS = 100,000) sats — R8-M05) — both hostile L1 0x01 FORCED_EXIT and cooperative 0x02 BATCH_DA exits — outputs a 546-sat ExitSlotUTXO (P2TR, unspendable H_NUMS internal key) containing ONLY currently active, non-suspended operators M_active <= M from canonical state R_{h-1} (2M_active + 1 Tapscript leaves, zero anonymous OP_TRUE leaves!):

  • Leaves 0 .. M_active - 1 (Collision-Free Cyclic Priority Windows — Closes R8-M03): <6*r> OP_CSV OP_DROP <P_{O_{k_r}}> OP_CHECKSIG where k_r = (H(exitId) + r) mod M_active (0% repeat across r = 0..M_active - 1!).
  • Leaves M_active .. 2M_active - 1 (Registered Open Race After 6*M_active Blocks): <6*M_active> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIG for each active operator O_j.
  • Leaf 2M_active (EXIT_CANCEL): <288> OP_CSV OP_DROP <cancelPubKey> OP_CHECKSIG (288 > 6*M_active blks).

Universal STARK Spend-or-Refund Rule (K-deep spend of ExitSlotUTXO, R8-H01 Hardened):

  1. Valid Fronting (Leaf 0..2M_active-1 AND vout[0] == (destScriptPubKey, ≥ grossSats - f_op)): Exit marked COMPLETED; ReimbursementCredit[O_j] += grossSats (tagged with the exit's creation height for oldest-PendingExit reimbursement priority — R8-N01!). Bitcoin L1 UTXO exclusion makes double-fronting and refund-vs-front races (M-8) cryptographically impossible.
  2. Non-Paying Operator Grief Spend (Leaf 0..2M_active-1 AND vout[0] fails payout check — Even in a k = 20 Single-Block Burst!): STF atomically cancels EVERY grieved exit, refunds 100% of grossSats zBTC to every victim (E -> C), deducts min(0.01 BTC, floor(B_grief[O_j] / k_burst)) strictly from O_j's hard-partitioned B_grief (0.05 BTC) to each victim in that block, auto-suspends O_j, and excludes O_j from all NEW ExitSlotUTXO Taproot trees! Even a k = 20 single-block grief burst pays every victim 250,000 sats (0.0025 BTC, covering a 150 vB retry fee up to 1,666 sat/vB), NEVER debits 1 satoshi from B_custody (0.55 BTC), and has 0 impact on L1 Stake_r verifier payouts (R8-N05).
  3. User Cancel (Leaf 2M_active) or Fee Bump (0x06 EXIT_FEE_BUMP): 0x06 raises f_op in-place during fee spikes (and wallets may optionally attach a deterministic Dutch-auction f_op schedule); Leaf 2M_active cleanly refunds grossSats zBTC (NOT native BTC) after 288 blks unfronted.

6. Stage 1A Complete Hard-BTC Capital, $2^M$ Hall's Marriage Invariant, Voluntary Unwind & Bank-Run Bounds

6.1 Complete Hard-BTC Capital & Bank-Run Table (R8-M09, R8-H02, T_cooldown = 13.0d)

Every parameter below is verified in scripts/verify_spec_bounds.py. Cap_user is net external user zBTC capacity; Cap_TVL_total = Cap_user + M × B_zbtc is total confirmed vault BTC covered by K >= 18 (spec/02 §4):

Configuration (L = 1, N = 7, R = 64, K >= 18, T_cooldown = 13.0d)Locked Protocol Capital (Bonds + Float + 7×F_chal)Mandatory Operational Reserves (0.70 CPFP + 0.50 DA + 0.25M Top-up)Total Operational Baseline (1 Dispute) (% of 25–33 BTC ZNN MCap)Multi-Dispute Headroom (M Concurrent Attacks: 0.483 BTC/lane per honest verifier)Recycling Rate ({0.50, 0.25, 0.25} avg 0.333 BTC)100% Bank-Run Exit Duration ({0.50, 0.25, 0.25} / {0.50, 0.50})
Bare-Minimum Pilot (M = 3, Cap_user ≤ 10 BTC / 11.80 total)12.80 BTC (7.80 + 2.20 + 2.80)+1.95 BTC (0.70 + 0.50 + 0.75)14.75 BTC (44.7%–59.0%)1.45 BTC/honest verifier (~16.7–21.5 BTC net-wide if all 7 hold 3×)0.231 vaults/d (0.077 BTC/d)2.20 BTC in 10m + 7.80 BTC in **`101–104 days** (~68dw/{0.50, 0.50}`)
Recommended Stage 1A Pilot (M = 5, Cap_user ≤ 15 BTC / 18.00 total)18.80 BTC (13.00 + 3.00 + 2.80)+2.45 BTC (0.70 + 0.50 + 1.25)21.25 BTC (64.4%–85.0%)2.41 BTC/honest verifier (~23.2–34.8 BTC net-wide if all 7 hold 5×)0.385 vaults/d (0.128 BTC/d)3.00 BTC in 10m + 12.00 BTC in **`94–104 days** (~62dw/{0.50, 0.50}`)
Stage 2 Scaled (M = 20, L = 2, Cap_user ≤ 50 BTC / 62.0 total, K = 42)122.8 BTC (104.0 + 16.0 + 2.80)+11.20 BTC134.0 BTCScales w/ concurrent dispute cap3.077 vaults/d (1.026 BTC/d)16 BTC in 10m + 34 BTC in **`33 days`**

6.2 Exact $2^M$ Hall's Marriage Recoverability Invariant (R8-C04 Closed)

Because vaults carry per-vault operator bitmasks opBitmask (E(v) ⊆ {1..M}) and operators consume rounds or retire asynchronously, a global scalar cap N_live_vaults <= 0.50 * sum(r_i) is insufficient and can strand historical cohorts. On EVERY deposit_admit, operator_retire, round_consume, and operator_slash, the STF MUST enforce the exact Hall's Marriage Invariant across all 2^M - 1 non-empty operator subsets (<= 31 checks for M = 5; Edmonds-Karp max-flow if M > 10): $$\forall T \subseteq {1..M} \setminus {\emptyset}: \quad \left|{v \in V_{\text{live}} : E(v) \subseteq T}\right| ;\le; \sum_{i \in T} r_i^{\text{usable}}$$

  • Deposit Admission Headroom: New deposits MUST additionally satisfy |{v ∈ V_live ∪ V_new : E(v) ⊆ T}| <= floor(0.50 * sum_{i ∈ T} r_i^usable) for every T containing E(v_new) (<= 160 live vaults at M = 5, R = 64), guaranteeing 2× round slack even if half of an eligible subset retires or gets slashed.
  • Tightest-Slack FIFO Assignment: Deterministic FIFO vault assignment prioritizes the oldest eligible vault inside the minimum-slack Hall subset argmin_T (sum_{i ∈ T} r_i^usable - |{v : E(v) ⊆ T}|) so constrained legacy cohorts always drain first.
  • Retirement Gating: RetireStakeTx_r cannot unlock O_i's B_zbtc if removing O_i's remaining rounds violates Hall's Marriage Invariant above.
  • Zero Passive-Timeout Slash: Once U_d is assigned to O_j (moving D_d from R[O_j] → AssignedObligations (A)), assigned vaults NEVER passively expire into a slashable state (eliminating withholding-miner slash attacks); only explicit O_j-signed 0x07 RELEASE_ASSIGNMENT releases an assignment.

6.3 Graduated TVL Ramps & Non-Custodial Voluntary Unwind Circuit Breaker (R8-H08)

Because vk_STF is immutable on existing vaults (zero governance override), Stage 1A mitigates latent vk_STF bug risk via three non-custodial controls:

  1. Graduated Mainnet TVL Ramps: Stage 1A launches with AdmissionTicketUTXO genesis capped strictly at 2.0 BTC (90 days live bug-bounty soaking) → 5.0 BTC (90 days) → 10.0 / 15.0 BTC pilot cap.
  2. Gate G4 Formal Verification & Differential Consensus Fuzzing (spec/05 §5): Mandatory formal proof of V = C + L + E + R + A + B, Hall's invariant, and BIP-141 witness completeness plus differential fuzzing against Bitcoin Core before mainnet launch.
  3. Voluntary Unwind Circuit Breaker: If a critical non-exploited bug is discovered in vk_STF, Cohort 1 (1-of-N presigner halts new σ_cert attestations immediately — zero new deposits!), operators front all outstanding user 0x01 exits via ExitSlotUTXO to drain zBTC organically to 0 on Bitcoin L1, and remaining v1 lanes retire cleanly via RetireStakeTx_r before launching a patched, non-commingled zBTC_v2. (No governance key ever touches existing vault funds.)
  • Maturity & Engineering Reality: BitVMX-CPU / BitVMX-protocol is pre-mainnet today. Production delivery (off-chain stripped-block ZK prover + compiled RV32IM wrapped-SNARK verifier ELF + StakeChain ceremony + AdmissionTicketUTXO + ExitSlotUTXO + Gate G1–G5 audits) is realistically 12–18+ months for 4–6 strong engineers.

7. Stage 1B Explicit Alternative Gate: clArk (Covenant-Free Ark VTXOs)

If a young project cannot commit ~14.75–21.25+ BTC of non-yielding hard BTC OR requires mainnet launch in 3–6 months OR prioritizes 0-of-N post-round unilateral exit over pooled fungibility, do NOT under-bond BitVMX/BitVM2 — adopt Stage 1B clArk (Second bark / Ark Labs arkd + automated watchtower refreshes + Zenon SPV/PTLC coordination):

  • Bootstrap Capital: 2–5 BTC active ASP liquidity (0 slashing bonds; round turnover capped by ASP liquidity per 30–60 day VTXO expiry cycle).
  • Bob & Mike Security Model:
    • Post-L1-round (after P_Bob/P_Mike confirms in an Ark VTXO tree): Pure 0-of-N unilateral exit (zero ASP, zero Zenon signers!) by broadcasting log2(N) pre-signed tree-branch transactions (N = 64 → 6 txs; N = 1,024 → 10 txs) prior to VTXO expiry.
    • Explicit Compromises Relinquished: (1) No pooled fungible zBTC token (discrete VTXOs; exiting 0.25 BTC unilaterally from a 2.0 BTC VTXO requires exiting the entire 2.0 BTC VTXO on-chain unless pre-split in-round); (2) Pre-round arkoor transfers trust the ASP not to collude with sender Alice/Bob (wallets MUST separate trustless in-round VTXOs from arkoor balances explicitly in UX); (3) Hard VTXO expiry requires automated watchtowers/online refreshes or log2(N) L1 branch fees.

Appendix A: Non-Normative Future Tracks — Track B Pure Tier-0 Bitcoin Soft-Fork Covenant & Track A1/A2 Reference

Status: NON-NORMATIVE. Nothing in v2 depends on Bitcoin soft forks or BitVM2/BitVM3.

A.1 Track B: Pure Tier-0 (0-of-N Safety AND 0-of-N Liveness) With Minimal Bitcoin Soft Fork

If Bitcoin activates a stateful covenant soft fork, a clean non-commingled zBTC_v2 eliminates ALL presigning committees, ALL operators, ALL verifiers, ALL bonds, and ALL bank-run delays:

  • Direct L1 Pooled Covenant Custody (U_vault(R_t, V_t) — Zero Header Scanning!):
    • Internal key = provably unspendable H_NUMS. Every custody transition spends vin[0] = U_vault(R_t, V_t) directly on Bitcoin L1, so Bitcoin consensus natively enforces exact BTC inputs/outputs and canonical UTXO ordering (zero private-fork/orphaned-block drain; no OP_BLOCKHASH needed for custody!):
      1. Deposits: Depositor's DepositInboxUTXO(acctHash, <144> OP_CSV refund) is spent directly as vin[1..d] of T; covenant verifies V_out0 = V_in0 + sum(V_in_dep) - sum(V_out_exit) (miner fee paid strictly by external fee input!).
      2. Feeless Zenon Batches: Complete mutated-leaf state diffs + transparent STARK π_STF live directly in T's witness (zero CRS).
      3. Mike's Direct Unilateral 0.25 BTC Exit (0 Signers, 0 Operators, 0 LPs): Mike spends vin[0] = U_vault(R_t, 2.0 BTC) + vin[1] = Mike_fee_UTXO → vout[0] = U_vault(R_{t+1}, 1.75 BTC) + vout[1] = 0.25 BTC → P_Mike + fee change in 1 Bitcoin block (~10m).
  • Two Concrete Minimal Soft-Fork Primitives:
    • Path B1 (OP_CCV BIP-443 + OP_TXHASH + OP_VERIFY_STARK): Single ~1–3 kvB L1 tx, instant 1-block finality, zero challengers.
    • Path B2 (OP_CAT BIP-347 Alone): Poelstra Schnorr-trick sighash introspection enforcing recursive state-carry + value conservation, paired with either chained in-Script Circle-STARK (~40–100 kvB witness, 0 challengers) OR OP_CAT-MATT optimistic bisection (~500 vB happy path, ~5–20 kvB on dispute, 0 committees/operators, 1-of-∞ safety).
  • UTXO Contention Handling: Track B-Base enforces <1> OP_CSV (nSequence ≥ 1, max 1 spend/block) + native Bitcoin RBF fee-market priority (zero OP_BLOCKHASH). Optional Track B+ additionally adds OP_BLOCKHASH if an external OP_RETURN mandatory forced-exit queue (D_force = 6 blks) without RBF bidding against batchers is desired.

A.2 High-Capital / Research Reference (BitVM2 & BitVM3-GC + Clementine)

  • Scaled BitVM2 (1-of-∞ Permissionless Challenger, Zero Soft Fork): Viable only once ≥ 40–91+ BTC (minimal M = 3–5) or 532–1,454 BTC (40–80 lanes) of operator capital is available (13.30–18.175 BTC/lane at ~1.0–1.3M vB Groth16 asserts, nVersion = 2 non-TRUC large txs, ≤ 500 sat/vB fee ceiling).
  • Emerging BitVM3-GC (Garbled-Circuit SNARK + Clementine Reusable Rounds — Evaluated at Gate G2):
    • Advantages: Shrinks on-chain disprove to ~93 vB–1.0 kvB and 2 rounds (versus 20-step BitVMX-CPU), with variable-difficulty light-client comparison and dramatically lower dispute fee exposure.
    • Current Trade-Offs Requiring Gate G2 Resolution: Current non-reusable BitVM3 garbled circuits introduce a 1-of-N garbler trust model AND require 1–5 GB per one-time garbled circuit instance — totaling ~2.2–11.2+ TB of off-chain archival DA across M × L × R × N = 5 × 1 × 64 × 7 = 2,240 rounds (until reusable DV-SNARK garbled circuits mature). Gate G2 explicitly benchmarks compiled RV32IM BitVMX-CPU against mature reusable BitVM3-GC before Stage 1A code freeze; Stage 2 always supports clean non-commingled zBTC_v2 adoption.

Attack this spec & submit feedback

This is a Public RFC updated to v2 (v3.1.0-rfc) in response to Consolidated Hostile Review R8 (redlining against archived v1 / v3.0.0-rfc). Humans and AI review agents are invited to run python3 -I scripts/verify_spec_bounds.py, inspect the v1 → v2 changelog & redlines, file findings, or open pull requests.