v2 (v3.1.0-rfc) · public rfc · zero-federation · not mainnet-active
Part 1: Zero-Federation Bitcoin Taproot Vault Enforcement (BTC-BITVMX-V1), Stage 1B clArk Gate & Track B Soft-Fork Annex
Showing word-highlighted redline changes from archived v1 (v3.0.0-rfc) to v2 (v3.1.0-rfc). For structured finding-by-finding rationale, see theChangelog.
| @@ -1,37 +1,37 @@ | |||
| 1 | 1 | # Part 1: Zero-Federation Bitcoin Taproot Vault Enforcement (`BTC-BITVMX-V1`), Stage 1B `clArk` Gate & Track B Soft-Fork Annex | |
| 2 | 2 | ||
| 3 | - | **Document Class:** Normative Bitcoin Custody Specification (`v1` / `v3.0.0-rfc`; supersedes `v0` `BTC-ENFORCEMENT-V1`) | |
| 3 | + | **Document Class:** Normative Bitcoin Custody Specification (`v2` / `v3.1.0-rfc`; supersedes archived `v1` `v3.0.0-rfc` and `v0` `BTC-ENFORCEMENT-V1`) | |
| 4 | 4 | **Spec Identifier:** `BTC-BITVMX-V1` | |
| 5 | - | **Precedence:** **Highest normative layer** ([`SPEC.md §2.1`](../SPEC.md#21-authority--conflict-precedence-m-13-fixed)) — Bitcoin L1 scripts, deleted-key Taproot graphs, `StakeChain` timelocks, and `ExitSlotUTXO` consensus rules cannot be overridden by any Zenon contract, Pillar, or spork. | |
| 6 | - | **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 + `P2A` ephemeral anchors — **zero Bitcoin soft forks**, **zero custodial federated multisigs**) | |
| 5 | + | **Precedence:** **Highest normative layer** ([`SPEC.md §2.1`](../SPEC.md#21-authority--conflict-precedence-m-13-fixed)) — Bitcoin L1 scripts, deleted-key Taproot graphs, `AdmissionTicketUTXO`s, `StakeChain` timelocks, and `ExitSlotUTXO` consensus rules cannot be overridden by any Zenon contract, Pillar, or spork. | |
| 6 | + | **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**) | |
| 7 | 7 | **Consistency Checker:** [`scripts/verify_spec_bounds.py`](../scripts/verify_spec_bounds.py) | |
| 8 | 8 | ||
| 9 | 9 | --- | |
| 10 | 10 | ||
| 11 | - | ## 1. Cryptographic Boundaries (Theorem 1 & Theorem 2) & Prohibition of Federated Custody | |
| 11 | + | ## 1. Cryptographic Boundaries (Proposition 1 & Proposition 2) & Prohibition of Federated Custody | |
| 12 | 12 | ||
| 13 | 13 | ### 1.1 Explicit Prohibition of Custodial Federated Multisigs | |
| 14 | 14 | ||
| 15 | - | 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 `v1`. 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. | |
| 15 | + | 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. | |
| 16 | 16 | ||
| 17 | - | ### 1.2 Formal Boundary Proofs | |
| 17 | + | ### 1.2 Formal Boundary Propositions | |
| 18 | 18 | ||
| 19 | - | **Theorem 1 (Impossibility of Pure `0-of-N` Arbitrary Unilateral Exit on Bitcoin Mainnet Today):** | |
| 20 | - | Given pooled deposit UTXOs `U_A` (`1 BTC`), `U_B` (`1 BTC`) created at `t_0` under current Bitcoin consensus (BIP-340/341/342, zero soft forks), if ZERO pre-committed parties sign a new transaction at `t_1`, no valid Bitcoin L1 transaction exists that allows 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: | |
| 19 | + | **Proposition 1 (4-Way Impossibility of Pure `0-of-N` Arbitrary Unilateral Exit on Bitcoin Mainnet Today):** | |
| 20 | + | 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: | |
| 21 | 21 | 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)`. | |
| 22 | 22 | 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. | |
| 23 | - | 3. **Corollary 1A (Bob's `0.5 BTC`):** Depositor CSV refund leaves on `U_B` are impossible after fungible minting (Bob would spend `0.5 zBTC` then reclaim `1.0 BTC` via CSV). | |
| 23 | + | 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). | |
| 24 | 24 | 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**. | |
| 25 | 25 | ||
| 26 | - | **Theorem 2 (Young Low-Cap Capital / Trust / UX Trilemma — 0 Federation, 0 Soft Forks, `2–20 BTC` Bootstrap Capital):** | |
| 27 | - | With `0` federated signers, `0` soft forks, `~25–33 BTC` ZNN market cap (`0%` ZNN slashing usable), and realistic bootstrap capital `C ∈ [2, 20] BTC`, no protocol simultaneously achieves **(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: | |
| 28 | - | - **Minimal `BitVM2` (`M = 3–5, L = 1`) fails `C ≤ 20 BTC`:** Groth16 `AssertTx` (`~1.0–1.3M vB` / `4.0–4.8 MB` W-OTS) is a fixed Bitcoin-Script constant imposing `13.30–18.175 BTC`/lane (`39.9–90.9 BTC` in bonds alone before fronting liquidity; under-bonding to `≤ 20 BTC` breaks above `50 sat/vB`). | |
| 29 | - | - **Stage 1A Right-Sized `BitVMX` (`n = 8`, `M = 3–5`, `L = 1`, `N = 7`)** achieves **(A)** inside **`12.8–18.8 BTC`** by accepting `1-of-N` (`N = 7`) pre-committed online verifiers and `1-of-M` (`M = 3–5`) operator liveness. | |
| 26 | + | **Proposition 2 (Young Low-Cap Engineering / Capital / Trust Trilemma — 0 Federation, 0 Soft Forks, `~25–33 BTC` ZNN MCap):** | |
| 27 | + | 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: | |
| 28 | + | - **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`). | |
| 29 | + | - **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. | |
| 30 | 30 | - **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`). | |
| 31 | 31 | ||
| 32 | - | | Custody Track | Soft Fork? | Bootstrap BTC | Zenon Trust (`49%–100%`) | Custody Safety | Mike `0.25 BTC` Liveness (0 Zenon Signers) | Status in `v1` | | |
| 32 | + | | Custody Track | Soft Fork? | Bootstrap Hard BTC | Zenon Trust (`49%–100%`) | Custody Safety | Mike `0.25 BTC` Liveness (0 Zenon Signers) | Status in `v2` | | |
| 33 | 33 | |---|---|---|---|---|---|---| | |
| 34 | - | | **Stage 0 (SPV + PTLC/LN)** | No | `0 BTC` bonds (`0–5` LP) | `0-of-N` | Pure self-custody | N/A (no pooled `zBTC`) | **Mandatory Stage 0** | | |
| 35 | - | | **Stage 1A (`BitVMX n=8` Rollup)** | **No (Today)** | **`12.8–18.8 BTC`** | **`0-of-N`** | `1-of-N` setup/cohort + **`1-of-7`** online verifier | **`1-of-M` (`M=3–5`)** op (`~10m` front; `65–72d` 100% run) | **Primary Stage 1A** *(pre-mainnet R&D)* | | |
| 34 | + | | **Stage 0 (SPV + PTLC/LN)** | No | `0 BTC` bonds (`0–5` LP) | `0-of-N` | Pure self-custody (conditional on bounded chain progress) | N/A (no pooled `zBTC`) | **Mandatory Stage 0** | | |
| 35 | + | | **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-N`** | `1-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)* | | |
| 36 | 36 | | **Stage 1B (`clArk` VTXOs)** | **No (Today)** | **`2–5 BTC` liq** | **`0-of-N`** | Post-round `0-of-N` (pre-round `arkoor` trusts ASP) | Post-round `0-of-N` until expiry (whole VTXO) | **Explicit Stage 1B Alt** | | |
| 37 | 37 | | **Appendix A: Track B Covenant+ZK** | **Yes (`OP_CCV`+ZK or `OP_CAT`)** | **`0 BTC` bonds** | **`0-of-N`** | **Pure `0-of-N`** | **Pure `0-of-N`** (1 L1 tx direct from pooled UTXO) | **Non-Normative Annex** | | |
| @@ -39,5 +39,5 @@ | |||
| 39 | 39 | --- | |
| 40 | 40 | ||
| 41 | - | ## 2. Stage 1A Deleted-Key Vaults, Acyclic Deposit Ceremony & Zero-TTP Cohort Rule | |
| 41 | + | ## 2. Stage 1A Deleted-Key Vaults, Acyclic Deposit Ceremony, L1 `AdmissionTicketUTXO` & Zero-TTP Cohort Rule | |
| 42 | 42 | ||
| 43 | 43 | ### 2.1 Multi-Tier Vault Split (`{0.50, 0.25, 0.25}` BTC) | |
| @@ -45,91 +45,111 @@ | |||
| 45 | 45 | Every `1.0 BTC` deposit splits at deposit time into three standardized deleted-key vault UTXOs: | |
| 46 | 46 | - **Canonical Stage 1A Split:** **`{0.50, 0.25, 0.25}` BTC** (`3` vaults/BTC, average vault **`0.333 BTC`**, **`maxVaultDenom = 0.50 BTC`**). | |
| 47 | - | - 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 (e.g. `0.2371 BTC` or `0.001 BTC`) are paid in exact satoshis by `FrontingTx` and batched via `ReimbursementCredit[O_j]` until hitting an available `0.25`/`0.50 BTC` vault (**zero new presigning needed**). | |
| 48 | - | - *Throughput Option:* Operators/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). | |
| 47 | + | - 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**). | |
| 48 | + | - *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). | |
| 49 | 49 | ||
| 50 | - | ### 2.2 Acyclic `DepositTx` Ceremony (`OP_DROP` Witness-Stack Push — Closes `v0 C-4, N-2, M-7`) | |
| 50 | + | ### 2.2 Acyclic `DepositTx` Ceremony With L1 `AdmissionTicketUTXO` Cap Exclusion (Closes `R8-C01`, `R8-C03`, `R8-H06`) | |
| 51 | 51 | ||
| 52 | - | Because `vk_STF` is immutably hard-pinned and never rotates with PoS epochs, **Stage 1A vault graphs NEVER expire and NEVER require re-graphing**. There is NO `ProvisionalDepositScript`, NO `RolloverTx`, and NO standing `CommitteeIdentityKey`: | |
| 52 | + | 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`: | |
| 53 | 53 | ||
| 54 | - | 1. **Self-Custodial Staging UTXO (`U_dep_wallet`):** Depositor locks `1.0 BTC + fee` into a pre-committed Tapscript **`OP_DROP <pk_depositor> OP_CHECKSIG`** (independent of `DepositTx`, eliminating any SHA-256 hash cycle!). | |
| 55 | - | 2. **Deterministic Unsigned `DepositTx`:** Spends `vin[0] = U_dep_wallet` → `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`**: | |
| 56 | - | ```text | |
| 57 | - | OP_RETURN <"ZBTX"(4B) || 0x00(1B) || recipientAcctHash(32B) || vaultParamsHash(32B)> | |
| 58 | - | ``` | |
| 59 | - | Because `vout[3]` does **NOT** hash `certBlob`, **`txid_dep` is 100% fixed before presigning or attestation**. | |
| 60 | - | 3. **Ephemeral Deleted-Key Presigning:** 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 `TakeTx`s per vault**, `~40 KB` off-chain, `< 100ms` batch MuSig2 ONCE at deposit). | |
| 61 | - | 4. **Immediate Ephemeral Key Deletion & Non-Spending Attestation:** 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)`: | |
| 62 | - | ```text | |
| 63 | - | certBlob = σ_cert(64B) || Q_setup_d(32B) || opBitmask(8B) [exact 104 B <= 520 B BIP-342 limit] | |
| 64 | - | ``` | |
| 65 | - | 5. **Zero-Stranding Broadcast:** Only after verifying every pre-signed `TakeTx` and `σ_cert` 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` confirmations, the Rollup STARK (`spec/02 §3`) verifies real satoshi outputs, Taproot script derivation, and `σ_cert`, and credits `1.0 zBTC`. | |
| 54 | + | 1. **Confirmed Self-Custodial Staging UTXO (`U_dep_wallet`) & Acyclic `vault_id` (`R8-C01`):** | |
| 55 | + | - 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`**). | |
| 56 | + | - 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**: | |
| 57 | + | ```text | |
| 58 | + | vault_id = SHA256("zbtc:vault-id:v1" || funding_txid(32B) || u32BE(funding_vout) | |
| 59 | + | || u32BE(vault_vout) || u64BE(amount_sats) || u64BE(opBitmask)) | |
| 60 | + | ``` | |
| 61 | + | *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. | |
| 62 | + | 2. **L1 Consensus `Cap_TVL` Mutual Exclusion via Denomination-Matched `AdmissionTicketUTXO`s (`R8-C03`):** | |
| 63 | + | - 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!). | |
| 64 | + | - 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`**: | |
| 65 | + | ```text | |
| 66 | + | OP_RETURN <"ZBTX"(4B) || 0x00(1B) || recipientAcctHash(32B) || vaultParamsHash(32B)> | |
| 67 | + | ``` | |
| 68 | + | - 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!)**. | |
| 69 | + | - *(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. | |
| 70 | + | 3. **Ephemeral Deleted-Key Presigning & Hall's Marriage Admission Check (`R8-C04`):** | |
| 71 | + | - Before presigning, presigners verify that admitting `{U_0, U_1, U_2}` with `opBitmask` satisfies the **$2^M$ Hall's Marriage Invariant** (§6.2). | |
| 72 | + | - 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 `TakeTx`s per vault**, `~40 KB` off-chain, `< 100ms` batch MuSig2 ONCE at deposit). | |
| 73 | + | 4. **Immediate Ephemeral Key Deletion, Non-Spending Attestation & Public `zbtc-vault-bundle-v1` DA (`R8-H06`):** | |
| 74 | + | - 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)`: | |
| 75 | + | ```text | |
| 76 | + | certBlob = σ_cert(64B) || Q_setup_d(32B) || opBitmask(8B) [exact 104 B <= 520 B BIP-342 limit] | |
| 77 | + | ``` | |
| 78 | + | - 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 `TakeTx`s, content-addressed by `SHA256(bundle)`) to **`>= 3` independent public archival mirrors** (IPFS/Arweave/Git/HTTP mirrors operated independently of operators). | |
| 79 | + | 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`. | |
| 66 | 80 | ||
| 67 | - | ### 2.3 Zero-TTP Cohort Lifecycle Rule | |
| 81 | + | ### 2.3 Zero-TTP Cohort Lifecycle Rule (`R8-C06` Clarified) | |
| 68 | 82 | ||
| 69 | 83 | Inside a single fungible `zBTC` pool, **NO governance key, Pillar vote, or threshold committee can EVER add a new presigner cohort**: | |
| 70 | 84 | 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. | |
| 71 | - | 2. **Involuntary `1-of-N` `id_i` Key Loss:** All existing Cohort 1 vaults and `zBTC` balances remain **100% safe and 100% live forever** (zero 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.)* | |
| 85 | + | 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.)* | |
| 72 | 86 | 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). | |
| 73 | 87 | ||
| 74 | 88 | --- | |
| 75 | 89 | ||
| 76 | - | ## 3. Right-Sized `BitVMX` (`n = 8`, `RV32IM`) `StakeChain`, 256-Bit Lamport `TakeTx` & TRUC v3 Wiring | |
| 90 | + | ## 3. Right-Sized `BitVMX` (`n = 8`, `RV32IM`) `StakeChain`, Acyclic 256-Bit Lamport `TakeTx` & Core `>= 29.0` TRUC v3 Wiring | |
| 77 | 91 | ||
| 78 | 92 | ### 3.1 Launch-Time `StakeChain` & PoW Anchor (`t = 0`, `M = 3–5`, `L = 1`, `N = 7`, `R = 64`) | |
| 79 | 93 | ||
| 80 | 94 | Before accepting deposits, each operator `O_j` (`j ∈ {1..M}`) launches `L = 1` serial `StakeChain` lane `(j, l)` (`R = 64` finite rounds): | |
| 81 | - | - **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 `BitVMX-CPU` `RV32IM` verifier program at `t = 0` (before `Q_lane_{j,l}` deletion). In-circuit header verification 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. | |
| 82 | - | - **TVL-Scaled Private-Fork Confirmation Depth `K`:** Sized against **100% multi-operator collusion on a single private fork**: | |
| 83 | - | ```text | |
| 84 | - | 0.50 * K(era, Cap_TVL) * Subsidy(era) > Cap_TVL | |
| 85 | - | ``` | |
| 86 | - | At `Subsidy = 3.125 BTC` (2024–2028) and `α_diff = 0.50` (`1.5625 BTC/blk` floor, `3.125 BTC/blk` nominal): | |
| 87 | - | - **`Cap_TVL ≤ 15 BTC` (Stage 1A Pilot):** **`K = 14` blocks** (~2.3h) ⇒ PoW cost `21.88–43.75 BTC > 15 BTC`. | |
| 88 | - | - **`Cap_TVL ≤ 50 BTC` (Stage 2):** `K = 36` blocks (~6h) ⇒ PoW cost `56.25–112.50 BTC > 50 BTC`. | |
| 89 | - | - **`Cap_TVL ≤ 200 BTC` (Stage 2):** `K = 144` blocks (~24h) ⇒ PoW cost `225.0–450.0 BTC > 200 BTC`. | |
| 90 | - | *(If mainnet difficulty grows `> 2×` within a lane's active lifetime, `α_diff` tightens proportionally — e.g. `0.33` at `3×` growth ⇒ `K = 20 / 54 / 216` — or fresh lanes re-anchor `(h_lane_init, D)`.)* | |
| 95 | + | - **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`). | |
| 96 | + | - **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): | |
| 97 | + | - **`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). | |
| 98 | + | - **`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). | |
| 99 | + | - **`Cap_user ≤ 50 BTC` (`62.00 BTC` total, Stage 2):** **`K = 42`** (`65.625 BTC` floor / `131.25 BTC` nominal). | |
| 100 | + | - **`Cap_user ≤ 200 BTC` (`224.00 BTC` total, Stage 2):** **`K = 144`** (`225.00 BTC` floor / `450.00 BTC` nominal). | |
| 101 | + | *(See `spec/02 §4` for full Budish winning-fork subsidy-offset disclosure and 2028–2036 halving table.)* | |
| 91 | 102 | - **Pre-Signed Linear `StakeChain` (`Stake_0 → RoundTx_1 → Stake_1 → ... → RoundTx_R`):** | |
| 92 | 103 | - `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!). | |
| 93 | - | - 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 `vaultHash_d = SHA256(outpoint_d)`. | |
| 94 | - | - **`RoundTx_r`** (spends `Stake_{r-1}` after `<1,296> 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: | |
| 104 | + | - 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). | |
| 105 | + | - **`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: | |
| 95 | 106 | - **`Out 0 = Stake_r` (`Bond_BTC = 2.00 BTC`):** | |
| 96 | - | - **Leaf 1 (Next Round):** `<1,296> OP_CSV` (`9.0d` — enforces `W_max = 1` active kickoff per lane on L1!) → `RoundTx_{r+1}`. | |
| 97 | - | - **Leaf 2 (Clean Retirement):** `<1,440> OP_CSV` (`10.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!). | |
| 98 | - | - **Leaf 3 (Bisection Slash):** Immediate → `DisproveTx_{r,i}` / `TimeoutSlashTx_{r,i}` (**MUST spend BOTH `vin[0] = Stake_r` AND `vin[1] = VaultConnector_r`!**) paying **`0.15 BTC`** directly on L1 to winning verifier `P_{V_i}` and burning **`1.85 BTC` to `OP_RETURN`**. | |
| 107 | + | - **Leaf 1 (Next Round):** `<1,872> OP_CSV` (`13.0d` — enforces `W_max = 1` active kickoff per lane on L1!) → `RoundTx_{r+1}`. | |
| 108 | + | - **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!). | |
| 109 | + | - **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: | |
| 110 | + | - `vout[0] = 0.15 BTC` immediately in native Bitcoin L1 BTC to winning verifier `P_{V_i}`, | |
| 111 | + | - `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! | |
| 112 | + | - `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!), | |
| 113 | + | - `vout[8] = 0`-sat `P2A` ephemeral anchor! | |
| 114 | + | *(Zero `2^7 = 128` subset explosion: only `7` pre-signed `DisproveTx`/`TimeoutSlashTx` pairs per round + `6` tiny 2-input claim/burn txs per verifier!)* | |
| 99 | 115 | - **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`**. | |
| 100 | - | - **`Out 1 = VaultConnector_r` (`546` sats):** `<1,152> OP_CSV` (`8.0d` > `max_dispute_end = 1,104` 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!). | |
| 101 | - | - **`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`). Colluding `V_1` can NEVER delay honest `V_2..V_7` past `T_take` or `T_cooldown`! | |
| 116 | + | - **`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!). | |
| 117 | + | - **`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! | |
| 102 | 118 | - **`Out 9 = 0`-sat `P2A` Ephemeral Anchor** (`0x51024e73`). | |
| 103 | 119 | ||
| 104 | - | ### 3.2 `n = 8` `BitVMX-CPU` (`RV32IM`) Interactive Bisection & 100% BIP-431 TRUC v3 Compliance | |
| 105 | - | ||
| 106 | - | The disputed computation is a compact Rollup proof verifier compiled from standard **Rust → `RV32IM`** (`≤ 2^27 = 134,217,728` RISC-V instructions) using open-source `BitVMX-CPU` / `BitVMX-protocol`: | |
| 120 | + | ### 3.2 `n = 8` `BitVMX-CPU` (`RV32IM`) Wrapped-SNARK Verifier Bisection & Core `>= 29.0` TRUC v3 Compliance (`R8-H04`, `R8-H05`) | |
| 107 | 121 | ||
| 122 | + | - **Normative `RV32IM` Guest Computation Boundary (`R8-H05` Closed):** | |
| 123 | + | - 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)`). | |
| 124 | + | - **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`). | |
| 125 | + | - **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). | |
| 108 | 126 | - **`n = 8` Search Branching (`3` bits/round, `7 × 20 B` `OP_HASH160` Intermediate Trace Hashes):** | |
| 109 | 127 | - 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!)**. | |
| 110 | 128 | - 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**. | |
| 111 | - | - **Total worst-case dispute weights:** | |
| 112 | - | - **Prover (`O_j`):** `9 × 7.44 + 3.0 + 5.0 = 74.96 ≈ 75 kvB`. | |
| 113 | - | - **Verifier (`V_i`):** `Challenge (0.35) + 9 × 0.35 (3.15) + Execute/Disprove (8.0) = 11.5 kvB` (conservatively budgeted at **`15 kvB`**). | |
| 114 | - | - **Exact Timelock Ordering (`T_step = 48` blocks = `8h`/step):** | |
| 129 | + | - **Total Worst-Case Dispute Weights (INCLUDING `10 × 153 vB = 1,530 vB` P2A CPFP Children, `R8-H02`/`R8-H04`):** | |
| 130 | + | - **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`**. | |
| 131 | + | - **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`**. | |
| 132 | + | - **Widened Exact Timelock Ordering (`T_step = 72` blocks = `12h`/step, `R8-H04`):** | |
| 115 | 133 | ```text | |
| 116 | 134 | Challenge Window [0, 144] (24h) | |
| 117 | - | → Max Dispute End: 144 + (20 * 48) = 1,104 blocks (7.67 days) | |
| 118 | - | → VaultConnector_r (T_take): 1,152 blocks (8.00 days) [+48 blk margin] | |
| 119 | - | → Stake_r -> RoundTx_{r+1} (T_cool): 1,296 blocks (9.00 days) [+144 blk post-TakeTx equivocation margin] | |
| 120 | - | → RetireStakeTx_r: 1,440 blocks (10.00 days) [+144 blk retirement margin] | |
| 135 | + | → Max Dispute End: 144 + (20 * 72) = 1,584 blocks (11.00 days) | |
| 136 | + | → VaultConnector_r (T_take): 1,728 blocks (12.00 days) [+144 blk / 24h margin] | |
| 137 | + | → Stake_r -> RoundTx_{r+1} (T_cool): 1,872 blocks (13.00 days) [+144 blk post-TakeTx equivocation margin] | |
| 138 | + | → RetireStakeTx_r: 2,016 blocks (14.00 days) [+144 blk clean retirement margin] | |
| 121 | 139 | ``` | |
| 122 | - | - **BIP-431 TRUC v3 (`nVersion = 3`) & `P2A` Audit:** | |
| 123 | - | - Every pre-signed tx is `≤ 10,000 vB` (`RoundTx_r` ~`1.8 kvB`, `TakeTx` ~`3.1 kvB`, Prover search tx `7.44 kvB`, Execute-1-Opcode `≤ 8.0 kvB`, Verifier choice/Slash/Burn `~0.2–0.5 kvB`). | |
| 124 | - | - Every sequential step spends **confirmed** parent outputs (`ancestor_count = 1`); `ChallengeTx` is fee-funded directly via verifier's `vin[1]` (`descendant_count = 1`); all other pre-signed txs use ONE `~160 vB ≤ 1,000 vB` CPFP child via `0`-sat `P2A` (`descendant_count = 2`). **100% BIP-431 TRUC v3 compliant — zero pre-signed fee cliffs!** | |
| 140 | + | - **Bitcoin Core `>= 29.0` (`v31.0` Preferred), TRUC v3 (`nVersion = 3`), `P2A` & Out-of-Band Relay Audit (`R8-H04`, `R8-M09`):** | |
| 141 | + | - **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!). | |
| 142 | + | - 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`). | |
| 143 | + | - **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`). | |
| 144 | + | - **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. | |
| 125 | 145 | - **Honest Fee-Rate Design Envelope (`500 sat/vB` Sustained Across ALL `20` Steps):** | |
| 126 | - | - Prover worst-case fee @ `500 sat/vB`: `75,000 × 500 = 37,500,000` sats (`0.375 BTC`) ≤ **`F_chal = 0.40 BTC`** (exact break-even **`533 sat/vB`** sustained across all `10` prover txs!). | |
| 127 | - | - Verifier worst-case fee @ `500 sat/vB`: `15,000 × 500 = 7,500,000` sats (`0.075 BTC`; `0.15 BTC` @ `1,000 sat/vB`). | |
| 146 | + | - 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!). | |
| 147 | + | - 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`). | |
| 128 | 148 | ||
| 129 | - | ### 3.3 256-Bit Lamport `TakeTx` Leaf (Zero `ReimburseEscrow`, Zero `RecoveryVault`) | |
| 149 | + | ### 3.3 Acyclic 256-Bit Lamport `TakeTx` Leaf (Zero `ReimburseEscrow`, Zero `RecoveryVault`, `R8-C01`) | |
| 130 | 150 | ||
| 131 | - | At deposit `d`, `U_d`'s Tapscript leaf for `(j, l, r)` verifies `L_{j,l,r}(SHA256(outpoint_d))` directly inside `TakeTx_{d,j,l,r}` (`vin[0] = U_d`, `vin[1] = VaultConnector_r`, `vout[0] = D_d → P_{O_j}`, `vout[1] = 0`-sat `P2A`): | |
| 151 | + | 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`): | |
| 132 | 152 | ```text | |
| 133 | - | # 256 iterations (k = 0..255, b_k = bit k of SHA256(outpoint_d)): | |
| 153 | + | # 256 iterations (k = 0..255, b_k = bit k of pre-funding acyclic vault_id): | |
| 134 | 154 | OP_HASH160 <H_{k, b_k}> OP_EQUALVERIFY | |
| 135 | 155 | ... | |
| @@ -141,65 +161,83 @@ | |||
| 141 | 161 | - 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`). | |
| 142 | 162 | - Peak stack elements: **`258 << 1,000`** BIP-342 limit. | |
| 143 | - | - Total `TakeTx` weight: `~3,071–3,095 vB` (+ `VaultConnector_r` `~100 vB` ≈ **`~3,170–3,200 vB ≤ 10,000 vB` TRUC v3**). | |
| 144 | - | - **Equivocation Solvency:** If `O_j` committed `U_1` in `RoundTx_r`, passed `T_take = 1,152`, and broadcast `TakeTx` on `U_2 ≠ U_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,152, 1,296]` (`144`-blk window). `100%` of `2.00 BTC` `Bond_BTC` burns to `OP_RETURN`, and the STARK burns `D_d` (`≤ 0.50 BTC`) from `O_j`'s `B_zbtc` (`0.60 BTC`) + pays `0.05 BTC` equivocation bounty — keeping remaining `zBTC` **100% 1:1 solvent (`0` user loss)**. | |
| 163 | + | - 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). | |
| 164 | + | - **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)**. | |
| 145 | 165 | ||
| 146 | 166 | --- | |
| 147 | 167 | ||
| 148 | - | ## 4. Front-Run-Proof, Collusion-Resistant Verifier Economics (`H-4` Closed) | |
| 168 | + | ## 4. Native-L1, Collusion-Proof, Crisis-Discount-Immune Verifier Economics (`R8-H02`, `R8-N05` Closed) | |
| 149 | 169 | ||
| 150 | - | Every `ChallengeTx_{r,i}` opened by Verifier `V_i` during `[0, 144]` locks **`F_chal = 0.40 BTC`** in **`ChalEscrow_{r,i}`** (NOT sent to `O_j` upfront!) and appends `41 B` `OP_RETURN "ZBTX" || 0x04 || kickoffTxid || verifierAcctId_i`: | |
| 151 | - | - `ChalEscrow_{r,i}` pays `0.40 BTC` to `O_j` **ONLY IF** `O_j` wins `Dispute_i` (covering full `75 kvB` honest prover fees up to `533 sat/vB`); otherwise `V_i` reclaims `100%` of `0.40 BTC` cleanly. | |
| 152 | - | - Each operator lane locks **`B_zbtc = 0.60 BTC`** inside canonical Rollup state (`0.50 BTC` vault restitution / challenger-split slice + `0.05 BTC` equivocation bounty = **`0.55 BTC` hard custody floor**, PLUS **`0.05 BTC` dedicated `ExitSlotUTXO` grief buffer**). | |
| 170 | + | 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`: | |
| 171 | + | - `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. | |
| 172 | + | - 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`): | |
| 173 | + | - **`B_custody = 0.55 BTC`** (`0.50 BTC` max-vault Lamport equivocation restitution + `0.05 BTC` equivocation bounty; NEVER debited by `ExitSlotUTXO` griefing!), AND | |
| 174 | + | - **`B_grief = 0.05 BTC`** (strictly dedicated `ExitSlotUTXO` grief buffer). | |
| 175 | + | - **100% Native Bitcoin L1 Verifier Payouts (`0%` `zBTC` Crisis Discount, `0%` `R8-N05` Coupling!):** | |
| 176 | + | 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!). | |
| 153 | 177 | ||
| 154 | - | **Bisection Slash Matrix (`k_collude ∈ {0..6}` of `N = 7` Verifiers Colluding with Cheating `O_j` @ `500 sat/vB`):** | |
| 155 | - | Because `DisproveTx_{r,*}` / `TimeoutSlashTx_{r,*}` spends **BOTH `Stake_r` AND `VaultConnector_r`**, **`0` BTC is stolen from `U_d`** — freeing `O_j`'s entire `0.55 BTC` custody slice of `B_zbtc` to split equally across all other `k ≤ 6` challengers (`0x04` opened in `[0, 144]`): | |
| 178 | + | **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):** | |
| 156 | 179 | ||
| 157 | - | | Colluding Verifiers (`k_collude`) | Vault Stolen | Winning Verifier L1 Payout (`Stake_r`) | `Bond_BTC` Burned | Each Other Honest Challenger (`B_zbtc` Split) | Honest Verifier Net EV (@ `500 sat/vB`, `0.075` fee) | Combined `(O_j + k_collude)` Net P&L | | |
| 180 | + | | Colluding Verifiers (`k_collude`) | Vault Stolen | Every Active Honest Verifier L1 Payout (`Stake_r`) | Min `Stake_r` L1 Burned | Honest 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`) | | |
| 158 | 181 | |---|---|---|---|---|---|---| | |
| 159 | - | | `0` (all honest) | `0.00 BTC` | `0.15 BTC` (to honest winner) | `1.85 BTC` | `≥ 0.0917 BTC` (`0.55 / 6`) | **`+0.075 BTC`** (winner) / **`≥ +0.0167 BTC`** (others) | **`-2.55 BTC`** (`-2.00 - 0.55`) | | |
| 160 | - | | `1` (`V_1` throws & steals L1 payout) | `0.00 BTC` | `0.15 BTC` (to `V_1`) | `1.85 BTC` | **`0.0917 BTC`** (`0.55 / 6` each to `V_2..V_7`) | **`+0.0167 BTC`** (EVERY honest `V_2..V_7`!) | **`-2.40 BTC`** | | |
| 161 | - | | `6` (worst case: ONLY `V_7` honest; `V_1` wins L1, `V_2..V_6` also claim `0x04`) | `0.00 BTC` | `0.15 BTC` (to `V_1`) | `1.85 BTC` | **`0.0917 BTC`** (`0.55 / 6` to `V_7`) | **`+0.0167 BTC`** (`V_7` still strictly profitable!) | **`-1.9417 BTC`** (`-1.85 - 0.0917`) | | |
| 182 | + | | `0` (all honest) | `0.00 BTC` | **`0.1500 BTC` native L1** | `0.95–1.85 BTC` | **`+0.0645 BTC`** | **`+0.0232 BTC`** | **`-2.00 BTC`** L1 / **`-2.55 BTC`** total | | |
| 183 | + | | `1` (`V_1` throws & claims L1) | `0.00 BTC` | **`0.1500 BTC` native L1** | `0.95–1.70 BTC` | **`+0.0645 BTC`** | **`+0.0232 BTC`** | **`-1.85 BTC`** L1 / **`-2.40 BTC`** total | | |
| 184 | + | | `6` (worst case: ONLY `V_7` honest; `V_1..V_6` claim L1) | `0.00 BTC` | **`0.1500 BTC` native L1** | **`0.95 BTC`** | **`+0.0645 BTC`** (`V_7` strictly profitable!) | **`+0.0232 BTC`** (`V_7` STILL profitable!) | **`-1.10 BTC`** L1 / **`-1.65 BTC`** total | | |
| 162 | 185 | ||
| 163 | - | *Notice: Even if `6 of 7` verifiers collude with `O_j`, the lone honest verifier `V_7` recovers `100%` of `F_chal`, nets `≥ +0.0167 BTC` at `500 sat/vB`, and the attacker/colluding cartel suffers `-1.94` to `-2.55 BTC` net loss (`-2.55 BTC` solo; `-2.40` to `-1.9417 BTC` with `1..6` colluders) with `0` sats stolen from users!* | |
| 186 | + | *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!* | |
| 164 | 187 | ||
| 165 | 188 | --- | |
| 166 | 189 | ||
| 167 | - | ## 5. Atomic `(2M + 1)`-Leaf `ExitSlotUTXO` (Zero Double-Fronting, Zero Grief Freeze) | |
| 190 | + | ## 5. Atomic Active-Operator `(2M_active + 1)`-Leaf `ExitSlotUTXO` (Cyclic Priority, Zero `B_custody` Overflow — `R8-H01`, `R8-M03`, `R8-N01`) | |
| 168 | 191 | ||
| 169 | - | Every Stage 1A exit — both hostile L1 `0x01 FORCED_EXIT` (created by Mike/Bob) and cooperative `0x02 BATCH_DA` exits (created by batcher) — outputs a **`546`-sat `ExitSlotUTXO`** (P2TR, unspendable `H_NUMS` internal key) with **`2M + 1` Tapscript leaves** (zero anonymous `OP_TRUE` leaves!): | |
| 170 | - | - **Leaves `0 .. M-1` (Deterministic Priority Windows):** `<6*r> OP_CSV OP_DROP <P_{O_{k_r}}> OP_CHECKSIG` where `k_r = H(exitId || r) mod M`. | |
| 171 | - | - **Leaves `M .. 2M-1` (Registered Open Race After `6*M` Blocks):** `<6*M> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIG` for each registered operator `O_j` (depth 4 for `M = 5`, `11` leaves; depth 6 for `M = 20`, `41` leaves). | |
| 172 | - | - **Leaf `2M` (`EXIT_CANCEL`):** `<288> OP_CSV OP_DROP <cancelPubKey> OP_CHECKSIG` (`288 > 6*M` blks). | |
| 192 | + | 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!): | |
| 193 | + | - **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`!). | |
| 194 | + | - **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`. | |
| 195 | + | - **Leaf `2M_active` (`EXIT_CANCEL`):** `<288> OP_CSV OP_DROP <cancelPubKey> OP_CHECKSIG` (`288 > 6*M_active` blks). | |
| 173 | 196 | ||
| 174 | - | **Universal STARK Spend-or-Refund Rule (`K`-deep spend of `ExitSlotUTXO`):** | |
| 175 | - | 1. **Valid Fronting (Leaf `0..2M-1` AND `vout[0] == (destScriptPubKey, ≥ grossSats - f_op)`):** Exit marked `COMPLETED`; `ReimbursementCredit[O_j] += grossSats`. Bitcoin L1 UTXO exclusion makes double-fronting and refund-vs-front races (`M-8`) cryptographically impossible. | |
| 176 | - | 2. **Non-Paying Operator Grief Spend (Leaf `0..2M-1` AND `vout[0]` fails payout check):** STARK **atomically cancels exit, refunds full `grossSats` `zBTC` to user, slashes `0.01 BTC` grief penalty from `O_j`'s `0.05 BTC` grief buffer to user, and auto-suspends `O_j`** until `B_zbtc` is topped back up to `≥ 0.60 BTC` (protecting the `0.55 BTC` custody floor). | |
| 177 | - | 3. **User Cancel (Leaf `2M`) or Fee Bump (`0x06 EXIT_FEE_BUMP`):** `0x06` raises `f_op` in-place during fee spikes; Leaf `2M` cleanly refunds `grossSats` `zBTC` after `288` blks unfronted. | |
| 197 | + | **Universal STARK Spend-or-Refund Rule (`K`-deep spend of `ExitSlotUTXO`, `R8-H01` Hardened):** | |
| 198 | + | 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. | |
| 199 | + | 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`)**. | |
| 200 | + | 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. | |
| 178 | 201 | ||
| 179 | 202 | --- | |
| 180 | 203 | ||
| 181 | - | ## 6. Stage 1A Bootstrap Capital, Throughput, Finite-Round Cap & Bank-Run Bounds | |
| 204 | + | ## 6. Stage 1A Complete Hard-BTC Capital, $2^M$ Hall's Marriage Invariant, Voluntary Unwind & Bank-Run Bounds | |
| 182 | 205 | ||
| 183 | - | Every parameter below is verified in [`scripts/verify_spec_bounds.py`](../scripts/verify_spec_bounds.py): | |
| 206 | + | ### 6.1 Complete Hard-BTC Capital & Bank-Run Table (`R8-M09`, `R8-H02`, `T_cooldown = 13.0d`) | |
| 184 | 207 | ||
| 185 | - | | Configuration (`L = 1`, `N = 7`, `R = 64`, `K = 14`, `T_cooldown = 9.0d`) | Per-Lane Bond (`Bond_BTC + B_zbtc`) | Total Op Bonds | Op Fronting Float | Verifier Standby (`7 × 0.40`) | **Total Hard BTC Capital** (`%` of `25–33 BTC` ZNN MCap) | 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}`) | | |
| 186 | - | |---|---|---|---|---|---|---|---| | |
| 187 | - | | **Bare-Minimum Pilot (`M = 3`, `Cap_TVL ≤ 10 BTC`)** | `2.60 BTC` (`2.00 + 0.60`) | `7.80 BTC` | `2.20 BTC` | `2.80 BTC` | **`12.80 BTC`** (`~39–51%`) | `0.333` vaults/d (**`0.111 BTC/d`**) | `2.20 BTC` in ~10m + `7.80 BTC` in **`~72 days`** (`~47d` w/ `{0.50, 0.50}`) | | |
| 188 | - | | **Recommended Stage 1A Pilot (`M = 5`, `Cap_TVL ≤ 15 BTC`)** | `2.60 BTC` (`2.00 + 0.60`) | `13.00 BTC` | `3.00 BTC` | `2.80 BTC` | **`18.80 BTC`** (`~57–75%`) | `0.556` vaults/d (**`0.185 BTC/d`**) | `3.00 BTC` in ~10m + `12.00 BTC` in **`~65 days`** (`~43d` w/ `{0.50, 0.50}`) | | |
| 189 | - | | **Stage 2 Scaled (`M = 20, L = 2`, `Cap_TVL ≤ 50–200 BTC`, `K = 36–144`)** | `2.60 BTC` | `104.0 BTC` | `16.0 BTC` | `2.80 BTC` | `122.8 BTC` | `4.444` vaults/d (**`1.481 BTC/d`**) | `16 BTC` in ~10m + `34 BTC` in `~23d` (for `50 BTC` TVL) | | |
| 208 | + | Every parameter below is verified in [`scripts/verify_spec_bounds.py`](../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`): | |
| 190 | 209 | ||
| 191 | - | - **Finite-Round Admission Cap & FIFO Drainage:** New deposits are admitted only while `N_live_vaults ≤ 0.50 × RemainingTotalRounds` (`≤ 160` live vaults for `M = 5, R = 64` = `320` total slots; `160 × 0.333 = 53.3 BTC > 15 BTC` cap). Strict **FIFO oldest-vault-first** assignment (filtered by `opBitmask`) drains oldest vaults first and naturally prevents multi-year difficulty staleness. | |
| 192 | - | - **Zero Passive-Timeout Slash:** Once `U_d` is assigned to `O_j` (after `O_j` ALREADY fronted BTC to Mike!), remaining unassigned vaults equal remaining `zBTC` 1:1 even if `O_j` vanishes forever. 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. | |
| 193 | - | - **Maturity & Engineering Reality:** `BitVMX-CPU` / `BitVMX-protocol` is **pre-mainnet** today. Production delivery (stripped-block STARK + `RV32IM` verifier + `StakeChain` ceremony + `ExitSlotUTXO` + third-party audit) is realistically **`12–18+ months`** for 4–6 strong engineers. | |
| 210 | + | | 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}`) | | |
| 211 | + | |---|---|---|---|---|---|---| | |
| 212 | + | | **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`** (`~68d` w/ `{0.50, 0.50}`) | | |
| 213 | + | | **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`** (`~62d` w/ `{0.50, 0.50}`) | | |
| 214 | + | | **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 BTC` | `134.0 BTC` | Scales w/ concurrent dispute cap | `3.077` vaults/d (**`1.026 BTC/d`**) | `16 BTC` in ~10m + `34 BTC` in **`~33 days`** | | |
| 194 | 215 | ||
| 216 | + | ### 6.2 Exact $2^M$ Hall's Marriage Recoverability Invariant (`R8-C04` Closed) | |
| 217 | + | ||
| 218 | + | 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`): | |
| 219 | + | $$\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}}$$ | |
| 220 | + | - **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. | |
| 221 | + | - **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. | |
| 222 | + | - **Retirement Gating:** `RetireStakeTx_r` cannot unlock `O_i`'s `B_zbtc` if removing `O_i`'s remaining rounds violates Hall's Marriage Invariant above. | |
| 223 | + | - **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. | |
| 224 | + | ||
| 225 | + | ### 6.3 Graduated TVL Ramps & Non-Custodial Voluntary Unwind Circuit Breaker (`R8-H08`) | |
| 226 | + | ||
| 227 | + | Because `vk_STF` is immutable on existing vaults (zero governance override), Stage 1A mitigates latent `vk_STF` bug risk via three non-custodial controls: | |
| 228 | + | 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. | |
| 229 | + | 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. | |
| 230 | + | 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.)* | |
| 231 | + | - **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. | |
| 232 | + | ||
| 195 | 233 | --- | |
| 196 | 234 | ||
| 197 | 235 | ## 7. Stage 1B Explicit Alternative Gate: `clArk` (Covenant-Free Ark VTXOs) | |
| 198 | 236 | ||
| 199 | - | If a young project **cannot commit `~12.8–18.8 BTC` of non-yielding hard BTC** (e.g. `< 5–10 BTC` budget) 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` + Zenon SPV/PTLC coordination): | |
| 200 | - | - **Bootstrap Capital:** **`2–5 BTC`** active ASP liquidity (`0` slashing bonds; round turnover capped by ASP liquidity per 14–30 day VTXO expiry cycle). | |
| 237 | + | 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): | |
| 238 | + | - **Bootstrap Capital:** **`2–5 BTC`** active ASP liquidity (`0` slashing bonds; round turnover capped by ASP liquidity per 30–60 day VTXO expiry cycle). | |
| 201 | 239 | - **Bob & Mike Security Model:** | |
| 202 | 240 | - **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. | |
| 203 | - | - **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`**; (3) **Hard VTXO expiry** forces Mike online to refresh or pay `log2(N)` L1 branch fees (small VTXOs become uneconomical during fee spikes). | |
| 241 | + | - **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. | |
| 204 | 242 | ||
| 205 | 243 | --- | |
| @@ -207,5 +245,5 @@ | |||
| 207 | 245 | ## Appendix A: Non-Normative Future Tracks — Track B Pure Tier-0 Bitcoin Soft-Fork Covenant & Track A1/A2 Reference | |
| 208 | 246 | ||
| 209 | - | > **Status: NON-NORMATIVE.** Nothing in `v1` depends on Bitcoin soft forks or BitVM2/BitVM3. | |
| 247 | + | > **Status: NON-NORMATIVE.** Nothing in `v2` depends on Bitcoin soft forks or BitVM2/BitVM3. | |
| 210 | 248 | ||
| 211 | 249 | ### A.1 Track B: Pure Tier-0 (`0-of-N` Safety AND `0-of-N` Liveness) With Minimal Bitcoin Soft Fork | |
| @@ -223,7 +261,9 @@ | |||
| 223 | 261 | - **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. | |
| 224 | 262 | ||
| 225 | - | ### A.2 High-Capital / Research Reference (`BitVM2` & `BitVM3-GC`) | |
| 263 | + | ### A.2 High-Capital / Research Reference (`BitVM2` & `BitVM3-GC` + Clementine) | |
| 226 | 264 | ||
| 227 | - | - **Scaled `BitVM2` (`1-of-∞` Permissionless Challenger, Zero Soft Fork):** Viable only once `≥ 50–100+ 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). | |
| 228 | - | - **Future `BitVM3-GC` (Garbled-Circuit SNARK, `1-of-N` Online Verifier):** Shrinks on-chain assert to `~2.4–10 kvB` and disprove to `~0.1–1.0 kvB` (`F_assert ≈ 0.20 BTC` even at `2,000 sat/vB`, `2.10 BTC`/lane), but one-time-use multi-GB (`1–5 GB`) garbled circuits currently require tens–hundreds of TB across `M × L × R × N` rounds until **reusable DV-SNARK garbled circuits** mature past early research. | |
| 265 | + | - **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). | |
| 266 | + | - **Emerging `BitVM3-GC` (Garbled-Circuit SNARK + Clementine Reusable Rounds — Evaluated at Gate G2):** | |
| 267 | + | - **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. | |
| 268 | + | - **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. | |
| 229 | 269 | ||
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:
- 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). - Pre-signed transactions at
t_0usingSIGHASH_ALL/SINGLEfix outputs before(P_Mike, 0.25 BTC)exist;SIGHASH_NONEpermits total theft. - Corollary 1A (Bob's
0.5 BTC): Depositor CSV refund leaves on active admitted vaultU_Bare forbidden after fungible minting (Bob would spend0.5 zBTCthen reclaim1.0 BTCvia CSV). - Corollary 1B (Optimistic Reimbursement Bound): On Bitcoin Mainnet today, every BitVM-family bridge (
BitVM2/BitVMX/BitVM3) requires1-of-Nephemeral setup deletion + challenger/verifier safety +1-of-Mpre-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) failsC ≤ 20 BTC: Current Groth16AssertTx(~1.0–1.3M vB/4.0–4.8 MBW-OTS) imposes13.30–18.175 BTC/lane (39.9–90.9 BTCin bonds alone before fronting liquidity; under-bonding breaks above50 sat/vB). - Stage 1A Right-Sized
BitVMX(n = 8,M = 3–5,L = 1,N = 7) achieves (A) with12.80–18.80 BTClocked protocol capital (14.75–21.25 BTCsingle-dispute operational baseline;~17–26+ BTCmulti-dispute headroom) by accepting1-of-N(N = 7) pre-committed online verifiers and1-of-M(M = 3–5) operator liveness. - Stage 1B
clArkachieves post-round (C) inside2–5 BTCby sacrificing (A) (discrete expiring VTXOs, pre-roundarkoorsender+ASP collusion, no global pooledzBTC).
| Custody Track | Soft Fork? | Bootstrap Hard BTC | Zenon Trust (49%–100%) | Custody Safety | Mike 0.25 BTC Liveness (0 Zenon Signers) | Status in v2 |
|---|---|---|---|---|---|---|
| Stage 0 (SPV + PTLC/LN) | No | 0 BTC bonds (0–5 LP) | 0-of-N | Pure 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-N | 1-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 liq | 0-of-N | Post-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+ZK | Yes (OP_CCV+ZK or OP_CAT) | 0 BTC bonds | 0-of-N | Pure 0-of-N | Pure 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 (3vaults/BTC, average vault0.333 BTC,maxVaultDenom = 0.50 BTC).- Bob's
0.50 BTCrecovery maps 1:1 to a0.50 BTCvault immediately; Mike's0.25 BTCrecovery maps 1:1 to a0.25 BTCvault immediately; arbitrary non-bucket amounts (>= MIN_EXIT_SATS = 100,000sats =0.001 BTC) are paid in exact satoshis byFrontingTxand batched viaReimbursementCredit[O_j](plusTransferCreditfor< 0.25 BTCresidual consolidation,spec/03 §2.4) until hitting an available0.25/0.50 BTCvault (zero new presigning needed). - Throughput Option: Deployments prioritizing faster bank-run recycling over direct
0.25 BTCvault mapping may configure{0.50, 0.50}BTC (2vaults/BTC, avg0.50 BTC, reducing 100% bank-run duration by~33%with identicalmaxVaultDenom = 0.50 BTCand zero bond increase).
- Bob's
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:
- Confirmed Self-Custodial Staging UTXO (
U_dep_wallet) & Acyclicvault_id(R8-C01):- Depositor first confirms
1.0 BTC + feeon Bitcoin L1 in staging UTXOU_dep_wallet(funding_txid:funding_vout, TapscriptOP_DROP <pk_depositor> OP_CHECKSIG). - Because
funding_txid:funding_voutis already confirmed on-chain and Bitcoin consensus prevents spendingU_dep_wallettwice, each output vaultvout ∈ {0, 1, 2}has a globally unique, pre-Taproot-construction deterministic identifier:
Zero SHA-256d fixed-point cycle: Every vault's Lamportvault_id = SHA256("zbtc:vault-id:v1" || funding_txid(32B) || u32BE(funding_vout) || u32BE(vault_vout) || u64BE(amount_sats) || u64BE(opBitmask))TakeTxTapscript leaf commits tovault_id(NOTSHA256(outpoint_d)!), so Taproot script construction,Q_setup_dTaproot tweaking, andtxid_depcomputation form a strict DAG.
- Depositor first confirms
- L1 Consensus
Cap_TVLMutual Exclusion via Denomination-MatchedAdmissionTicketUTXOs (R8-C03):- At cohort genesis, setup mints exact denomination-matched
546-satAdmissionTicketUTXOconnectors matching the total vault capCap_TVL_total = Cap_user + M × B_zbtc(e.g., forM = 5,Cap_user = 15.0 BTC+3.0 BTCoperatorB_zbtc=18.0 BTCtotal vaults ⇒18 × Ticket_050+36 × Ticket_025=54tickets totaling29,484sats; operator initialB_zbtcdeposits consume their dedicatedM × 0.60 BTCallocation, leaving exact15 × Ticket_050 + 30 × Ticket_025for15.0 BTCof external user deposits!). - Every
1.0 BTCDepositTxMUST spendvin[0] = U_dep_walletANDvin[1] = Ticket_050,vin[2] = Ticket_025,vin[3] = Ticket_025(signed via cohort ticket key with zero BTC value risk — tickets carry546sats dust only) →vout[0..2]= vault UTXOsU_0 (0.50 BTC),U_1 (0.25 BTC),U_2 (0.25 BTC)+vout[3]=69 BstandardOP_RETURN:OP_RETURN <"ZBTX"(4B) || 0x00(1B) || recipientAcctHash(32B) || vaultParamsHash(32B)> - Every pre-signed
TakeTx_{d,j,l,r}spending vaultU_drecreates the exact matching-denominationAdmissionTicketUTXOatvout[1](Ticket_050orTicket_025), so Bitcoin L1 consensus itself enforcessum(live_vaults) <= Cap_TVL_totalby strict UTXO conservation! If two depositors race across the last remaining slot, Bitcoin consensus confirms at most ONEDepositTx; the loser'sDepositTxfails withmissing-inputsand the loser's1.0 BTCnever leavesU_dep_wallet(0BTC burn!). - (Optional Alternative — Two-Stage
PreDepositUTXO:) Deployments opting out of ticket connectors MAY instead lock1.0 BTCfirst intoPreDepositUTXO(MuSig2(Q_setup_d) OR (<144> OP_CSV <pk_depositor>)), deferring ephemeral key deletion and sweep into the active vault untilK-deep slot admission confirms. Normative Prohibition: An active admitted vaultU_dMUST NEVER retain an unconditional depositor CSV leaf (Corollary 1A).AdmissionTicketUTXOis the normative Stage 1A default.
- At cohort genesis, setup mints exact denomination-matched
- Ephemeral Deleted-Key Presigning & Hall's Marriage Admission Check (
R8-C04):- Before presigning, presigners verify that admitting
{U_0, U_1, U_2}withopBitmasksatisfies the $2^M$ Hall's Marriage Invariant (§6.2). - Depositor +
N = 7presigners + all online operators (≥ M_min, encoded inopBitmasku64) generate fresh per-deposit ephemeral keys(x_{i,d}, P_{i,d})(including the depositor's own ephemeral keyP_{dep,d}!) formingQ_setup_d = MuSig2_KeyAgg(P_{1,d}, ..., P_{N,d}, P_{dep,d}). They presign ONETakeTx_{d,j,l,r}per eligible operator lane(j, l)and unused roundr ∈ {r_cur..R}(Stage 1AM = 5, L = 1, R = 64⇒320pre-signedTakeTxs per vault,~40 KBoff-chain,< 100msbatch MuSig2 ONCE at deposit).
- Before presigning, presigners verify that admitting
- Immediate Ephemeral Key Deletion, Non-Spending Attestation & Public
zbtc-vault-bundle-v1DA (R8-H06):- Each presigner
ipermanently deletesx_{i,d}and signs a non-spending identity attestationσ_cert(64 BMuSig2 overid_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-v1artifact (vault_id,funding_txid:vout,DepositTx, full Taproot Merkle tree scripts & control blocks, allL_{j,l,r}Lamport & W-OTS pubkeys,certBlob, and all320pre-signedTakeTxs, content-addressed bySHA256(bundle)) to>= 3independent public archival mirrors (IPFS/Arweave/Git/HTTP mirrors operated independently of operators).
- Each presigner
- Zero-Stranding Broadcast: Only after verifying every pre-signed
TakeTx,σ_cert, and cryptographic retrieval ofzbtc-vault-bundle-v1from>= 3public mirrors does the depositor deletex_{dep,d}, push witness stack[sig_depositor, certBlob, script, controlBlock]intoDepositTx.vin[0].witness, and broadcast. Because witness stacks are excluded fromtxid_depand authenticated bywtxid_depin the coinbase BIP-141 witness commitment, there is zero hash cycle. AtK = 18confirmations, the Rollup STF (spec/02 §3) verifies real satoshi outputs,AdmissionTicketUTXOconsumption, Taproot script derivation fromvault_id,σ_cert, and Hall's invariant, and credits1.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:
- Voluntary Handover (Same
vk_STFOnly): OnlyN-of-N(7-of-7) of Cohort 1 (preserving strict1-of-Nsafety!) may sign a handover certificate registering Cohort 2. - Involuntary
1-of-Nid_iKey Loss: All existing Cohort 1 vaults carry no CLTV expiration and remain safe and redeemable 1:1 to native BTC strictly subject to1-of-Mactive eligible operator liveness (zeroid_ibricking), while new deposits onv1halt cleanly. Future deposits launch a clean, non-commingled sovereign deployment (zBTC_v2) with fresh Cohort 2. (Long-termid_iuses redundant HSM backup; ephemeralx_{i,d}is NEVER backed up.) - Explicit Residual Open-Cohort Bound: While a cohort accepts new deposits, at least
1-of-N{id_1..id_N}must remain uncompromised (otherwise allNcompromisedid_ikeys 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 verifiervk_STFatt = 0(beforeQ_lane_{j,l}deletion). Header verification inside the off-chain ZK prover enforces full Bitcoin PoW + 2,016-block retargeting fromh_lane_initwith minimum difficulty floorD(h) ≥ 0.50 × D(h_lane_init)across the lane's finiteR = 64-round horizon, PLUS interactive heaviest-chainwork competing-header comparison (spec/02 §4). - Halving-Indexed Confirmation Depth (
K >= 18Hard Minimum Floor,R8-H03): Sized via the conditional unpublished-fork opportunity-cost heuristic0.50 × K × Subsidy(era) > Cap_TVL_total(Cap_user + M × B_zbtc), subject to a hard minimum floorK >= 18(~3.0hnominal):Cap_user ≤ 10 BTC(11.80 BTCtotal incl.M=3B_zbtc):K = 18(28.125 BTCfloor /56.25 BTCnominal in 2024–2028).Cap_user ≤ 15 BTC(18.00 BTCtotal incl.M=5B_zbtc):K = 18(28.125 BTCfloor /56.25 BTCnominal in 2024–2028).Cap_user ≤ 50 BTC(62.00 BTCtotal, Stage 2):K = 42(65.625 BTCfloor /131.25 BTCnominal).Cap_user ≤ 200 BTC(224.00 BTCtotal, Stage 2):K = 144(225.00 BTCfloor /450.00 BTCnominal). (Seespec/02 §4for 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_jlocksBond_BTC = 2.00 BTCinStake_0under ephemeralQ_lane_{j,l}(allN = 7presigner ephemeral shares permanently deleted after presigning theR = 64rounds!).- Each round
r ∈ {1..R}binds a one-time 256-bit Lamport keypairL_{j,l,r}(256OP_HASH160pairs(H_{k,0}, H_{k,1})) signing the acyclic pre-fundingvault_id(§2.2). RoundTx_r(spendsStake_{r-1}after<1,872> OP_CSV, revealing256Lamport preimages =5,376 Bwitness ≈1,344 vB, totalRoundTx_r ≈ 1.8 kvB ≤ 10,000 vBTRUC v3) creates:Out 0 = Stake_r(Bond_BTC = 2.00 BTC):- Leaf 1 (Next Round):
<1,872> OP_CSV(13.0d— enforcesW_max = 1active kickoff per lane on L1!) →RoundTx_{r+1}. - Leaf 2 (Clean Retirement):
<2,016> OP_CSV(14.0d) →RetireStakeTx_r(returns2.00 BTCtoO_j; spendingStake_rpermanently double-spends and killsRoundTx_{r+1..R}forever! The STF forbids unlockingO_j'sB_zbtcuntilRetireStakeTx_rconfirmsK-deep,AssignedObligations[O_j] == 0, AND removingO_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 BOTHvin[0] = Stake_rANDvin[1] = VaultConnector_r!) paying:vout[0] = 0.15 BTCimmediately in native Bitcoin L1 BTC to winning verifierP_{V_i},vout[1..6] = 6 × 0.15 BTCChalPayoutEscrow_{r,j}(j ≠ i) — each a 2-leaf Taproot output: Leaf 1 co-spendsChalProofConnector_{r,j}(created ONLY whenV_jactually broadcastChallengeTx_{r,j}during[0, 144]) +<P_{V_j}> OP_CHECKSIG→ pays0.15 BTCnative L1 BTC directly toP_{V_j}; Leaf 2<144> OP_CSV→ pre-signedOP_RETURNburn ifV_jdid NOT challenge!vout[7] = 0.95 BTCimmediateOP_RETURNburn (0.95min burn if all7challenge; up to1.85 BTCburn if1challenges!),vout[8] = 0-satP2Aephemeral anchor! (Zero2^7 = 128subset explosion: only7pre-signedDisproveTx/TimeoutSlashTxpairs per round +6tiny 2-input claim/burn txs per verifier!)
- Leaf 4 (256-Leaf Lamport Equivocation Slash, Depth 8, Pre-Signed at
t = 0): Leafk ∈ [0..255]verifiesOP_HASH160 <H_{k,0}> OP_EQUALVERIFY OP_HASH160 <H_{k,1}> OP_EQUALVERIFY <Q_lane_{j,l}> OP_CHECKSIG→BurnBondTx_{r,k}(~200 vBTRUC v3, spendsStake_ralone) burning100%of2.00 BTCBond_BTCtoOP_RETURN.
- Leaf 1 (Next Round):
Out 1 = VaultConnector_r(546sats):<1,728> OP_CSV(12.0d>max_dispute_end = 1,584blks!) → ONE singleTakeTx_{d,j,l,r}(OR spent immediately asvin[1]ofDisproveTx_{r,i}/TimeoutSlashTx_{r,i}, guaranteeing0satoshis stolen fromU_don any bisection slash!).Out 2..8 = VerifierSlot_1..7(546sats each): Simultaneous non-staggered[0, 144]block challenge window — ALLN = 7slots open at block0(<P_{V_i}> OP_CHECKSIG) and expire at<144> OP_CSV(24h). EachChallengeTx_{r,i}creates BOTHChalEscrow_{r,i}(F_chal = 0.40 BTC) AND a546-satChalProofConnector_{r,i}unlockingV_i's0.15 BTCnative L1 payout inChalPayoutEscrow_{r,i}ifO_jis slashed!Out 9 = 0-satP2AEphemeral Anchor (0x51024e73).
3.2 n = 8 BitVMX-CPU (RV32IM) Wrapped-SNARK Verifier Bisection & Core >= 29.0 TRUC v3 Compliance (R8-H04, R8-H05)
- Normative
RV32IMGuest Computation Boundary (R8-H05Closed):- The disputed
RV32IMguest program running insideBitVMX-CPU(≤ 8^9 = 2^27 = 134,217,728RISC-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 MBBitcoin stripped-block SHA-256 scanning and SMT reconstruction MUST NOT execute directly insideRV32IM— they run inside the off-chain ZK prover proved byvk_STF(spec/02 §3.2). - Mandatory Gate G2 (
spec/05 §5): Before Stage 1A code freeze, the team MUST publish reproducible Rust →RV32IMsource and compiled ELF binary demonstratinginit_steps + exec_steps <= 0.5 × 8^9 = 67,108,864on worst-case adversarial inputs (if exceeded, either bump search depthl = 9 → 10,8^{10} = 1.074Bsteps adding+2steps /+144blks, or adopt reusable BitVM3-GC).
- The disputed
n = 8Search Branching (3bits/round,7 × 20 BOP_HASH160Intermediate Trace Hashes):- W-OTS cost per prover search tx:
7hashes ×43digits (40data nibbles +3checksum nibbles per 20-byte hash) =301W-OTS digits ×95.5 WU/digit=28,746 WU(7,186.5 vB) +~250 vBtx overhead≈ 7,437 vB (7.44 kvB) ≤ 10,000 vB(100% BIP-431 TRUC v3!). - Search depth:
ceil(27 / 3) = 9search rounds (9prover txs +9verifier 3-bit interval choice txs) +1Start/Read (~3.0 kvBprover) +1Final Trace (~5.0 kvBprover) / Execute-1-RISC-V-Opcode (~8.0 kvBverifier) =20sequential steps. - Total Worst-Case Dispute Weights (INCLUDING
10 × 153 vB = 1,530 vBP2A CPFP Children,R8-H02/R8-H04):- Prover (
O_j):9 × 7.44 + 3.0 + 5.0 = 74.96 kvB(cap75.00 kvB) +10 × 153 vBP2A 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 cap15.00 kvB) +10 × 153 vBP2A CPFP (1.53 kvB) =16.53 kvB.
- Prover (
- W-OTS cost per prover search tx:
- Widened Exact Timelock Ordering (
T_step = 72blocks =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.0Preferred), TRUC v3 (nVersion = 3),P2A& Out-of-Band Relay Audit (R8-H04,R8-M09):- Normative Node Floor: Zero-value (
0-sat)P2Aephemeral dust + 1P1C package relay requires Bitcoin Core>= 29.0(v31.0preferred; Core28.0rejects0-satP2Aoutputs as non-standard!). - Every pre-signed tx is
≤ 10,000 vB(RoundTx_r0.2–0.5 kvB`).1.8 kvB,TakeTx~`3.17 kvB, Prover search tx7.44 kvB, Execute-1-Opcode≤ 8.0 kvB, Verifier choice/Slash/Burn - Zero Unconfirmed TRUC Child Chaining: Because
TakeTx(~3.17 kvB) and prover search txs (7.44 kvB) exceed BIP-431's1,000 vBchild limit, EVERY protocol step spends ONLY confirmed parent outputs (ancestor_count = 1), attaching at most ONE~153 vB ≤ 1,000 vBCPFP child via0-satP2A(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 = 72blocks (12h) absorbs prolonged sibling-eviction pinning and transient fee spikes.
- Normative Node Floor: Zero-value (
- Honest Fee-Rate Design Envelope (
500 sat/vBSustained Across ALL20Steps):- Prover worst-case fee @
500 sat/vB(incl.10 × 153 vBCPFP):76,530 × 500 = 38,265,000sats (0.38265 BTC) ≤F_chal = 0.40 BTC(exact break-even522 sat/vBsustained across all10prover txs!). - Verifier worst-case fee (incl.
10 × 153 vBCPFP):16,530 × 500 = 8,265,000sats (0.08265 BTC@500 sat/vB;12,397,500sats =0.12398 BTC@750 sat/vB).
- Prover worst-case fee @
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 for320leaves at Stage 1AM = 5, R = 64) or417 B(depth 12 for2,560leaves at Stage 240lanes ×64). - Peak stack elements:
258 << 1,000BIP-342 limit. - Total
TakeTxweight (incl.VaultConnector_rinput + recycledAdmissionTicketUTXOoutput +P2A):~3,142 vB(depth 9) /~3,166 vB(depth 12)≤ 3,200 vB ≤ 10,000 vBTRUC v3 parent (must spend confirmedVaultConnector_ronly).
- Tapscript size:
- Equivocation Solvency: If
O_jcommittedvault_id_1inRoundTx_r, passedT_take = 1,728, and broadcastTakeTxonvault_id_2 ≠ vault_id_1,O_jMUST reveal both preimages for~128differing bitsk, letting any1-of-∞challenger executeBurnBondTx_{r,k}onStake_rLeaf 4 during[1,728, 1,872](144-blk window).100%of2.00 BTCBond_BTCburns toOP_RETURN, and the STF burnsD_d(≤ 0.50 BTC) fromO_j's hard-partitionedB_custody(0.55 BTC) + pays0.05 BTCequivocation bounty (and restoresR[O_k] += D_difvault_id_2was assigned to another honest operatorO_k) — keeping remainingzBTC100% 1:1 solvent (0user 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}pays0.40 BTCtoO_jONLY IFO_jwinsDispute_i(covering full76.53 kvBhonest prover fees + CPFP up to522 sat/vB); otherwiseV_ireclaims100%of0.40 BTCcleanly.- Each operator lane locks
B_zbtc = 0.60 BTCinside canonical Rollup state, HARD-PARTITIONED into two non-overlapping sub-buckets (R8-H01,R8-N05):B_custody = 0.55 BTC(0.50 BTCmax-vault Lamport equivocation restitution +0.05 BTCequivocation bounty; NEVER debited byExitSlotUTXOgriefing!), ANDB_grief = 0.05 BTC(strictly dedicatedExitSlotUTXOgrief buffer).
- 100% Native Bitcoin L1 Verifier Payouts (
0%zBTCCrisis Discount,0%R8-N05Coupling!): BecauseDisproveTx_{r,i}/TimeoutSlashTx_{r,i}spends BOTHStake_r (2.00 BTC)ANDVaultConnector_r(0BTC stolen fromU_d), EVERY active honest challenger receives0.15 BTCin native Bitcoin L1 BTC (vout[0]immediately for winnerV_i, andvout[1..6]ChalPayoutEscrow_{r,j}claimed viaChalProofConnector_{r,j}for every other challengerV_j; unclaimed slots burn after144blks, plus0.95 BTCminimum immediateOP_RETURNburn!). On L2,O_j's0.55 BTCB_custodyis 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 Stolen | Every Active Honest Verifier L1 Payout (Stake_r) | Min Stake_r L1 Burned | Honest 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 BTC | 0.1500 BTC native L1 | 0.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 BTC | 0.1500 BTC native L1 | 0.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 BTC | 0.1500 BTC native L1 | 0.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 — ClosesR8-M03):<6*r> OP_CSV OP_DROP <P_{O_{k_r}}> OP_CHECKSIGwherek_r = (H(exitId) + r) mod M_active(0%repeat acrossr = 0..M_active - 1!). - Leaves
M_active .. 2M_active - 1(Registered Open Race After6*M_activeBlocks):<6*M_active> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIGfor each active operatorO_j. - Leaf
2M_active(EXIT_CANCEL):<288> OP_CSV OP_DROP <cancelPubKey> OP_CHECKSIG(288 > 6*M_activeblks).
Universal STARK Spend-or-Refund Rule (K-deep spend of ExitSlotUTXO, R8-H01 Hardened):
- Valid Fronting (Leaf
0..2M_active-1ANDvout[0] == (destScriptPubKey, ≥ grossSats - f_op)): Exit markedCOMPLETED;ReimbursementCredit[O_j] += grossSats(tagged with the exit's creation height for oldest-PendingExitreimbursement priority —R8-N01!). Bitcoin L1 UTXO exclusion makes double-fronting and refund-vs-front races (M-8) cryptographically impossible. - Non-Paying Operator Grief Spend (Leaf
0..2M_active-1ANDvout[0]fails payout check — Even in ak = 20Single-Block Burst!): STF atomically cancels EVERY grieved exit, refunds100%ofgrossSatszBTCto every victim (E -> C), deductsmin(0.01 BTC, floor(B_grief[O_j] / k_burst))strictly fromO_j's hard-partitionedB_grief(0.05 BTC) to each victim in that block, auto-suspendsO_j, and excludesO_jfrom all NEWExitSlotUTXOTaproot trees! Even ak = 20single-block grief burst pays every victim250,000sats (0.0025 BTC, covering a150 vBretry fee up to1,666 sat/vB), NEVER debits 1 satoshi fromB_custody(0.55 BTC), and has0impact on L1Stake_rverifier payouts (R8-N05). - User Cancel (Leaf
2M_active) or Fee Bump (0x06 EXIT_FEE_BUMP):0x06raisesf_opin-place during fee spikes (and wallets may optionally attach a deterministic Dutch-auctionf_opschedule); Leaf2M_activecleanly refundsgrossSatszBTC(NOT native BTC) after288blks 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 7.80 BTC in **`** (~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 12.00 BTC in **`** (~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 BTC | 134.0 BTC | Scales w/ concurrent dispute cap | 3.077 vaults/d (1.026 BTC/d) | 16 BTC in 34 BTC in **` |
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 everyTcontainingE(v_new)(<= 160live vaults atM = 5, R = 64), guaranteeing2×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_rcannot unlockO_i'sB_zbtcif removingO_i's remaining rounds violates Hall's Marriage Invariant above. - Zero Passive-Timeout Slash: Once
U_dis assigned toO_j(movingD_dfromR[O_j] → AssignedObligations (A)), assigned vaults NEVER passively expire into a slashable state (eliminating withholding-miner slash attacks); only explicitO_j-signed0x07 RELEASE_ASSIGNMENTreleases 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:
- Graduated Mainnet TVL Ramps: Stage 1A launches with
AdmissionTicketUTXOgenesis capped strictly at2.0 BTC(90 days live bug-bounty soaking) →5.0 BTC(90 days) →10.0 / 15.0 BTCpilot cap. - Gate G4 Formal Verification & Differential Consensus Fuzzing (
spec/05 §5): Mandatory formal proof ofV = C + L + E + R + A + B, Hall's invariant, and BIP-141 witness completeness plus differential fuzzing against Bitcoin Core before mainnet launch. - Voluntary Unwind Circuit Breaker: If a critical non-exploited bug is discovered in
vk_STF, Cohort 1 (1-of-Npresigner halts newσ_certattestations immediately — zero new deposits!), operators front all outstanding user0x01exits viaExitSlotUTXOto drainzBTCorganically to0on Bitcoin L1, and remainingv1lanes retire cleanly viaRetireStakeTx_rbefore launching a patched, non-commingledzBTC_v2. (No governance key ever touches existing vault funds.)
- Maturity & Engineering Reality:
BitVMX-CPU/BitVMX-protocolis pre-mainnet today. Production delivery (off-chain stripped-block ZK prover + compiledRV32IMwrapped-SNARK verifier ELF +StakeChainceremony +AdmissionTicketUTXO+ExitSlotUTXO+ Gate G1–G5 audits) is realistically12–18+ monthsfor 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 BTCactive ASP liquidity (0slashing 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_Mikeconfirms in an Ark VTXO tree): Pure0-of-Nunilateral exit (zero ASP, zero Zenon signers!) by broadcastinglog2(N)pre-signed tree-branch transactions (N = 64 → 6txs;N = 1,024 → 10txs) prior to VTXO expiry. - Explicit Compromises Relinquished: (1) No pooled fungible
zBTCtoken (discrete VTXOs; exiting0.25 BTCunilaterally from a2.0 BTCVTXO requires exiting the entire2.0 BTCVTXO on-chain unless pre-split in-round); (2) Pre-roundarkoortransfers trust the ASP not to collude with senderAlice/Bob(wallets MUST separate trustless in-round VTXOs fromarkoorbalances explicitly in UX); (3) Hard VTXO expiry requires automated watchtowers/online refreshes orlog2(N)L1 branch fees.
- Post-L1-round (after
Appendix A: Non-Normative Future Tracks — Track B Pure Tier-0 Bitcoin Soft-Fork Covenant & Track A1/A2 Reference
Status: NON-NORMATIVE. Nothing in
v2depends 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 spendsvin[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; noOP_BLOCKHASHneeded for custody!):- Deposits: Depositor's
DepositInboxUTXO(acctHash, <144> OP_CSV refund)is spent directly asvin[1..d]ofT; covenant verifiesV_out0 = V_in0 + sum(V_in_dep) - sum(V_out_exit)(miner fee paid strictly by external fee input!). - Feeless Zenon Batches: Complete mutated-leaf state diffs + transparent STARK
π_STFlive directly inT's witness (zero CRS). - Mike's Direct Unilateral
0.25 BTCExit (0Signers,0Operators,0LPs): Mike spendsvin[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).
- Deposits: Depositor's
- Internal key = provably unspendable
- Two Concrete Minimal Soft-Fork Primitives:
- Path B1 (
OP_CCVBIP-443 +OP_TXHASH+OP_VERIFY_STARK): Single~1–3 kvBL1 tx, instant 1-block finality, zero challengers. - Path B2 (
OP_CATBIP-347 Alone): Poelstra Schnorr-trick sighash introspection enforcing recursive state-carry + value conservation, paired with either chained in-Script Circle-STARK (~40–100 kvBwitness, 0 challengers) OROP_CAT-MATT optimistic bisection (~500 vBhappy path,~5–20 kvBon dispute,0committees/operators,1-of-∞safety).
- Path B1 (
- UTXO Contention Handling: Track B-Base enforces
<1> OP_CSV(nSequence ≥ 1, max 1 spend/block) + native Bitcoin RBF fee-market priority (zeroOP_BLOCKHASH). Optional Track B+ additionally addsOP_BLOCKHASHif an externalOP_RETURNmandatory forced-exit queue (D_force = 6blks) 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(minimalM = 3–5) or532–1,454 BTC(40–80lanes) of operator capital is available (13.30–18.175 BTC/lane at~1.0–1.3M vBGroth16 asserts,nVersion = 2non-TRUC large txs,≤ 500 sat/vBfee ceiling). - Emerging
BitVM3-GC(Garbled-Circuit SNARK + Clementine Reusable Rounds — Evaluated at Gate G2):- Advantages: Shrinks on-chain disprove to
~93 vB–1.0 kvBand2rounds (versus20-stepBitVMX-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-Ngarbler trust model AND require1–5 GBper one-time garbled circuit instance — totaling~2.2–11.2+ TBof off-chain archival DA acrossM × L × R × N = 5 × 1 × 64 × 7 = 2,240rounds (until reusable DV-SNARK garbled circuits mature). Gate G2 explicitly benchmarks compiledRV32IMBitVMX-CPUagainst mature reusableBitVM3-GCbefore Stage 1A code freeze; Stage 2 always supports clean non-commingledzBTC_v2adoption.
- Advantages: Shrinks on-chain disprove to
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.