v1 (v3.0.0-rfc) · archived baseline · superseded
zBTC: Bitcoin–Zenon Interoperability Protocol Specification
Archived byte-for-byte v1 snapshot (v3.0.0-rfc, commit 6ab3999) — redline baseline for current v2 (v3.1.0-rfc).
Showing word-highlighted redline changes from archived v0 (v2.5.0-rfc) to v1 (v3.0.0-rfc). For structured finding-by-finding rationale, see theChangelog.
| @@ -1,135 +1,220 @@ | |||
| 1 | 1 | # zBTC: Bitcoin–Zenon Interoperability Protocol Specification | |
| 2 | 2 | ||
| 3 | - | **Version:** 2.5.0-rfc (Public RFC — iteratively hardened across 6 adversarial review rounds: [`HOSTILE_REVIEW.md`](./reviews/HOSTILE_REVIEW_R1.md) through [`HOSTILE_REVIEW_R6.md`](./reviews/HOSTILE_REVIEW_R6.md), with all Round-6 findings `R6-H1..H2`, `R6-M1..M5`, `R6-L1..L9`, and `S6-1..S6-6` resolved below) | |
| 4 | - | **Status:** Public Request for Comment (`v2.5.0-rfc`) — NOT mainnet-active; gated on public/independent verification, upstream ratification (§6), and executable Signet / `go-zenon` artifacts (§7). | |
| 5 | - | **Target Networks:** Bitcoin Mainnet (`bip-0340`/`bip-0341`/`bip-0342` Taproot + Recursive STARK/Groth16 BitVM2) ↔ Zenon Network (`go-zenon` `origin/release/0.0.11-rc1` `f19955f` / `origin/dev` `770e893`) | |
| 6 | - | **Numeric Oracle:** All modeled struct sizes, depth-256 witness bounds, per-block `OP_HASH160` `w=4` W-OTS certificate-DA + Leaf-3B SHA-256 stack/size bounds, exact integer-satoshi economics, latency-aware reachability & 180-day multi-gen timeline simulation, staggered CLTV timings, slow-block tolerances, and halving-indexed `K` bounds are asserted by [`scripts/verify_spec_bounds.py`](./scripts/verify_spec_bounds.py) (`python3 -I scripts/verify_spec_bounds.py`). Unmeasured Signet BitVM2 weights, circuit counts, hashrate-growth factors, and stress prices are explicitly labeled **`ASSUMED STAGE 0C TARGETS`** (Gate G-2). | |
| 3 | + | **Version:** `v1` (`v3.0.0-rfc` — **Zero-Federation Phased Architecture**: Stage 0 Verify Bitcoin SPV + Non-Custodial PTLC/LN → Stage 1A Right-Sized `BitVMX` `n=8` Sovereign ZK Validity Rollup | Stage 1B `clArk` Alternative Gate → Stage 2 Zero-TTP Scale & Upgrade; supersedes archived `v0` / `v2.5.0-rfc`, see [CHANGELOG.md](./CHANGELOG.md)) | |
| 4 | + | **Status:** Public Request for Comment (`v1` / `v3.0.0-rfc`) — NOT mainnet-active; Stage 0 gated on upstream `go-zenon` release (`0aa299e` + `#239` closure + full `SetPlasmaVariables` pinning); Stage 1A gated on `BitVMX-CPU` Signet verification, independent third-party cryptography/Bitcoin-Script audit (**M-15**), and hard-BTC operator/verifier capital commitment. | |
| 5 | + | **Target Networks:** Bitcoin Mainnet TODAY (`bip-0141`/`bip-0340`/`bip-0341`/`bip-0342`/`bip-0431` Taproot + TRUC v3 + `P2A` — **zero Bitcoin soft forks**, **zero federated signers**) ↔ Zenon Network (`go-zenon` first tagged release containing `0aa299e`, `#239` closed, `DynamicPlasmaSpork` & `PtlcSpork` enforced; local reference clone `master` `e8986a6` / `origin/dev` `770e893`) | |
| 6 | + | **Consistency & Bounds Checker:** All modeled `n = 8` `BitVMX` W-OTS/TRUC v3 weights, 256-bit Lamport `TakeTx` stack/size bounds, timelock ordering (`[0, 144] → 1,104 < 1,152 < 1,296 < 1,440`), colluding-verifier positive-EV matrices (`k_collude = 0..6`), `{0.50, 0.25, 0.25}` BTC bank-run exit bounds, halving-indexed TVL-scaled `K`, 1-/2-block coinbase midstate SHA-256 padding, honest `8 MiB` `go-zenon` Plasma bounds, PTLC `2.3×` slow-block margins, `clArk` exit weights, and a **non-no-op 2,000-step randomized state-machine simulation (including real Bitcoin reorgs, `ExitSlotUTXO` grief slashes, and Lamport equivocation slashes)** are asserted by [`scripts/verify_spec_bounds.py`](./scripts/verify_spec_bounds.py) (`python3 -I scripts/verify_spec_bounds.py`). *This script checks internal mathematical consistency against explicitly labeled `SOURCED_`, `POLICY_`, and `PRE_MAINNET_TARGET_` inputs; it is not an empirical Signet benchmark or audit.* | |
| 7 | 7 | ||
| 8 | - | **Upstream Provenance:** | |
| 9 | - | - Vision Proposal: [`https://btc-moonshot.github.io/bigidea/`](https://btc-moonshot.github.io/bigidea/) (*"A Feeless Settlement Lattice for Bitcoin"*) | |
| 10 | - | - Specifications Commons: [`zenon-developer-commons`](https://github.com/TminusZ/zenon-developer-commons) (`HEAD` `3719452`) | |
| 11 | - | - Reference Node Codebase: [`go-zenon`](https://github.com/zenon-network/go-zenon) (`origin/release/0.0.11-rc1` `f19955f`, `origin/dev` `770e893`; `master` `e8986a6` legacy reference only) | |
| 8 | + | **Upstream Provenance & Review Trail:** | |
| 9 | + | - Vision Proposal: [`https://btc-moonshot.github.io/bigidea/`](https://btc-moonshot.github.io/bigidea/) *(see §9 for mandatory claims alignment)* | |
| 10 | + | - Zenon Non-Bridging Thesis: `zenon-developer-commons/essays/Verify Bitcoin, Don't Bridge It.md` & `docs/specs/spv-event-oracle-spec.md` | |
| 11 | + | - Reference Node Codebase: [`go-zenon`](https://github.com/zenon-network/go-zenon) (`master` `e8986a6`, `origin/dev` `770e893`, target release tag containing `0aa299e` + `#239`) | |
| 12 | + | - Archived Baseline (`v0` / `v2.5.0-rfc`): Frozen byte-for-byte in [`versions/v0/`](./versions/v0/) (SHA-256 verified in CI). | |
| 13 | + | - Consolidated Hostile Review (`R7` of `v0`): [`reviews/HOSTILE_REVIEW_R7_CONSOLIDATED.md`](./reviews/HOSTILE_REVIEW_R7_CONSOLIDATED.md) — every finding `C-1..C-4`, `H-1..H-8`, `M-1..M-15`, `L-1..L-4`, plus convergence findings `N-1..N-6` and `B1..B5`, is dispositioned in [`CHANGELOG.md`](./CHANGELOG.md). | |
| 12 | 14 | ||
| 13 | 15 | --- | |
| 14 | 16 | ||
| 15 | - | ## 1. Executive Summary & Governing Invariant | |
| 17 | + | ## 1. Executive Summary & Architectural Pivot (`v0` → `v1`) | |
| 16 | 18 | ||
| 17 | - | This specification suite defines the protocol, cryptography, economics, and `go-zenon` upgrades to store native BTC in a **BitVM2-constrained Taproot vault** on Bitcoin, represent that BTC 1:1 as **`zBTC`** (`1 base unit = 1 satoshi`, 8 decimals, `21,000,000 BTC` cap) via an atomic **Treasury Pre-Mint** `SettlementContract`, transfer `zBTC` with **0 satoshi BTC fees** via Zenon's QSR Plasma / SHA3-256 PoW capacity model, verify Zenon state via **30-day BLS12-381 `FinalityCommitteeRoot` + `StateRoot`** proofs, and offer **peg-free, zero-vault-trust PTLC adaptor swaps and Lightning submarine-swap gateways**. | |
| 19 | + | ### 1.1 Why `v0` Failed — and Why Custodial Federated Multisigs Are Explicitly Rejected | |
| 18 | 20 | ||
| 19 | - | ### 1.1 The Governing Invariant (with Phase-2 Adjudication Addendum) | |
| 21 | + | The consolidated hostile review of `v0` (`v2.5.0-rfc`, [`R7`](./reviews/HOSTILE_REVIEW_R7_CONSOLIDATED.md)) and subsequent consensus/cryptographic audits established that **`v0` cannot be patched**: | |
| 22 | + | 1. **ZNN cannot secure BTC (`C-1`):** Real market liquidity (`400k–727k ZNN/BTC`, total ZNN market cap `~25–33 BTC`) makes `v0`'s `10,500 ZNN/BTC` slashing deterrents worth only `1.4–2.6%` of stated value (`~0.43–0.79 BTC` for 21 Pillars against a `15 BTC` cap). | |
| 23 | + | 2. **Zenon consensus fails at `≤ 49%` compromise (`C-2, H-1, H-2, H-3`):** Current `go-zenon` is longest-chain DPoS with zero slashing, deterministic height-only grindable `findSeed`, unweighted top-30 `groupA` sybil amplification, and a 30-Momentum hard rollback cliff (`protocol/chain_bridge.go`) allowing permanent chain splits at `49%`; adding classical BFT (`CommitteeRootSpork`) breaks BOTH safety and liveness at `> 33.3%`. Single-key `SporkAddress` / `CommunitySporkAddress` can mutate consensus code, and refundable QSR fusion allows whale Dynamic Plasma DoS. | |
| 24 | + | 3. **BitVM2 script costs break low-cap economics (`C-3, H-4, M-6`):** Real chunked Groth16 BitVM2 asserts (`~1.0–1.3M vB` / `4.0–4.8 MB` W-OTS) are `4.4–10×` larger than `v0`'s `220 kvB`, forcing `~13.30–18.175 BTC`/lane (`~40–91 BTC` in bonds even at bare-minimum `M = 3–5, L = 1`, exceeding ZNN's entire market cap!). | |
| 25 | + | 4. **Never-deleted `N`-of-`N` `Q_graph` & `CommitteeIdentityKey` (`C-4, N-2`) + fixed `1.0 BTC` buckets:** Rotating 30-day PoS committee roots forced never-deleted standing keys (sweep-all OR 1-key bricking at day 56), while fixed `1.0 BTC` buckets rejected `0.50` and `0.25 BTC` exits. | |
| 20 | 26 | ||
| 21 | - | > **Consensus orders. Execution computes. Authorization admits. Settlement accounts.** | |
| 22 | - | > | |
| 23 | - | > **Phase-2 Adjudication Addendum:** Under `execProfile = OPTIMISTIC`, `SettlementContract` hosts deterministic, panic-free, bounded-CPU registered verifier plugins (`VerifierRegistry`, e.g., `OPTIMISTIC_BTC_SPV_V1`) **solely to adjudicate single-step fraud challenges** against `BatchCommitmentV3.traceRoot`. All plugins MUST return typed `error` values (zero `common.DealWithErr` panics) and support both 1-tx fast challenges (`<= 12 KiB` typical) and bounded Multi-Tx Witness Sessions (`UploadWitnessProof = 8,676 B` at max SMT depth 256, `T_session = 12h`, blocking `FinalizeBatch` while open). Under Phase 3 (`ZK_VALIDITY`), Settlement verifies succinct proofs only and parses zero foreign data. | |
| 24 | - | > | |
| 25 | - | > **Boundary Addendum:** Destination chains enforce through the adapter and hash-pinned Interop Enforcement Specification bound by `ChainBinding.enforcementSpecHash`. | |
| 27 | + | **Why `v1` explicitly REJECTS custodial `k`-of-`n` federated multisigs:** | |
| 28 | + | Falling back to a custodial `k`-of-`n` federated multisig is **normatively forbidden in `v1`**. Federated custody: | |
| 29 | + | - Violates Bitcoin's non-custodial ethos and Zenon's own thesis (*"Bridges Are Custody Wearing a Mask"* — `Verify Bitcoin, Don't Bridge It.md`); | |
| 30 | + | - Fails **Bob's partial-recovery test** under `49%` Zenon compromise (a 49% `go-zenon` DPoS split breaks cross-signer Zenon state agreement and freezes payouts, while safety depends entirely on trusting external custodians); | |
| 31 | + | - Fails **Mike's zero-signer-cooperation test** completely (if federated signers refuse to sign Mike's `0.25 BTC` payout, `0` satoshis leave custody; a backup recovery timelock belongs to another custodial multisig and never unlocks while active signers refresh UTXOs). | |
| 26 | 32 | ||
| 33 | + | ### 1.2 Governing Cryptographic Boundaries (Theorem 1 & Theorem 2) | |
| 34 | + | ||
| 35 | + | Every design decision in `v1` is constrained by two formal theorems (proved in [`spec/01 §1`](./spec/01-bitcoin-taproot-vault-enforcement.md#1-cryptographic-boundaries-theorem-1--theorem-2) and [`spec/04 §1`](./spec/04-bitcoin-anchoring-and-light-client.md)): | |
| 36 | + | ||
| 37 | + | > **Theorem 1 (Bitcoin Mainnet No-Covenant Impossibility — BIP-340/341/342, Zero Soft Forks):** Given pooled deposit UTXOs `U_A`, `U_B` created at `t_0` on Bitcoin Mainnet today, if ZERO pre-committed parties produce a new signature at `t_1`, it is **cryptographically impossible** for 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 binding `0.75 BTC` back into custody. Tapscript lacks output introspection (`nValue`/`scriptPubKey`), so any unsigned spend is trivially miner-front-run, while pre-signed transactions at `t_0` cannot bind future unknown `(P_Mike, 0.25 BTC)`. **Corollary 1B:** On Bitcoin Mainnet today, optimistic reimbursement bridges (`BitVM2`/`BitVMX`/`BitVM3`) are strictly bounded by **`1-of-N` ephemeral setup deletion + challenger/verifier safety + `1-of-M` pre-committed operator exit liveness**. | |
| 38 | + | ||
| 39 | + | > **Theorem 2 (Young Low-Cap Capital / Trust / UX Trilemma — 0 Federation, 0 Soft Forks, `2–20 BTC` Bootstrap Capital):** With zero federated signers, zero Bitcoin soft forks, `~25–33 BTC` ZNN market cap (`0%` ZNN slashing usable), and realistic bootstrap capital `C ∈ [2, 20] BTC`, NO protocol can simultaneously achieve all three of: | |
| 40 | + | > - **(A)** Instant, non-expiring, fungible cross-depositor `zBTC` (`Alice + Bob → Mike` with zero sender-collusion risk), | |
| 41 | + | > - **(B)** `1-of-∞` permissionless challenging surviving `200–500 sat/vB` fee spikes (blocked by BitVM2's irreducible `~40–91 BTC` bond floor even at `M = 3–5, L = 1`), AND | |
| 42 | + | > - **(C)** `0-of-N` unilateral arbitrary-amount Bitcoin L1 exit (blocked by Theorem 1; `clArk` achieves post-round `0-of-N` only by sacrificing **(A)** via discrete expiring VTXOs and pre-round `arkoor` sender+ASP collusion). | |
| 43 | + | ||
| 44 | + | ### 1.3 What `v1` (`v3.0.0-rfc`) Is, Stated Plainly | |
| 45 | + | ||
| 46 | + | `v1` specifies a **zero-federation, zero-soft-fork, zero-ZNN-custody-coupling** phased architecture starting from zero custody risk: | |
| 47 | + | ||
| 48 | + | 1. **Stage 0 (`0–6 months`, `0 BTC` bridge custody risk, `0–5 BTC` voluntary LP — Mandatory Start):** | |
| 49 | + | - Ship the **Direct-on-L1 Bitcoin SPV Event Oracle** (`spec/02 §2`, strictly Event Validity, zero custody authority, aligned with `Verify Bitcoin, Don't Bridge It.md`) and **non-custodial PTLC / Lightning HTLC atomic swaps** (`spec/03 §1`, hardened for `2.3×` June 2021 slow blocks) while building and auditing the Stage 1A Rollup Core + `BitVMX-CPU` RISC-V verifier on Signet. | |
| 50 | + | 2. **Stage 1 Decision Gate (Explicitly Governed by Hard-BTC Commitment & Timeline):** | |
| 51 | + | - **Stage 1A — Primary Path for Pooled Fungible `zBTC` (`12–18+ months` incl. audit for 4–6 engineers; requires `~12.8–18.8 BTC` of non-yielding hard BTC ≈ `40–75%` of ZNN's `~25–33 BTC` market cap):** | |
| 52 | + | - **Shared Core (0% Zenon Trust — Survives 49%–100% Zenon Compromise):** A **Bitcoin-Anchored Sovereign ZK Validity Rollup** where Zenon is demoted to an untrusted feeless sequencing & soft-preconfirmation layer (`AccountBlock.Data`, `~28,480` Plasma, `0` sat BTC fee, NOT native ZTS). Canonical ordering, complete mutated-leaf DA (`0x02 BATCH_DA` + embedded `π_batch`), and uncensorable forced inclusion (`0x01 FORCED_EXIT`, `0x03 FORCED_TRANSFER`) live strictly on Bitcoin L1 via full stripped-block (`≤ 1,000,000 B`) scanning. | |
| 53 | + | - **Custody Engine (Right-Sized `BitVMX`, `n = 8`, `M = 3–5`, `L = 1`, `N = 7`):** Open-source `BitVMX-CPU` (`RV32IM`) interactive bisection (`~7.44 kvB`/prover tx, **100% BIP-431 TRUC v3** with `P2A` ephemeral anchors; `~75 kvB` Prover / `~15 kvB` Verifier; `F_chal = 0.40 BTC` covering `500 sat/vB` sustained across all `20` steps, `533 sat/vB` break-even), deleted-key `{0.50, 0.25, 0.25}` BTC multi-tier vaults, 256-bit Lamport `TakeTx` equivocation slashing (`~3.1 kvB` TRUC v3), dual-input `Stake_r` + `VaultConnector_r` bisection slashing (`0` BTC stolen from vault, positive EV `≥ +0.0167 BTC` for every honest verifier even if `6 of 7` verifiers collude with the operator!), and `(2M + 1)`-leaf registered-operator spend-or-refund `ExitSlotUTXO`. **Pre-mainnet maturity explicitly disclosed.** | |
| 54 | + | - **Stage 1B — Explicit Alternative Gate (If Hard-BTC Budget `< 5–10 BTC`, `3–6 mo` Launch Target, or `0-of-N` Post-Round Exit Outweighs Pooled Fungibility):** | |
| 55 | + | - Do **NOT** under-bond `BitVMX`/`BitVM2`. Deploy **`clArk` (`Second bark` / `Ark Labs arkd`) + Zenon SPV/PTLC** (`2–5 BTC` active ASP liquidity, `0` bonds), explicitly relinquishing global pooled `zBTC` in favor of discrete expiring VTXOs (disclosing `arkoor` sender+ASP collusion and `log2(N)` L1 exit fees). | |
| 56 | + | 3. **Stage 2 (`12+ months`, Zero-TTP Scale & Upgrade — Zero Dead-End User Trap):** | |
| 57 | + | - Deleted-key Stage 1A vaults NEVER expire and drain organically 1:1 to native BTC via `0x01` exits (no deleted-key L1 rollover). Identical-STF `BitVMX` expansion (`M = 5 → 20`, `L = 1 → 4`, `K = 36 → 144`) uses strictly `N`-of-`N` Cohort 1 voluntary handover; changing custody backends (`BitVM3-GC` / `BitVM2` / **Appendix A Track B Pure Tier-0 `OP_CCV + OP_TXHASH + OP_VERIFY_STARK` or `OP_CAT` Covenant**) ALWAYS launches a clean, non-commingled `zBTC_v2` instance with zero governance backdoor. | |
| 58 | + | ||
| 27 | 59 | --- | |
| 28 | 60 | ||
| 29 | 61 | ## 2. Normative Module Map & Authority Precedence | |
| 30 | 62 | ||
| 31 | - | | Module | File | Normative Scope | | |
| 63 | + | | Module | File | Normative Scope in `v1` (`v3.0.0-rfc`) | | |
| 32 | 64 | |---|---|---| | |
| 33 | - | | **Master** | [`SPEC.md`](./SPEC.md) | Unified architecture, end-to-end flows, **5-assumption honest security model** (§4), `dev`/`release` corpus errata (§5), Upstream Amendment Register incl. `A-PILLAR-1` (§6), staged activation & executable gates (§7). | | |
| 34 | - | | **Part 1** | [`spec/01-bitcoin-taproot-vault-enforcement.md`](./spec/01-bitcoin-taproot-vault-enforcement.md) | Hash-pinned **Bitcoin Interop Enforcement Specification (`BTC-ENFORCEMENT-V1`)**: 4-Key Registry; **30-day BLS12-381 `min-sig` fixed `408 B` cert DA (`targetCert \|\| handoffSlot`, zero-padded for 1-cert epochs; 7 per-block checksummed `OP_HASH160` `w=4` W-OTS messages + 6 midstates = `1,239` digits, `29,882 vB → 30 kvB` derived, `3` stack-safe inputs, Leaf-3B max `265` digits, `C = 1,208`)**; inner STARK BLS12-381 + outer BN254 Groth16 split; staggered CLTVs (`T_cutoff = 46d < T_kill = 56d < T_bond_expiry = 58d`, `288 > 72` trap gap, `1.476x`/`1.591x` slow-block tolerances); normative 30-day rotation schedule (reg by day `32`, re-graph by day `43`, cutoff day `46`, disclosed `5.0d` pre-epoch `DeferredLockQueue` window) & `RoundRetireTx` + fee-UTXO CLTV exits; `Q_graph` transcript + published Take leaf DA → Setup Committee attestation; exact integer-satoshi `F_assert = 1.45 BTC` (`289 kvB` break-even) & `Bond = 3.70 BTC`; Tier 1B/2; 11-item Wind-Down Plan. | | |
| 35 | - | | **Part 2** | [`spec/02-btc-authorization-domain-and-spv.md`](./spec/02-btc-authorization-domain-and-spv.md) | **Bitcoin Authorization Domain (`d_btc_asset`) & Adversarially-Bounded SPV Verifier**: 17 input tags (`0x00..0x10`); never-pruned `ActiveChainByHeight[h]` (`68 B`); streaming SHA-256 `BTC_TX_STREAM_CHUNK`; **multi-generation `TrackedVaultRecord` (`<= 2` active unexpired epochs, strict duplicate/3rd-epoch rejection)**; **SMT-absence-verified `BTC_VAULT_SPEND_PROOF` across `ACTIVE`, `RELEASED`, and `QUARANTINED` vaults** + published Take-txid leaf DA; decoupled `BTC_RELEASE_PROOF` (admits valid fronting even if vault trapped); single-authority non-overwritable `PEGOUT_SLOT_CLAIMED` (`lastLapsedOperatorId`); `VAULT_GRAPH_EPOCH_ADDED` (`0x0D`) for `ACTIVE`, `QUARANTINED`, AND un-claimed `RELEASED` vaults; exact `anchorExpiryTs == finalityEpochStartTs(epoch) + 58d` equality; `BTC_ROUND_RETIRED` (`0x10`); Governance-only `GOVERNANCE_ADD_BINDING`; halving-indexed `K_pilot = 14`; and 29 SPV conformance vectors. | | |
| 36 | - | | **Part 3** | [`spec/03-settlement-minted-zbtc-and-feeless-rails.md`](./spec/03-settlement-minted-zbtc-and-feeless-rails.md) | **Settlement Contract, Atomic Treasury `zBTC`, Plasma & Peg-Free Rails**: Hardened `TokenContract.IssueMinted` → single-use `ReceiveTreasury()`; never-reused `batchId` + `parentBatchId`; contiguous `domainInputSeq`; inductive `StepTraceLeaf` (`328 B`) + `ChallengeContinuity` (`1,700 B`); bounded Multi-Tx Sessions + ancestor-rejection refunds; **latency-aware (`+3.0d` horizon) + reservation-aware `G-21`** + `SyncRetiredLane` + kickoff-cutoff enforcement; **complete aligned Domain↔Settlement vault state machine** (explicit `quarantineReason` + `unrotatedVaultCount` inc/dec, `RepointTrappedPegOut`, `ResetFailedReimbursementSlot`, `SyncPendingTrapVault`, `SyncVaultGraphEpoch`, deterministic `SyncOrphanedVaultOutpoint`); single-authority slot expiry + `500 ZNN` `SlotBondZnn` + no consecutive re-claim; global `<= 16` duplicate refund cap/batch; BIP-327 tweaked PTLC & LN HTLC (`hashType = 1`). | | |
| 37 | - | | **Part 4** | [`spec/04-bitcoin-anchoring-and-light-client.md`](./spec/04-bitcoin-anchoring-and-light-client.md) | **Bitcoin Anchoring & Light Client Verification**: Genesis BTC block `710,968` lower bound; timestamp-bound checkpoint anchoring for light clients; `proof-format.md` V1 `SmtProof`; **30-day BLS12-381 `min-sig` `FinalityCommitteeRoot`** (IETF BLS POP distinct DSTs, depth-5 SHA-256 committee Merkle tree, `204 B` fixed cert, zero `CarryOverCertificate`); **historical-root-verified `SubmitInvalidCertProof`** (verifies sig under `cert.FinalityCommitteeRoot`, then checks ALL 7 cert fields against canonical state — economically enforcing transition-height handoffs and slashing forged handoffs at ANY height!); U2 finality gadget + **`72`-day post-committee-service stake lock** + voluntary `RequestExitCommittee` clean exit (`A-PILLAR-1`). | | |
| 38 | - | | **Part 5** | [`spec/05-go-zenon-upgrade-plan.md`](./spec/05-go-zenon-upgrade-plan.md) | **Detailed `go-zenon` Node Upgrade Plan**: All citations verified against `origin/release/0.0.11-rc1` (`f19955f`) & `origin/dev` (`770e893`); Phases `U0`–`U5`, `TokenContract.IssueMinted` → `ReceiveTreasury()`, `pillars.go` BLS12-381 key + PoP + historical-root full-preimage slashing + finality gadget + `72d` post-service lock & exit, `GovernanceContract` + `MultisigContract` (Stage 1B hard gate), `ChallengeDepositZnn` priority lane, `DeleteMomentum` reorg push. | | |
| 39 | - | | **Oracle** | [`scripts/verify_spec_bounds.py`](./scripts/verify_spec_bounds.py) | Exact integer-satoshi asserting oracle deriving every struct field-by-field (`PegOutState = 190 B`), per-block `OP_HASH160` `w=4` W-OTS cert-DA + 7-block Leaf-3B SHA-256 (`1,239` digits, `29,882 vB → 30 kvB`, Leaf-3B stack `<= 265` digits, `C = 1,208`), depth-256 upload (`8,676 B`), all 17 fast paths incl. inserted keys (`<= 11,300 B`), `F_assert = 1.45 BTC` (`289 kvB` break-even) & `Bond = 3.70 BTC`, latency- & reservation-aware reachability + 180-day simulation (`max_gens = 2`, `5.0d` pre-epoch `DeferredLockQueue`), staggered CLTVs (`46d < 56d < 58d`, `1.476x`/`1.591x` slow-block tol), `72d` lock, watcher liquidity (`1.46 BTC/lane`), `31,500 ZNN` min op bond + `500 ZNN` `SlotBondZnn`, exact Poisson (`353`/`472`), and halving-indexed `K_pilot = 14`. | | |
| 65 | + | | **Master** | [`SPEC.md`](./SPEC.md) | Zero-federation phased architecture, Theorems 1–2, end-to-end Bob & Mike traces (§3), honest Threat Model & Privileged Powers Table (§4), `go-zenon` baseline (§5), Upstream Amendments (§6), Stage 0/1A/1B/2 Decision Gates (§7), Non-Bridging Alignment & Public Claims (§8–§9), and Written R7 Disposition (§10). | | |
| 66 | + | | **Part 1** | [`spec/01-bitcoin-taproot-vault-enforcement.md`](./spec/01-bitcoin-taproot-vault-enforcement.md) | **Highest Custody Precedence (`BTC-BITVMX-V1`):** Theorems 1–2; acyclic `OP_DROP` `DepositTx` (`{0.50, 0.25, 0.25}` deleted-key vaults, `certBlob = 104 B`, `opBitmask`, zero-TTP cohort rule); `BitVMX-CPU` `n = 8` bisection (`301` W-OTS digits ≈ `7.44 kvB`, `20` steps, `75/15 kvB`, `F_chal = 0.40 BTC`, 100% TRUC v3); simultaneous `[0, 144]` challenge window, `T_take = 1,152`, `T_cooldown = 1,296`, `RetireStakeTx = 1,440`; 256-bit Lamport `TakeTx` (`5,922 B` script, `~3.1 kvB`); dual-input slash (`0.15/1.85/0.55` positive-EV matrix); `(2M+1)`-leaf `ExitSlotUTXO`; exact `12.8/18.8 BTC` capital & `65–72d` bank-run math; Stage 1B `clArk` spec; **Appendix A (Track B Pure Tier-0 Bitcoin Soft-Fork Covenant + BitVM2/BitVM3 Reference)**. | | |
| 67 | + | | **Part 2** | [`spec/02-btc-authorization-domain-and-spv.md`](./spec/02-btc-authorization-domain-and-spv.md) | **Stage 0 Direct-on-L1 Bitcoin SPV Event Oracle** (Event Validity only, 1-/2-block coinbase midstate SHA-256 final padding covering all `len % 64`, exact ABI/storage-op/`dp.MaxContractBlocks = 40` budget) + **Stage 1A Bitcoin-L1-Canonical Authorization Domain** (`0x00`..`0x07` `OP_RETURN "ZBTX"` tags, full `≤ 1 MB` stripped-block scan + single `wtxid_i` branch, launch-time `(h_lane_init, H, D)` PoW anchor with `D ≥ 0.50 × D(h_lane_init)` and TVL-scaled `K`). | | |
| 68 | + | | **Part 3** | [`spec/03-settlement-minted-zbtc-and-feeless-rails.md`](./spec/03-settlement-minted-zbtc-and-feeless-rails.md) | **Stage 0 Hardened Non-Custodial PTLC & LN HTLC Swaps** (absolute Unix timestamps, `2.3×` slow-block margin) + **Stage 1A Sovereign Rollup STF `F` & Feeless Zenon Sequencer Rails** (`AccountBlock.Data` `~28,480` Plasma, honest `8 MiB` `~1,050–1,200 tx/s` ceiling, `RollupHTLC`/`RollupPTLC`, `B_zbtc = 0.60 BTC`/lane accounting, `ExitSlotUTXO` spend-or-refund, permissionless DA batchers) + **Stage 1B `clArk` VTXO Coordination**. | | |
| 69 | + | | **Part 4** | [`spec/04-bitcoin-anchoring-and-light-client.md`](./spec/04-bitcoin-anchoring-and-light-client.md) | **Zenon `49%` Consensus Reality (`go-zenon` Code Proof) & Inverted Trust Hierarchy:** Proof of DPoS failure at `49%` (height-only `findSeed`, unweighted top-30 `groupA`, zero slashing, 30-Momentum cliff) and BFT failure at `> 33.3%`, why Bitcoin L1 ordering + DA + forced inbox achieves `0-of-N` Zenon trust (eliminating BLS finality from BTC custody), and non-custodial light-client UX notes. | | |
| 70 | + | | **Part 5** | [`spec/05-go-zenon-upgrade-plan.md`](./spec/05-go-zenon-upgrade-plan.md) | **Minimal `go-zenon` Upgrade Plan:** Stage 0 prerequisites (`0aa299e` tag, `#239` FIFO panic-stall closure, `DynamicPlasmaSpork` + full `SetPlasmaVariables` pinning of `MaxBasePlasmaInMomentum`, `MaxPriceChangePercent`, `FusedPlasmaTarget`, `PowPlasmaTarget`, `PriceChangeDenominator`, `PtlcSpork`, Stage 0 SPV Event Oracle) + **zero-hard-fork custody boundary for Stage 1A/1B** (`SporkAddress` cannot steal BTC or censor L1 exits). | | |
| 71 | + | | **Checker** | [`scripts/verify_spec_bounds.py`](./scripts/verify_spec_bounds.py) | Stdlib-only Python 3 Consistency & Bounds Checker asserting all Stage 0, Stage 1A (`BitVMX n=8`), Stage 1B (`clArk`), and Theorem 2 bounds + non-no-op 2,000-step randomized simulation with real Bitcoin reorgs, `ExitSlotUTXO` grief slashes, and Lamport equivocation slashes. | | |
| 72 | + | | **Changelog** | [`CHANGELOG.md`](./CHANGELOG.md) | Complete `v0` (`v2.5.0-rfc`) → `v1` (`v3.0.0-rfc`) finding-by-finding disposition (`C-1..C-4`, `H-1..H-8`, `M-1..M-15`, `L-1..L-4`, `N-1..N-6`, `B1..B5`) and rejection rationale for custodial federated multisigs. | | |
| 40 | 73 | ||
| 41 | - | ### 2.1 Authority & Conflict Precedence | |
| 74 | + | ### 2.1 Authority & Conflict Precedence (`M-13` Fixed) | |
| 42 | 75 | ||
| 43 | - | 1. Deployed Zenon L1 consensus rules and upstream `Project Zeno/spec/SPEC.md` (after Phase-2 Amendments §6 are ratified upstream). | |
| 44 | - | 2. `GENERALIZED-AUTHORIZATION-BRIDGE-FRAMEWORK.md` v0.3.2 & `MINTED Settlement Extension` v0.1.1 (with §6 amendments). | |
| 45 | - | 3. [`spec/03`](./spec/03-settlement-minted-zbtc-and-feeless-rails.md) & [`spec/05`](./spec/05-go-zenon-upgrade-plan.md) (`go-zenon` Settlement & upgrade instantiation). | |
| 46 | - | 4. [`spec/02`](./spec/02-btc-authorization-domain-and-spv.md) (`d_btc_asset` SPV verifier). | |
| 47 | - | 5. Hash-pinned [`spec/01`](./spec/01-bitcoin-taproot-vault-enforcement.md) (`BTC-ENFORCEMENT-V1`). | |
| 48 | - | 6. [`spec/04`](./spec/04-bitcoin-anchoring-and-light-client.md) (anchoring and light clients). | |
| 76 | + | 1. **Bitcoin L1 Consensus & Part 1 Vault Scripts ([`spec/01`](./spec/01-bitcoin-taproot-vault-enforcement.md), `BTC-BITVMX-V1`)** — non-overridable custody layer. Hard-pinned `vk_STF`, deleted-key Taproot graphs, `StakeChain`, and `ExitSlotUTXO` rules cannot be overridden by any Zenon contract, Pillar, or spork. | |
| 77 | + | 2. **Bitcoin-L1-Canonical Authorization & Rollup STF ([`spec/02`](./spec/02-btc-authorization-domain-and-spv.md) & [`spec/03`](./spec/03-settlement-minted-zbtc-and-feeless-rails.md))** — deterministic state transition over Bitcoin L1 blocks (`0x00`..`0x07`). | |
| 78 | + | 3. **Stage 0 `go-zenon` Runtime & SPV Event Oracle ([`spec/05`](./spec/05-go-zenon-upgrade-plan.md))** — governs feeless Zenon sequencing UX and Stage 0 non-custodial SPV/PTLC rails; holds ZERO authority over Stage 1A BTC custody. | |
| 79 | + | 4. **Non-Custodial Anchoring & Light-Client Infrastructure ([`spec/04`](./spec/04-bitcoin-anchoring-and-light-client.md))** — informational/UX layer only. | |
| 49 | 80 | ||
| 50 | 81 | --- | |
| 51 | 82 | ||
| 52 | - | ## 3. End-to-End Protocol Flows | |
| 53 | - | ||
| 54 | - | ### 3.1 Peg-In: BTC → BitVM2 Taproot Vault → Atomic Treasury `zBTC` | |
| 83 | + | ## 3. End-to-End Protocol Flows & Hostile Scenario Traces | |
| 55 | 84 | ||
| 56 | - | 1. **Provisional Deposit**: User derives `ProvisionalDepositScript` (`P_prov = lift_x(H_NUMS_X) + depositCommit * G`, key-path unspendable; Leaf A = `CommitteeIdentityKey`; Leaf B = `<144> OP_CSV <depositorRefundPubKey>`) committing `(chainBindingHash, assetId, zenonRecipient[0]==0x00, depositNonce, u64BE(D_bucket))` and broadcasts `DepositTx` (`<= 4,096 B`, non-coinbase, `len != 64`). | |
| 57 | - | 2. **Normative Two-Phase Ceremony, Transcript Attestation & Mandatory 2-Input Rollover (`R5-L8`)**: | |
| 58 | - | - **Phase 1 (Trap Commitment First)**: Each participating Operator `m` delivers verified `pk_m` signatures on BOTH `WrongDepositDisproveTx^{T1}` AND `WrongDepositDisproveTx^{T2}` across active fresh rounds of generation `g` BEFORE `Q_graph` releases any Take signature. | |
| 59 | - | - **Phase 2 (Take Release, Published Leaf DA, Transcript & Rollover)**: For operators passing Phase 1, `Q_graph` releases `Take1Tx`/`Take2Tx` signatures and signs a canonical `Q_graph` release transcript listing the exact sorted set of released Take txids (`takeTxidsSmtRoot` — `proof-format.md` V1 SMT keyed by `SHA3-256(takeTxid)` — PLUS canonical `takeTxidsBlobHash` committed alongside published leaf-set DA so any watcher can construct SMT absence proofs, `R6-L5`). The distinct Setup Committee (`CommitteeIdentityKey`) independently verifies the `Q_graph` transcript & published leaf set, signs the lock attestation `(rolloverOutpoint, eligibleOperatorsBitmask, epochId = g, takeTxidsSmtRoot, takeTxidsBlobHash)`, and broadcasts mandatory 2-input `RolloverTx_d` (`nSequence = 0xfffffffd`, Reserve `In 1`, `Out 0 = TerminalVaultUTXO_d` paying `Q_vault_d`). New deposits after gen `g+1` registration MUST carry a `g+1` graph (`R6-L4`). If unconfirmed by `h_dep + 120`, Reserve MUST double-spend `In 1` (depositor Leaf-B RBF fallback at `h_dep + 144`). | |
| 60 | - | 3. **SPV Proof Relay**: Relayer submits `BTC_HEADER_BATCH`, optional `BTC_TX_STREAM_CHUNK`, and `BTC_LOCK_PROOF` (`<= 7,748 B` ABI). `d_btc_asset` verifies both txs against never-pruned `ActiveChainByHeight[h]` (`K_pilot = 14`), verifies `CommitteeIdentityKey` sig, records multi-epoch `TrackedVaultRecord{ACTIVE, activeEpochs=[{g, takeTxidsSmtRoot}]}`, and emits `FOREIGN_LOCK`. | |
| 61 | - | 4. **Chained Optimistic Batch, Rotation & Atomic Mint**: Executor submits `BatchCommitmentV3` (monotonic `batchId`, `parentBatchId`, `PreStateRoot` chaining, contiguous `domainInputSeq`, `MaxBatchInputs = 256`). After `48h` (up to `60h` with open challenge session), `FinalizeBatch` finalizes and releases exposure. `RelayClaim` invokes `MINTED_LOCK_V1`, enforces **G-21 Latency-Aware Dynamic Reachable Fresh Capacity** (`ActiveVaultUTXOs + 1 <= Σ (ReachableRounds(now + 3.0d) - pendingReservations) - 25`, blocked if `unrotatedVaultCount > 0`; smoothly defers mints to `DeferredLockQueue` during the disclosed `~5.0d` pre-epoch window before gen `g+1` registers at day `30–32`), records per-epoch `VaultUtxoSet[outpoint_d]`, and atomically transfers `D_bucket` `zBTC` from treasury to `zenonRecipient`. | |
| 85 | + | ### 3.1 Stage 0: Verify Bitcoin (SPV Event Oracle + Non-Custodial PTLC/LN) | |
| 62 | 86 | ||
| 63 | - | ### 3.2 Feeless `zBTC` Transfers on Zenon Block-Lattice | |
| 87 | + | Zero pooled BTC custody (`0 BTC` bridge exposure): | |
| 88 | + | 1. Relayers submit Bitcoin headers and Merkle inclusion proofs (with 1- or 2-block SHA-256 coinbase midstate padding) to the Stage 0 SPV Event Oracle (`spec/02 §2`), proving Event Validity on the best PoW chain. | |
| 89 | + | 2. Users swap native BTC / Lightning against Zenon assets atomically via BIP-327 Taproot MuSig2 PTLCs (`<72> OP_CSV` refund leaf, `h_conf + 66` confirmed-before-refund with CPFP, `T_znn = now + 108,000s` = `30h` leaving `4.7h` margin under `2.3×` June 2021 slow blocks) or SHA-256 HTLCs (`hashType = 1`, `Δ_safety = 36` blks, Hold Invoice rate limits, `spec/03 §1`). | |
| 64 | 90 | ||
| 65 | - | Standard `zBTC` user transfers pay **0 satoshis BTC fee** and `21,000` base Plasma funded via refundable QSR fusion (`10 QSR` at floor price `1000`) or SHA3-256 PoW (`dev:pow/pow.go:35-47,61,118`, `31.5M` expected hashes at floor price; ~0.1–0.3s desktop native, ~2–10s mobile/WASM). Network-wide L1 capacity is `100` blocks per 10s Momentum (`~5` full send+receive user transfers/s). | |
| 91 | + | ### 3.2 Stage 1A: Sovereign ZK Validity Rollup + Right-Sized `BitVMX` (`n = 8`, `M = 3–5`, `N = 7`) | |
| 66 | 92 | ||
| 67 | - | ### 3.3 Peg-Out: Atomic Burn → Anti-Censorship Fronting Slot → `FrontingTx` → Zenon `RELEASED` → BitVM2 Reimbursement | |
| 93 | + | #### Flow A — Acyclic Deposit (`Alice 1 BTC`, `Bob 1 BTC`, Closes `v0 C-4, N-2, M-7`) | |
| 94 | + | 1. Alice locks `1.0 BTC + fee` in her own self-custodial staging UTXO `U_Alice_wallet` with Tapscript `OP_DROP <pk_Alice> OP_CHECKSIG`. | |
| 95 | + | 2. Alice prepares `DepositTx` spending `U_Alice_wallet` → `vout[0..2]` = multi-tier deleted-key vaults **`{0.50, 0.25, 0.25}` BTC** (`3` vaults/BTC, avg `0.333 BTC`, `maxVaultDenom = 0.50 BTC`) + `vout[3]` = `69 B` `OP_RETURN "ZBTX" || 0x00 || recipientAcctHash(32B) || vaultParamsHash(32B)`. Because `vout[3]` does not hash `certBlob`, **`txid_dep` is fixed before signing**. | |
| 96 | + | 3. Alice + `N = 7` presigners + all online operators (`≥ M_min`, recorded in `opBitmask`) presign the `TakeTx_{d,j,l,r}` graphs (`M × L × R = 5 × 1 × 64 = 320` pre-signed `TakeTx`s per vault ≈ `40 KB`, `< 100ms` MuSig2 ONCE at deposit) using fresh per-deposit ephemeral keys `Q_setup_d = MuSig2(P_{1..N,d}, P_{A,d})`. | |
| 97 | + | 4. Each presigner **permanently deletes `x_{i,d}`** and signs non-spending identity attestation `σ_cert` over `txid_dep`, forming `certBlob = σ_cert(64B) || Q_setup_d(32B) || opBitmask(8B)` (`104 B ≤ 520 B` BIP-342 stack limit). | |
| 98 | + | 5. Only after verifying all pre-signed `TakeTx`s and `σ_cert` does Alice delete `x_{A,d}`, push `[sig_Alice, certBlob, script, controlBlock]` into `DepositTx.vin[0].witness`, and broadcast (zero hash cycle, zero stranding!). At `K = 14` confirmations, the STARK scans `DepositTx` via stripped block + `wtxid_dep` and credits `1.0 zBTC` to Alice (identical for Bob). | |
| 68 | 99 | ||
| 69 | - | 1. **`RequestPegOut`** (open during `ACTIVE`, `DRAINING_ROLLOVER_STOP`, AND `DRAINING_FINAL`): User sends `D_bucket` `zBTC` with `(recipientScriptPubKey, refundRecipient, timeoutHeight, pegOutFeeSats >= minOperatorFeeSats + fixedReserveFeeSats)`. `Settlement` validates `tip + 640 <= timeoutHeight <= tip + 2512 && timeoutHeight < 500_000_000`, pops an `UNASSIGNED` `outpoint_d` holding a live graph epoch `e` with `>= 1` eligible active operator having `ReachableRounds(e, now + 3.0d) - pendingReservations >= 1` (`R6-M2`), copies `rec.ChainBindingHash = outpoint_d.SetupChainBindingHash`, retains `D_bucket` `zBTC`, and appends `PEGOUT_CREATED` (`0x03`). | |
| 70 | - | 2. **Single-Authority, Anti-Censorship Fronting Slot (`R6-M2`, `R6-M4`, `R6-M5`) & `FrontingTx`**: An eligible operator in a live graph epoch `e` of `outpoint_d` with `ReachableRounds(e, now + 3.0d) - pendingReservations >= 1` calls `ClaimFrontingSlot(outboxId)` (requiring `VaultUtxoSet[d].status == ASSIGNED`, locking forfeitable `SlotBondZnn = 500 ZNN`, reserving 1 lane round, barring consecutive re-claim by `lastLapsedOperatorId`, and rejecting until BOTH `now >= slotClaimZenonTs + 14_400` AND `lastFinalizedTipHeight >= slotExpiryBtcHeight`!). Appends `PEGOUT_SLOT_CLAIMED` (`0x0A`); `d_btc_asset` is the single authority on slot exclusivity (`BestTipHeight + 24`, `slotClaimZenonTs + 14_400`). Operator broadcasts `FrontingTx` and submits `BTC_RELEASE_PROOF`; **`d_btc_asset` ALWAYS admits valid fronting regardless of vault trap status (`R6-M3`)**, emitting `FOREIGN_RELEASE(operatorId)`; `MINTED_RELEASE_V1` keys strictly on `FOREIGN_RELEASE.operatorId`, releases `SlotBondZnn`, and transitions `PegOutRecord` to `RELEASED` (re-pointable via `RepointTrappedPegOut` if another operator's substitution trapped `outpoint_d`!). | |
| 71 | - | 3. **Reachability-Checked Reimbursement & Staggered-CLTV BitVM2 Payout**: Winning operator `m` calls **`ClaimReimbursementSlot(outboxId, operatorId_m, roundId)`** (verifies `epoch(roundId)` is in `VaultUtxoSet[outpoint_d].epochEntries` with `m`'s bit set, `roundId` is registered & unused on an unretired lane, AND serial kickoff feasibility `max(now, lastClaimedTs + 5.5d) <= anchorCutoffTs = E_anchor_ts + 46d`, consuming its lane reservation; recoverable via `ResetFailedReimbursementSlot` if the claimed round expires/burns without operator fraud!) and broadcasts `RoundKickoffTx_{m,l,r}` (`Bond = 3.70 BTC`, per-field checksummed `OP_HASH160` `w=4` W-OTS `W_kick`). | |
| 72 | - | - Unchallenged (`T_happy = 144`): `Take1Tx_{d,m,l,r}` (`Out 2 <pk_m>` CPFP) pays `0.99899 BTC` to `ReimburseEscrow^{T1}` (72-block CSV OR `WrongDepositDisproveTx^{T1}` routing `0.99899 BTC` to `QUARANTINED` `RecoveryVaultUTXO_d`, burning `2.70 BTC` bond, paying watcher `1.00 BTC - fee`; verifier-decided SMT inclusion/absence on `BTC_VAULT_SPEND_PROOF` across `ACTIVE`/`RELEASED`/`QUARANTINED` keeps registered Takes in `PENDING_TRAP` for `230` blocks, mirrored via `SyncPendingTrapVault`!) AND `0.00100 BTC` to Reserve. | |
| 73 | - | - Challenged (`ChallengeTx`, `Out 0 = F_assert = 1.45 BTC`, terminal sink): Under Assumptions #2 & #3, operator posts `AssertStartTx` (`288`) → parallel **`AssertCertDATx`** (`29,882 vB → 30 kvB` derived per-block `OP_HASH160` `w=4` W-OTS, `3` stack-safe inputs publishing the fixed `408 B` `targetCert || handoffSlot` across `7` independently-checksummed SHA-256 blocks + `6` midstates = `1,239` digits, verified by `7` stack-safe Leaf-3B chunks `<= 265` digits, `C = 1,208`!) + parallel `AssertChunkTx_{1..32}` (`+72`) → `AssertEndTx` (`+72`). Any failure triggers `DisproveTx` / `BurnBond*Tx` (`SelfSlash <= -0.20 / -0.40 BTC`, `HonestOp >= +0.195 BTC` @ `500 sat/vB`, break-even `289 kvB`), PLUS `BTC_OPERATOR_SLASH_PROOF` slashes `100%` of Operator `m`'s `>= 31,500 ZNN` bond! | |
| 74 | - | - **Closed Rotation & Staggered CLTV Exit (`R5-H3`, `R5-L3`, `R6-L4`)**: Gen `g+1` is registered by **day `32`** (`E_anchor(g+1) = E_anchor(g) + 1`), all live vaults (`UNASSIGNED`, `ASSIGNED`, `QUARANTINED`, AND un-claimed `RELEASED`) are re-graphed onto `g+1` via `VAULT_GRAPH_EPOCH_ADDED` (`0x0D`) by **day `43`** (`QuarantineExpiredVault` unlocks at `T_kickoff_cutoff + 60h = day 48.5` so finalized batches never race quarantine!); operators exit gen `g` bonds cleanly via `RoundRetireTx` (syncing `BTC_ROUND_RETIRED` `0x10`) during `[day 51.5, day 58)`; `StaleConnB/CKillTx` locks out Takes at **`T_kill_expiry = day 56`** and `StaleChainBurnTx` burns unretired bonds at **`T_bond_expiry = day 58`** (`288 > 72` blocks after `T_kill_expiry` so traps can never be pre-empted!). | |
| 75 | - | 4. **Non-Delivery Refund**: If no `FrontingTx` is admitted before `checkpointH = timeoutHeight + 558` reaches `K_pilot = 14`, `BTC_NON_DELIVERY_PROOF` emits `FOREIGN_NON_DELIVERY`; `MINTED_REFUND_V1` returns `D_bucket` `zBTC` to `rec.RefundRecipient`, releases the reservation, and re-enqueues `outpoint_d` ONLY if `VaultUtxoSet[outpoint_d].status == ASSIGNED` (never overwriting `PENDING_TRAP`, `RECOVERED`, or `QUARANTINED`!). | |
| 100 | + | #### Flow B — Feeless `zBTC` Transfers on Zenon (`AccountBlock.Data`) | |
| 101 | + | - Signed rollup transfers (`~110 B`) are submitted in Zenon `AccountBlock.Data`, paying **`0` satoshis BTC fee**, **`0` burned ZNN/QSR**, and **`21,000 + 68 × 110 = 28,480` Plasma** (`~14` refundable fused QSR or `~42.7M` SHA3-256 PoW hashes at floor price `1,000`; `~11.4s` soft confirmations; honest throughput `~4.4` tx/s at `2.1M` floor, `~8.8` tx/s default, **`~1,050–1,200` tx/s real hard ceiling** under `MaxMomentumContentBytes = 8 MiB`). | |
| 102 | + | - Permissionless market-funded batch proposers aggregate feeless transfers every `~6` Bitcoin blocks into `0x02 BATCH_DA` carrying **complete mutated SMT leaves** (`16 B` existing / `48 B` new account) + succinct embedded proof `π_batch` (transparent STARK/IPA or Groth16). First valid `0x02` matching `R_{h-1}` in Bitcoin L1 block/tx order wins; invalid batches are deterministically skipped in-circuit. | |
| 76 | 103 | ||
| 77 | - | ### 3.4 Peg-Free Routes (Zero Vault Trust) | |
| 104 | + | #### Flow C — Hostile Trace 1: Bob (`1 BTC → 1 zBTC → spends 0.5 → recovers 0.5 BTC` Under `49%`–`100%` Zenon Compromise) | |
| 105 | + | 1. Bob deposits `1.0 BTC` (`{0.50, 0.25, 0.25}` vaults) → `1.0 zBTC` canonical on Bitcoin L1. | |
| 106 | + | 2. Bob spends `0.5 zBTC` feelessly on Zenon (retaining `0.5 zBTC`). Even if **`49%`–`100%` of Zenon Pillars are Byzantine**, `go-zenon` permanently splits across its 30-Momentum cliff, Dynamic Plasma spikes `100,000×`, or `SporkAddress` upgrades `go-zenon` maliciously: **no attacker can forge Bob's signature on his remaining `0.5 zBTC` or mutate `vk_STF`**. | |
| 107 | + | 3. Bob bypasses Zenon completely by broadcasting a `~150 vB` Bitcoin L1 **`0x01 FORCED_EXIT`** (`0.50 BTC → P_Bob`) creating a `546`-sat `(2M + 1)`-leaf **`ExitSlotUTXO`**. | |
| 108 | + | 4. Any `1-of-M` (`M = 3–5`) operator spends `ExitSlotUTXO` as `vin[0]` and pays **`0.50 BTC - f_op`** directly to `P_Bob` in `vout[0]` (**confirmed in ~1 Bitcoin block / ~10 minutes**). | |
| 109 | + | 5. At `K = 14`, the STARK credits `ReimbursementCredit[O_j] += 0.50 BTC`, FIFO-assigns one `0.50 BTC` vault `U_d` to `O_j`, and `O_j` claims `U_d` via `RoundTx_r → TakeTx` (`T_take = 1,152` blks, verified by `N = 7` pre-committed verifiers under `n = 8` `BitVMX` bisection). | |
| 78 | 110 | ||
| 79 | - | Specified in [`spec/03 §5`](./spec/03-settlement-minted-zbtc-and-feeless-rails.md#L165-L182): | |
| 80 | - | 1. **PTLC Taproot MuSig2 Adaptor Swaps**: Bob locks `zBTC` (`PtlcContract.Create`, `T_znn >= T_btc_worst + 6h`) **BEFORE** Alice releases her BIP-327 tweaked (`x(Q_swap)`, `PartialSigAgg` incl. `e·g_key·t_acc`) adaptor partial signature; `T_btc` anchored to `h_conf + 12`. | |
| 81 | - | 2. **HTLC Atomic Swaps & Lightning Submarine-Swap Gateway**: `HtlcContract` with `hashType = 1` (`dev:vm/embedded/definition/htlc.go:92`), inbound Hold Invoice `ACCEPTED` before gateway locks `zBTC`. | |
| 111 | + | #### Flow D — Hostile Trace 2: Mike (`Alice 1 + Bob 1 → Mike 2 → recovers 0.25 BTC` When Zenon Signers Refuse to Sign) | |
| 112 | + | 1. Alice (`1.0 BTC`) and Bob (`1.0 BTC`) deposit into `{0.50, 0.25, 0.25}` vaults and send `2.0 zBTC` feelessly to Mike on Zenon. | |
| 113 | + | - Once anchored in `0x02 BATCH_DA`, Mike's `2.0 zBTC` has **100% Bitcoin PoW finality** (immune to 100% Zenon + 100% Alice/Bob collusion). | |
| 114 | + | - If Zenon Pillars stall or refuse to batch BEFORE `0x02` posts, Mike self-includes Alice's and Bob's raw signed transfers directly on Bitcoin L1 via **`0x03 FORCED_TRANSFER`**! *(Pre-L1-batch `~11.4s` Zenon confirmation is honestly disclosed as a soft confirmation; large receipts like `2 BTC` wait for L1 batch confirmation.)* | |
| 115 | + | 2. **Zenon signers refuse to sign everything.** Mike ignores Zenon completely and broadcasts L1 **`0x01 FORCED_EXIT`** (`0.25 BTC → P_Mike`, creating `ExitSlotUTXO`; Mike retains `1.75 zBTC`). | |
| 116 | + | 3. Any `1-of-M` (`M = 3–5`) operator spends `ExitSlotUTXO` and pays **`0.25 BTC - f_op`** directly to `P_Mike` in `vout[0]` (~10 minutes). **Alice and Bob cannot front-run or steal it; Bitcoin L1 UTXO exclusion prevents double-fronting.** | |
| 117 | + | 4. At `K = 14`, the STARK FIFO-assigns one `0.25 BTC` vault to `O_j` (the remaining `0.75 BTC` of Alice's split — `0.50 + 0.25` — stays untouched in deleted-key BitVMX vaults!). For arbitrary non-bucket exits (e.g., `0.2371 BTC` or `0.001 BTC`), `O_j` still pays the exact amount in `FrontingTx` and accumulates `ReimbursementCredit[O_j]` until hitting an available `0.25`/`0.50 BTC` vault — zero new presigning needed! | |
| 118 | + | 5. **Fee-spike & grief recovery:** If Bitcoin fees spike above `f_op`, Mike bumps `f_op` via `0x06 EXIT_FEE_BUMP` or cancels after `<288> OP_CSV` via Leaf `2M` (`EXIT_CANCEL`). If a rogue operator sweeps `ExitSlotUTXO` without paying `vout[0]`, the STARK atomically refunds `0.25 zBTC` to Mike, slashes `0.01 BTC` from the operator's `0.05 BTC` grief buffer to Mike, and auto-suspends the operator. | |
| 82 | 119 | ||
| 83 | 120 | --- | |
| 84 | 121 | ||
| 85 | - | ## 4. Honest End-to-End Security & Threat Model (5 Explicit Tier 1A Assumptions — `R5-L5`) | |
| 122 | + | ## 4. Honest Threat Model, Residual Boundaries & Privileged Powers Table (`H-3` Closed) | |
| 86 | 123 | ||
| 87 | - | **Tier 1A BitVM2 vaults are NOT trustless.** Delivered security is bounded by the weakest of **FIVE** explicit Tier 1A assumptions (plus optimistic claim admission): | |
| 124 | + | **`v1` Stage 1A (`BitVMX` Rollup) is trust-minimized (`Tier 1`), NOT pure `Tier 0` (which Theorem 1 proves requires a Bitcoin soft fork — see `spec/01 Appendix A`).** Delivered security is bounded by the following explicit, un-sugarcoated assumptions: | |
| 88 | 125 | ||
| 89 | - | 1. **Zenon 30-Day BLS12-381 Finality Committee Honesty & Reachable Slashing Backstop (`R6-H1`, `R6-H2`, `G-23`)**: A colluding `>= 21`-of-`30` (`> 2/3` weight) Pillar supermajority in any 30-day finality epoch from `E_anchor` onward can forge a `FinalityCertificate` (or forged handoff). Deterred and bounded (subject to Assumption #3 challenging invalid kickoffs) by three coupled mechanisms: | |
| 90 | - | - **Mandatory Bitcoin Certificate Publication (`AssertCertDATx`, `29,882 vB → 30 kvB` derived)**: On any challenge, the operator MUST publish the fixed `408 B` `targetCert || handoffSlot` (`0x00^204` when no handoff exists) across `7` independently-checksummed `OP_HASH160` `w=4` W-OTS SHA-256 blocks + `6` midstates (`1,239` digits), verified by `7` stack-safe Leaf-3B chunks (`<= 265` digits/leaf, `C = 1,208`). | |
| 91 | - | - **Historical-Root Full-Preimage Slashing (`R6-H1`)**: `PillarContract.SubmitInvalidCertProof(cert)` verifies the BLS12-381 signature under the **historical Tag-15 committee matching `cert.FinalityCommitteeRoot`** (NOT merely `canonicalSigningCommitteeRoot(cert.Height)`!), then compares ALL 7 certificate fields against canonical Zenon state at `cert.Height` (with `chainId` bound in the signing digest). Because `CarryOverCertificate` is deleted, ANY committee-`E`-signed forged handoff or target at ANY height in epoch `E+1` (transition OR non-transition!) is slashable on Zenon when published on Bitcoin, economically enforcing the handoff pin without requiring an in-circuit oracle! | |
| 92 | - | - **Staggered `56d`/`58d` Bitcoin CLTV Expiry + U2 `72`-Day Post-Service Stake Lock (`A-PILLAR-1`)**: Every `RoundChain` expires on Bitcoin by `day 58`, while every Pillar's `15,000 ZNN` collateral stays locked and slashable for `72` days after its last finality epoch (`>= 58d + 14d` grace, independent of per-Pillar `% 90d` revoke phase), backing the Governance supply cap (`MaxRepresentationSupply * SpotPrice <= 157,500 ZNN`, weekly Governance check + Guardian TWAP trigger; pilot `15 BTC` @ `ASSUMED 10,500 ZNN/BTC`). *(Note: unchallenged `Take1Tx` forgeries do not publish certs — prevented by Assumption #3!)* | |
| 93 | - | 2. **1-of-N Live Verifier Committee Honesty (`Q_graph`, `N >= 7` Pilot)**: At least **1 of $N$** independent `Q_graph` verifier members remains honest **in perpetuity** (never signing unauthorized vault/connector spends, enforcing Phase-1-before-Phase-2 ceremony order, signing accurate release transcripts, and co-signing 30-day round-chain rotations & recovery re-graphing). *(Per-round keys `Q_round` ARE deleted at round setup. Permanent loss of 1-of-N `Q_graph` member stops new rotations and recovery re-graphing; existing vaults remain redeemable through reachable active rounds prior to `T_kickoff_cutoff` under `G-21`, after which Governance Wind-Down applies.)* | |
| 94 | - | 3. **1-of-N Altruistic, Capitalized Bitcoin Watcher Liveness**: Against a rational fraudulent operator who self-slashes (`-0.20..-0.40 BTC` burn vs `-2.25..-3.70 BTC` vs watcher) via private miner submission — OR under third-party miner MEV (M-03) — challenging has realistic expected value `-(F_assert + f_chal) = -1.4600 BTC` @ `500 sat/vB`. Safety explicitly assumes **at least 1 altruistic / stakeholder-funded watcher** with liquid capital `>= 1.46 BTC` per concurrently-fraudulent lane (`14.60 BTC` worst-case simultaneous fraud across all 10 pilot lanes, plus small tx fee for `StaleConn{B,C}Kill` fallback). Operator fraud is strictly deterred by Bitcoin burn (`-0.20..-2.70 BTC` even self-slashed) PLUS `100%` slashing of `OperatorBond_ZNN >= 31,500 ZNN` (`>= 3.0 BTC` equivalent) + deactivation of all lanes! | |
| 95 | - | 4. **1-of-N Honest Setup Committee (`CommitteeIdentityKey`, `N >= 7` Pilot, Distinct from `Q_graph` — `R5-L5`)**: At least **1 of $N$** Setup Committee members honestly verifies `Q_graph` release transcripts and `RolloverTx` / `RoundGenesisTx` artifacts before signing `DepositTx` Leaf A, `BTC_LOCK_PROOF`, `OPERATOR_ROUND_REGISTERED`, and `VAULT_GRAPH_EPOCH_ADDED`. *(All-$N$ compromise of `CommitteeIdentityKey` alone cannot spend existing `Q_vault_d` vaults, but can divert in-flight deposits, register phantom rounds inflating `G-21`, attest manipulated `takeTxidsSmtRoot`s delaying raw-sweep halts by `230` blocks, or activate quarantined vaults with invalid graphs.)* | |
| 96 | - | 5. **Groth16 BN254 Outer-Wrapper Trusted Setup (CRS)**: Soundness of `vk_bitvm` depends on **1-of-K honesty** in the public Phase-2 CRS ceremony (`K >= 50` contributors, transcript pinned in `enforcementSpecHash`). | |
| 97 | - | 6. **Optimistic Claim Admission & Anti-Frontier Boundary**: `<= weaker(execProfile = OPTIMISTIC, foreignProfile = LIGHT_CLIENT)`, `MaxAggregateInFlightMint = 10.0 BTC` (pilot), halving-indexed `K_pilot = 14` (pre-2032 migration/cap rule), bounded Multi-Tx Sessions (`T_session = 12h`, `8,676 B` @ depth 256), `ChallengeDepositZnn`-ordered priority lane, and strict prohibition of $O(k)$ bounded-frontier verification on bridge gates ([`docs/architecture/bounded-verification-boundries.md`](https://github.com/TminusZ/zenon-developer-commons/blob/37194528a69d260c22221f3764b21bda9892cf56/docs/architecture/bounded-verification-boundries.md)). | |
| 126 | + | 1. **Zero Zenon Consensus or ZNN Market-Cap Trust (`0-of-N` Zenon — Survives 49%–100% Zenon Compromise):** Neither Zenon Pillars, `go-zenon` DPoS/BFT, ZNN's `~25–33 BTC` market cap, nor Zenon `SporkAddress` sit in the Bitcoin custody safety or L1 forced-exit path. Zenon Plasma DoS temporarily degrades *feeless* UX to L1 BTC fees (`0x03`/`0x01`), never custody. | |
| 127 | + | 2. **`1-of-N` Ephemeral Setup Deletion & Open-Cohort Attestation (`N = 7` Pilot):** At least 1 of `N` presigners honestly deletes its per-deposit ephemeral share `x_{i,d}` (depositor also participates and deletes `x_{A,d}`!) AND at least 1 of `N` long-term attestation keys `id_i` remains uncompromised while a cohort is open to new deposits. Compromising all `N` `id_i` keys cannot sweep existing deleted-key vaults; losing 1 of `N` `id_i` never bricks existing vaults (only halts *new* deposits on `v1`, requiring a clean non-commingled `zBTC_v2`). | |
| 128 | + | 3. **`1-of-N` Pre-Committed Online Verifier Safety (`N = 7` Pilot, NOT `1-of-∞`):** At least 1 of `N = 7` independent pre-committed verifiers monitors Bitcoin within `[0, 144]` blks (~24h) and runs `n = 8` `BitVMX` bisection (`20` steps, `T_step = 48` blks, `~15 kvB` total verifier weight) with CPFP. Anyone on Earth can detect fraud and alert all 7 verifiers off-chain, and every honest verifier has **positive EV (`≥ +0.0167 BTC` @ `500 sat/vB`) even if `6 of 7` verifiers collude with the operator**. If ALL `7` verifiers go offline or collude simultaneously during `[0, 144]`, a cheating operator can steal `≤ 0.50 BTC`/round. | |
| 129 | + | 4. **`1-of-M` Pre-Committed Operator Exit Liveness (`M = 3–5` Pilot — Irreducible Corollary 1B Bound):** At least 1 of `M = 3–5` independent bonded operators remains online with liquid BTC to front exits. If ALL `M = 3–5` operators vanish permanently, Mike cannot self-claim on Bitcoin L1 today (`0` theft; after `288` blks Mike cancels via Leaf `2M` and retains `0.25 zBTC`, exits stalled until an operator returns). | |
| 130 | + | 5. **Sustained Dispute Fee-Rate Envelope (`≤ 500 sat/vB` for `6.7` Consecutive Days):** `F_chal = 0.40 BTC` covers `~75 kvB` Prover bisection up to `533 sat/vB` sustained across all `20` steps (`6.7` days); Verifier `~15 kvB` is covered up to `610 sat/vB` (worst-case 6-way split) / `1,000 sat/vB` (winner L1 payout). Historical peaks (`1,805 sat/vB` April 2024 lasted `~33h` ≈ 2–4 steps) fit comfortably; a hypothetical week-long `> 533 sat/vB` spike erodes honest dispute coverage. | |
| 131 | + | 6. **TVL-Scaled Private-Fork Bound (`0.50 × K × Subsidy(era) > Cap_TVL`):** Without `OP_BLOCKHASH`, each lane pins launch-time `(h_lane_init, H, D)` with `D(h) ≥ 0.50 × D(h_lane_init)` and caps TVL strictly below private-fork PoW cost (`K = 14` ⇒ `Cap_TVL ≤ 15 BTC`; `K = 36` ⇒ `≤ 50 BTC`; `K = 144` ⇒ `≤ 200 BTC`). | |
| 132 | + | 7. **Bank-Run Recycling Queue (`~65–72` Days for 100% Run at `M = 3–5, L = 1`):** While individual exits front in ~10m up to available operator float (`2.20–3.00 BTC`), a 100% bank run recycles at `0.111 BTC/day` (`M = 3`, `~72d` for `10 BTC`) or `0.185 BTC/day` (`M = 5`, `~65d` for `15 BTC`) under `{0.50, 0.25, 0.25}` vaults (or `~47d`/`~43d` under `{0.50, 0.50}` vaults). | |
| 133 | + | 8. **Stage 1B (`clArk`) Alternative Assumptions (If Chosen Instead):** Zero operator bonds and pure `0-of-N` post-round unilateral exit until VTXO expiry, BUT sacrifices pooled fungible `zBTC`, carries hard VTXO expiry (`log2(N)` L1 branch exit fees), requires `100%` ASP liquidity per cycle, and exposes pre-round `arkoor` transfers to `sender + ASP` collusion. | |
| 98 | 134 | ||
| 135 | + | ### 4.1 Complete Privileged Powers Table (`H-3` Closed — ZERO Custodial Authority) | |
| 136 | + | ||
| 137 | + | | Power / Action | Holder | Threshold | Timelock | Maximum Effect / Blast Radius on Stage 1A BTC Custody | | |
| 138 | + | |---|---|---|---|---| | |
| 139 | + | | **Spend Existing Stage 1A BTC Vaults (`U_d`)** | **NOBODY (ephemeral `Q_setup_d` deleted)** | N/A | N/A | **0 sats custodial sweep power.** Spendable ONLY via pre-signed `TakeTx` after `T_take = 1,152` blks subject to `N = 7` `BitVMX` verifiers + Lamport equivocation slash. | | |
| 140 | + | | **Mutate Rollup STF Rules (`vk_STF`) on Existing Vaults** | **NOBODY (`vk_STF` hard-pinned at `t = 0`)** | N/A | N/A | **0 effect.** No Zenon spork, governance vote, or operator can alter STF rules on existing vaults. | | |
| 141 | + | | **Voluntary Cohort Handover (Same `vk_STF` Only)** | Cohort 1 Presigners (`id_1..id_N`) | **`N`-of-`N` (`7-of-7`)** | None (new deposits only) | Strictly `1-of-N` safe; cannot touch existing vaults. Involuntary `1-of-N` loss halts new `v1` deposits cleanly (`zBTC_v2` required). | | |
| 142 | + | | **Zenon Protocol Sporks (`CreateSpork`, `ActivateSpork`, `SetPlasmaVariables`)** | `SporkAddress` (`z1qpxsw...`) / `CommunitySporkAddress` (`z1qqvwz...`, window heights `14,567,887–19,791,986`, `origin/dev:vm/embedded/definition/spork.go`) → future `GovernanceContract` | `1-of-1` today | `SporkMinHeightDelay = 6` Momentums (node layer) | **0 BTC custody blast radius in Stage 1A.** Can disrupt feeless Zenon sequencing or Stage 0 embedded SPV contract, but **cannot steal 1 satoshi from BitVMX vaults or censor L1 `0x01`/`0x03` exits**. *(Stage 0 pins full `SetPlasmaVariables` floor in `spec/05`.)* | | |
| 143 | + | | **Operator Fronting & Reimbursement Claim (`O_1..O_M`)** | Independent Bonded Operators (`M = 3–5` pilot) | `1-of-M` for exit liveness | `T_take = 1,152` blks; `T_cooldown = 1,296` blks | **Zero theft power** under `1-of-N` verifier honesty (`-1.94` to `-2.55 BTC` net loss on fraud: `-2.55 BTC` solo, `-2.40` to `-1.9417 BTC` with `1..6` colluders); all `M` vanishing stalls exits (`0` principal loss). | | |
| 144 | + | | **BitVMX Fraud Challenge (`V_1..V_7`)** | Independent Pre-Committed Verifiers (`N = 7`) | **`1-of-7`** | `[0, 144]` blks open; `T_step = 48` blks | Any 1 honest verifier stops fraud, collects `≥ +0.0167` to `+0.075 BTC` net profit, and burns `1.85 BTC` of rogue operator's bond. | | |
| 145 | + | ||
| 99 | 146 | --- | |
| 100 | 147 | ||
| 101 | - | ## 5. Reference Corpus Errata Resolved (Verified Against `origin/dev` `770e893` / `release/0.0.11-rc1` `f19955f`) | |
| 148 | + | ## 5. Reference `go-zenon` Ground-Truth Baseline (`M-3`, `B1`, `B2`, `L-3`) | |
| 102 | 149 | ||
| 103 | - | 1. `go-zenon` baseline: Phase `U0` targets `origin/release/0.0.11-rc1` (`f19955f`) / `origin/dev` (`770e893`), carrying `PtlcSpork`, `DynamicPlasmaSpork` + `EmbeddedSendBasePlasma` (`dev:vm/plasma.go:192`), `EmbeddedRefundSpork`, `Libp2pSpork`, `EpochRewardTermsSpork`, composable `embeddedVariants` (`dev:vm/embedded/embedded.go:246`), and `MaxDataLength = 16,384` (`dev:vm/constants/plasma.go:67`). | |
| 104 | - | 2. `TokenContract`: `checkToken` (`dev:vm/embedded/implementation/token.go:40,43`), data-less `Issue` descendant (`dev:vm/embedded/implementation/token.go:163-172`) failing `dev:vm/vm.go:204-226`, and owner-burn (`dev:vm/embedded/implementation/token.go:330`). Resolved via `TokenContract.IssueMinted` → single-use `SettlementContract.ReceiveTreasury()` + `Burn`/`UpdateToken` guards. | |
| 105 | - | 3. Consensus, Pillars, PoW, HTLC, Subscribe & Verifier on `dev`/`release`: 24h consensus epoch (`dev:consensus/consensus.go:45,86`), `PillarStakeAmount = 15,000 ZNN` (`dev:vm/constants/embedded.go:108`), per-Pillar phased `(83d + 7d)` revoke (`dev:vm/constants/embedded.go:115-120`, `dev:vm/embedded/implementation/pillars.go:132-138,395-400`), SHA3-256 PoW (`dev:pow/pow.go:35-47,61,118`), `HashTypeSHA256 = 1` (`dev:vm/embedded/definition/htlc.go:92`), `AccountBlock.ComputeHash()` (`dev:chain/nom/account_block.go:283`), `ErrMDataMustBeZero` (`dev:verifier/momentum.go:198`), empty `DeleteMomentum` (`dev:rpc/api/subscribe/api.go:357`). | |
| 106 | - | 4. Upstream doc errata: Portal v1.5 retarget max `4,838,400`s, 10s Momentums, valid NUMS hex `50929b74...`, mislabeled `0x1800ff80` vector, and `bitcoin_anchoring.pdf` §4.1 bare-`OP_RETURN`-in-Tapscript prohibition. | |
| 150 | + | - **Verified Local Clone:** `master` (`e8986a6`, `v0.0.10-alphanet`) and `origin/dev` (`770e893`, carrying `DynamicPlasmaSpork`, `PtlcSpork`, `Libp2pSpork`). *(Note: upstream fix `0aa299e` is not present in the local git clone and remains an explicit Stage 0 upstream release gate.)* | |
| 151 | + | - **Stage 0 Hard Preconditions (`spec/05`):** (1) First tagged `go-zenon` release containing `0aa299e`; (2) upstream issue `#239` deterministic failed-receive closure (`B1`); (3) `DynamicPlasmaSpork` enforced with **complete `SetPlasmaVariables` pinning** (`MaxBasePlasmaInMomentum >= 2,100,000`, `MaxPriceChangePercent <= 25%`, PLUS lower bounds on `FusedPlasmaTarget >= 525,000`, `PowPlasmaTarget >= 525,000`, and `PriceChangeDenominator >= 8`, preventing exponential Dynamic Plasma lockout); (4) `PtlcSpork` active. | |
| 152 | + | - **Stage 1A / 1B Zero-Hard-Fork Property:** Stage 1A Rollup nodes read standard Zenon `AccountBlock.Data` and Bitcoin L1 — requiring **zero `go-zenon` consensus hard fork** beyond Stage 0. | |
| 107 | 153 | ||
| 108 | 154 | --- | |
| 109 | 155 | ||
| 110 | - | ## 6. Upstream Amendment Register (Blocking Mainnet Registration) | |
| 156 | + | ## 6. Upstream Amendment Register (`v1` Zero-Federation Scope) | |
| 111 | 157 | ||
| 112 | - | | ID | Upstream Target | Blocking Conflict / Gap | Normative Amendment Required | | |
| 158 | + | | ID | Upstream Target | Status in `v1` | Normative Requirement | | |
| 113 | 159 | |---|---|---|---| | |
| 114 | - | | **A-SPEC-1** (U-01) | `SPEC.md` v1.6.0 `S:130,352` | Phase-1 reserves `L1_RELAYED` and defines only `input_kind` `0..5`. | Activate `L1_RELAYED` (`inputSource = 1`) + `input_kind = 6 (RelayedInput)` & `7 (SystemInput)` in Phase-2 Profile. | | |
| 115 | - | | **A-SPEC-2** (C-08, R2-C4, U-08, U-18i) | `SPEC.md` §19, §27.7 (`S:190,1224`); `M:1632,2107` | `Receipt` lacks per-input roots; batch needs `parentBatchId`, `policyVersion`, `traceRoot` with inductive per-leaf accumulators, `observedChainHeight`, `domainHalted`. | Extend `BatchCommitmentV3` (versioned per `SPEC.md` §20) with `parentBatchId`, `policyVersion`, `traceRoot`, `observedChainHeight`, `domainHalted`, `haltedReorgHeight`. | | |
| 116 | - | | **A-SPEC-3** (U-03, U-18iii) | `SPEC.md` `S:881-889` vs `M:3346` | `SPEC.md` requires `MaxBatchMint` & coupled mint/burn bounds; Manual uses `R + P <= B`. | Mandate `MaxBatchMint` + aggregate `TotalInFlightMint` / `MaxInFlightMintPerExecutor` and codify equivalence with `R + P <= B`. | | |
| 117 | - | | **A-SPEC-4** (U-07, U-18ii) | `SPEC.md` `S:1186` & `M:3254,3479` | `M:3479` asks to reuse `kind=1` outbox, yet `RequestPegOut` is a direct L1 tx and AUTHORIZATION domains MUST have empty `outboxRoot` (`M:2115`). | Standardize domain-separated L1 peg-out ID `SHA3-256("ZNN_L1_PEGOUT_V1" \|\| domainId \|\| pegOutSeq \|\| sendBlockHash)` directly on L1 `PegOutRecord`. | | |
| 118 | - | | **A-SPEC-5** (U-18iv) | `SPEC.md` `S:972` vs `M:1504,2175` | Contradictory inequality direction between `WithdrawalDelay` and `challengeWindow`. | Unify Phase-2 `OPTIMISTIC`: `batchFinalizationDelay == executionChallengeWindow >= MinWithdrawalDelay` (extended up to `+T_session` while an active challenge session is open). | | |
| 119 | - | | **A-SPEC-6** (R2-L2, U-12) | `SPEC.md` `S:296,309` vs `M:1417` | `SPEC.md` uses `domainClass = EXECUTION\|BRIDGE\|MESSAGING` & `PROOF_VERIFIED`; Manual uses `EXECUTION\|AUTHORIZATION` & `PROOF`. | Reconcile enum names & 0-based ordinals normatively across `SPEC.md` and Manual (`AUTHORIZATION`, `PROOF_VERIFIED`). | | |
| 120 | - | | **A-BTC-1** (C-01, C-02, R2-L3) | `BTC-AUTHORIZATION-DOMAIN.md` `M:3887,4079,4304` | Required Bitcoin `TimeoutCancelTx` and relay-time `bestTipHashBE` in `NON_DELIVERY` event ID. | Gate BitVM2 reimbursement strictly on Zenon `PegOutRecord.State == RELEASED` + `ReimbursementRound`; admit `FOREIGN_NON_DELIVERY` on deterministic K-confirmed checkpoint `ActiveChainByHeight[timeoutHeight + ReleaseSubmissionGrace]`. | | |
| 121 | - | | **A-MINT-1** (U-18v, C-11) | `MINTED` v0.1.1 §3 (`M:3132,3225`) | Assumes abstract Core-internal `creditOrMintZTS`. | Ratify `TokenContract.IssueMinted` → single-use `SettlementContract.ReceiveTreasury()` Atomic Treasury Pre-Mint realization. | | |
| 122 | - | | **A-PILLAR-1** (`R5-L6`) | `go-zenon` `pillars.go` (`dev:pillars.go:132-138,395-412`) | Pillars currently hold only Ed25519 keys and withdraw `15,000 ZNN` immediately on their `% 90d` phase. | Ratify Phase U2 Pillar staking terms: (1) BLS12-381 `min-sig` finality key + PoP (`RegisterFinalityKey`), (2) `72`-day post-committee-service slashable lock after a Pillar's last 30-day finality epoch, and (3) voluntary `RequestExitCommittee()` removing the Pillar from future snapshots so `Revoke` withdraws cleanly as soon as the `72`-day lock elapses without waiting an extra `% 90d` cycle! | | |
| 160 | + | | **A-SPEC-1, A-SPEC-2, A-SPEC-6** | `Project Zeno` optimistic bridge framework | **Not required in `v1`** | Stage 0 uses direct Event-Validity SPV; Stage 1A uses Bitcoin-L1-canonical ZK validity (`0x00`..`0x07`). | | |
| 161 | + | | **A-SPEC-4** | Deterministic Exit ID | **Required (`Stage 1A`)** | `exitId = SHA256("ZBTX_EXIT_V1" \|\| bitcoinTxid \|\| voutOrIdx \|\| nonce)` derived deterministically on Bitcoin L1. | | |
| 162 | + | | **A-BTC-1** | Bitcoin Refund / Exclusion Rules | **Required (`Stage 1A`)** | Refunds enforced strictly by Bitcoin L1 UTXO exclusion (`ExitSlotUTXO` spend-or-refund rule) — zero timeout-vs-fronting double-pay races (`M-8`). | | |
| 163 | + | | **A-MINT-1** | `TokenContract.IssueMinted` | **Retired in `v1`** | Stage 1A `zBTC` balances live in the Bitcoin-canonical Rollup SMT (NOT pre-minted inside a Zenon embedded contract, eliminating `H-8` entirely!). | | |
| 164 | + | | **A-PILLAR-1** | `go-zenon` `pillars.go` BLS12-381 & 72d lock | **Not required in `v1`** | Zenon consensus & Pillar committees are removed from BTC custody completely (`spec/04`). | | |
| 123 | 165 | ||
| 124 | 166 | --- | |
| 125 | 167 | ||
| 126 | - | ## 7. Phased Delivery & Executable Verification Gates | |
| 168 | + | ## 7. Phased Delivery, Capital Decision Gates & Zero-Dead-End Growth (`M-15`) | |
| 127 | 169 | ||
| 128 | - | | Stage | Scope | Mandatory Exit Criteria | | |
| 129 | - | |---|---|---| | |
| 130 | - | | **Stage 0A (`U0`–`U2`)** | Ship `release/0.0.11-rc1` (`f19955f`), `StateRootSpork` (v3, `proof-format.md` V1), `CommitteeRootSpork` (v4, 30-day BLS12-381 `min-sig` `FinalityCommitteeRoot` with distinct IETF POP DSTs, U2 finality gadget, historical-root full-preimage `SubmitInvalidCertProof` + `SubmitEquivocationProof`, `72`-day post-service stake lock + `RequestExitCommittee`, `A-PILLAR-1`), `DeleteMomentum` WS reorg push. | Genesis-to-tip sync parity; `smt-v1-test-vectors.json` pass; MUST-fail slashing tests for committee-`E` forged handoff at `h_trans(E+1)+1` AND committee-`E` target in epoch `E+1` (`R6-H1`); Signet↔Zenon PTLC & HTLC adversarial suite (**G-18**). | | |
| 131 | - | | **Stage 0B (`U3`–`U4`)** | Ratify §6 amendments; build `OffchainExecutionSpork`, `MintedZbtcSpork` (`IssueMinted` → single-use `ReceiveTreasury()`), `OptimisticRefereeSpork`, panic-free `vm/embedded/btcspv/` (17 tags incl. SMT absence/inclusion across `ACTIVE`/`RELEASED`/`QUARANTINED` `0x08`, decoupled `0x06`, multi-gen `0x0D` incl. `RELEASED`, `0x10`), bounded Multi-Tx Sessions + commit-reveal, `zenon-executor`. | `go-zenon` unit test for `IssueMinted`→`ReceiveTreasury()` & rollbacks (**G-11**); all 29 SPV vectors + 15+18 MINTED vectors; adversarial ground-tree CI fuzzer proving Multi-Tx Session blocks `FinalizeBatch` at `T-1` and succeeds at depth 256 (**G-9**). | | |
| 132 | - | | **Stage 0C (Signet BitVM2 + Governance)** | Implement inner STARK (BLS12-381 + SMT) → outer Groth16 BN254 circuit (`<= 15 min` GPU prover target), per-block `OP_HASH160` `w=4` W-OTS `AssertCertDATx` + 7-chunk Leaf-3B SHA-256 (**G-23**), closed `R=8` staggered-CLTV DAG + 1p1c package relay policy tests (**G-1**), measure REAL assert/DA/SHA-256-chunk weights & peak stack replacing `ASSUMED_STAGE_0C_TARGET_*` (**G-2**); deploy **`GovernanceContract` + `MultisigContract`** (**M-15 hard gate**). | Published Signet txids for 2-in rollover, `RoundKickoffTx`, `RoundRetireTx`, staggered `StaleConnB/CKillTx` (`56d`) & `StaleChainBurnTx` (`58d`), `Take1Tx`+CPFP, `ChallengeTx`→`AssertCertDATx`+`AssertChunk`→`Take2Tx`+CPFP (both 1-cert zero-handoff and 2-cert), `DisproveTx` (incl. Leaf-3B SHA-256 + forward-hashed digit rejection!), `BurnBond*Tx`, `WrongDepositDisproveTx^{T1,T2}`, and all MUST-fail vectors; zero single-key `SporkAddress`. | | |
| 133 | - | | **Stage 1A (Shadow)** | Publish pinned `BTC-ENFORCEMENT-V1` bytes (`enforcementSpecHash`), Groth16 CRS ceremony transcript (`>= 50` contributors), audits, funded Operations Reserve (`>= 0.5 BTC`). Run `d_btc_asset` in `Status = PAUSED` (`SubmitInput`/`SubmitBatch`/`Challenge*`/`FinalizeBatch` LIVE; ONLY `RelayClaim`/`RequestPegOut` disabled). | `>= 30` days uninterrupted mainnet header/retarget tracking & batch finalization; zero watcher divergence; published Signet permanent-failure drills. | | |
| 134 | - | | **Stage 1B (Capped Pilot)** | Unpause `d_btc_asset` via `GovernanceContract` exit window with `D_bucket = 1.0 BTC`, `M >= 5` ops × `2` lanes (`3.70 BTC`/lane = `37.0 BTC` steady / `74.0 BTC` `8–28`d overlap, `R = 8` ⇒ `80` day-0 fresh capacity, `1.82 BTC/day`) + `OperatorBond_ZNN >= 31,500 ZNN`/op + `500 ZNN` `SlotBondZnn`, `T_kill = 56d` / `T_bond_expiry = 58d`, `MaxRepresentationSupply = 15 BTC` (weekly Governance check `<= 157,500 ZNN`), `AggregateInFlightMint <= 10 BTC`, `K_pilot = 14`, altruistic watcher pool (`>= 1.46 BTC`/lane). | Live peg-in, feeless transfers, anti-censorship fronting + single-use reimbursement, routine 30-day rotation (with disclosed `5.0d` pre-epoch `DeferredLockQueue` window), and non-delivery refund verified with zero conservation drift. | | |
| 170 | + | | Stage | Timeline & Hard-BTC Capital | Normative Scope & Blocking Exit Criteria | Zero-Dead-End Migration Guarantee | | |
| 171 | + | |---|---|---|---| | |
| 172 | + | | **Stage 0 (Mandatory Foundation — Verify Bitcoin)** | **`0–6 months`**, **`0 BTC` bridge custody risk** (`0–5 BTC` voluntary LP) | Ship `go-zenon` prerequisites (`0aa299e`, `#239`, full `SetPlasmaVariables` pinning, `PtlcSpork`), **Direct-on-L1 Bitcoin SPV Event Oracle** (1-/2-block coinbase midstate, `≤ 24` storage ops, `dp.MaxContractBlocks = 40`), and **non-custodial PTLC/LN atomic swaps** (`2.3×` slow-block safe). Build & test the Rollup stripped-block STARK + `BitVMX-CPU` (`RV32IM` `n=8`) stack on Signet. | Zero custodial BTC at risk while proving every Rollup + `BitVMX` primitive on Signet. | | |
| 173 | + | | **Stage 1A (Primary Path — Right-Sized `BitVMX` Rollup)** | **`12–18+ months` (incl. audit, 4–6 engineers)**; **`12.8 BTC`** (`M=3, N=7, ≤ 10 BTC` TVL) or **`18.8 BTC`** (`M=5, N=7, ≤ 15 BTC` TVL) *(≈ `40–75%` of ZNN's `~25–33 BTC` mcap)* | **Hard Entry Gates:** (1) Full Signet drill of `DepositTx`, `0x01–0x07`, `ExitSlotUTXO` (fronting, grief slash, cancel), `RoundTx → TakeTx` (Lamport equivocation slash), and `n=8` `BitVMX` 20-step TRUC v3 bisection (verifying measured weights `≤ 7.44 kvB`/tx); (2) independent third-party cryptography & Bitcoin-Script audit (**M-15**); (3) committed independent operator + verifier hard BTC (`2.60 BTC`/lane + `0.40 BTC`/verifier). *Pre-mainnet maturity of `BitVMX-CPU` explicitly disclosed.* | Deleted-key vaults NEVER expire and stay 100% redeemable 1:1 via `0x01 FORCED_EXIT` to native BTC L1. | | |
| 174 | + | | **Stage 1B (Explicit Alternative Gate — `clArk`)** | **`3–6 months`**, **`2–5 BTC`** active ASP liquidity (`0` bonds) | **Trigger:** Choose Stage 1B ONLY if the ecosystem cannot commit `~12.8–18.8 BTC` of non-yielding hard BTC OR prioritizes `3–6 mo` launch / `0-of-N` post-round exit over pooled fungibility. Deploy `Second bark` / `Ark Labs arkd` + Zenon SPV/PTLC (`spec/01 §7`, `spec/03 §3`). Do **NOT** under-bond `BitVMX`/`BitVM2`. | Users hold self-custodial expiring VTXOs with unilateral L1 exit; explicitly non-commingled with any future Rollup `zBTC`. | | |
| 175 | + | | **Stage 2 (Zero-TTP Scale & Upgrade)** | **`12+ months` post-Stage 1** (`15–200+ BTC` TVL, or unlimited w/ soft fork) | **(a) Same-STF `BitVMX` scaling (`M=5→20, L=1→4, K=36→144`):** strictly via pre-planned **`N`-of-`N` Cohort 1 voluntary handover** (zero governance key). **(b) Custody backend upgrades (`BitVM3-GC` / `BitVM2` / Appendix A Track B Pure Tier-0 `OP_CCV` or `OP_CAT` Covenant):** ALWAYS launch a clean, non-commingled `zBTC_v2` reusing the open-source Rollup STF codebase. | Zero deleted-key L1 rollover needed; Stage 1A vaults drain organically 1:1 to native BTC via `0x01` exits. | | |
| 176 | + | ||
| 177 | + | --- | |
| 178 | + | ||
| 179 | + | ## 8. Alignment with Zenon's Non-Bridging Philosophy (`Verify Bitcoin, Don't Bridge It.md`) | |
| 180 | + | ||
| 181 | + | - **Stage 0** implements `Verify Bitcoin, Don't Bridge It.md` verbatim: Bitcoin stays strictly in user custody while Zenon imports verified PoW Event Validity and coordinates atomic PTLC/LN swaps. | |
| 182 | + | - **Stage 1A** respects the essay's core warning (*"Zenon can't prevent spending. That's Bitcoin's job"*) by refusing custodial federations and refusing to place Zenon consensus in Bitcoin's enforcement path — pushing 100% of custody enforcement, canonical ordering, DA, and forced exits onto Bitcoin L1 (`BitVMX` + ZK validity). | |
| 183 | + | ||
| 184 | + | --- | |
| 185 | + | ||
| 186 | + | ## 9. Public Claims Alignment (`bigidea` Synchronization) | |
| 187 | + | ||
| 188 | + | All public materials (including [`btc-moonshot.github.io/bigidea`](https://btc-moonshot.github.io/bigidea/)) MUST match `v1` verbatim: | |
| 189 | + | ||
| 190 | + | | Outdated Public Claim (`v0` / `bigidea`) | Accurate `v1` (`v3.0.0-rfc`) Statement | | |
| 191 | + | |---|---| | |
| 192 | + | | "The network never holds a pooled key" | **True in `v1` for existing vaults:** per-deposit ephemeral keys `Q_setup_d` are permanently deleted at deposit (with zero custodial federation). **Honest disclosure:** Stage 1A still relies on `1-of-N` (`N=7`) open-cohort deposit attestation + `1-of-N` pre-committed online `BitVMX` verifiers + `1-of-M` (`M=3–5`) bonded fronting operators. Pure `0-of-N` unilateral exit requires a Bitcoin soft fork (`spec/01 Appendix A`). | | |
| 193 | + | | "One honest watcher can stop a bad payout" | **Clarified for Stage 1A:** Any **`1-of-7` pre-committed online `BitVMX` verifier** can stop a bad payout with positive EV (`≥ +0.0167 BTC` @ `500 sat/vB`), and anyone on Earth can detect fraud and relay it to all 7 verifiers. (`1-of-∞` permissionless BitVM2 requires `~45–100+ BTC` even at `M=3–5` and is unaffordable for a young project.) | | |
| 194 | + | | Proofs "end at Bitcoin's proof-of-work" | **True in Stage 1A:** Canonical `zBTC` state ordering, DA (`0x02`), and forced exits (`0x01`/`0x03`) are anchored directly on Bitcoin PoW with `0%` Zenon consensus trust (bounded by TVL-scaled `K` against private PoW forks). | | |
| 195 | + | | "Security is funded by the network's own staking token" | **False — explicitly rejected.** ZNN (`~25–33 BTC` total market cap) is **0% in the BTC custody safety path**; all operator/verifier collateral is hard BTC. | | |
| 196 | + | | "Millions of transactions per second"; per-second streams | Zenon Dynamic Plasma at `~11.4s`/Momentum provides `~4.4` base transfers/s at the `2.1M` floor, `~8.8` tx/s at default `4.2M`, and a **real hard ceiling of `~1,050–1,200` tx/s** under `go-zenon`'s `8 MiB` `MaxMomentumContentBytes` cap (NOT `4,386` tx/s). Stage 1A rollup txs use `AccountBlock.Data` (`~28,480` Plasma, `~11.4s` soft confirmation, Bitcoin L1 finality on `0x02` batch anchor). | | |
| 197 | + | | "0 satoshi fees" | **0 satoshi BTC fee for Stage 1A feeless rollup transfers on Zenon** (costing `~28,480` refundable QSR/PoW Plasma; NOT native ZTS). Deposits, L1 forced exits (`0x01`), and fronting spreads pay Bitcoin L1 fees; under Zenon Plasma DoS, users bypass Zenon via Bitcoin L1 fees. | | |
| 198 | + | | "Oracle verified" | **Consistency-checked** via `scripts/verify_spec_bounds.py` against `SOURCED_`, `POLICY_`, and `PRE_MAINNET_TARGET_` inputs; not empirically audited until Stage 0/1A Signet & third-party audit gates pass. | | |
| 199 | + | | Omission of Zenon / ZNN / QSR / Pillars | Public pages MUST explicitly name **Zenon Network, ZNN, QSR, and Pillars**, and disclose `BitVMX-CPU`'s pre-mainnet status (`12–18+ mo` timeline) and `~65–72d` 100% bank-run exit queue. | | |
| 200 | + | ||
| 201 | + | --- | |
| 202 | + | ||
| 203 | + | ## 10. Written Answers to Consolidated Hostile Review (`R7`) | |
| 204 | + | ||
| 205 | + | Every `R7` question against `v0` is answered normatively in `v1` without resorting to federated multisigs (full table in [`CHANGELOG.md`](./CHANGELOG.md)): | |
| 206 | + | ||
| 207 | + | - **C-1 (ZNN/BTC forging price):** *Closed by removal.* `0%` ZNN in BTC safety; all `BitVMX` bonds (`2.60 BTC`/lane) and verifier escrows (`0.40 BTC`) are hard BTC. | |
| 208 | + | - **C-2 (Honest BLS certs over dishonest Zenon state):** *Closed by removal.* BLS Pillar committees and optimistic Zenon batches are deleted; Stage 1A verifies an immutable Bitcoin-anchored ZK validity rollup (`vk_STF`, `0-of-N` Zenon trust). | |
| 209 | + | - **C-3 (BitVM2 4.4–10× under-costed assert/disprove):** *Resolved by architecture switch.* Groth16 BitVM2 (`~1.0–1.3M vB`, `~45–100+ BTC` min bonds) is replaced with `n = 8` `BitVMX-CPU` (`RV32IM`) bisection (`~7.44 kvB`/tx TRUC v3, `~75 kvB` Prover / `~15 kvB` Verifier, `12.8–18.8 BTC` total pilot capital). | |
| 210 | + | - **C-4 (Never-deleted `N`-of-`N` `Q_graph`):** *Closed.* Because `vk_STF` never rotates with PoS epochs, vault graphs never expire; ephemeral `Q_setup_d` and `Q_lane` keys are **permanently deleted** after setup. Zero custodial multisigs. | |
| 211 | + | - **H-1 & H-2 (Free-delegation capture & 10-seat cert withholding):** *Closed by removal.* No Pillar finality committee exists in BTC custody. | |
| 212 | + | - **H-3 (Upgrade & Plasma authority = custody authority):** *Closed.* `vk_STF` is hard-pinned on Bitcoin L1 (`SporkAddress` has `0` BTC custody blast radius); Stage 0 pins all `SetPlasmaVariables` fields (`spec/05`); full Privileged Powers Table in §4.1. | |
| 213 | + | - **H-4 (Altruistic watcher `-1.46 BTC` EV & self-slash):** *Closed.* Pre-committed `BitVMX` verifiers receive `0.15 BTC` L1 directly from `Stake_r` (`1.85 BTC` burned), reclaim `100%` of `F_chal` from `ChalEscrow_{r,i}`, and remaining honest challengers split `0.55 BTC` from `B_zbtc` (`≥ +0.0167 BTC` positive EV even against `6-of-7` verifier collusion!). | |
| 214 | + | - **H-5 (Missing exit liveness & throughput math):** *Closed.* `1-of-M` (`M = 3–5`) operator liveness is Assumption #4 (§4); exact throughput (`0.111–0.185 BTC/day`) and 100% bank-run duration (`~65–72` days under `{0.50, 0.25, 0.25}` vaults; `~43–47d` under `{0.50, 0.50}`) are published alongside `Cap_TVL`. | |
| 215 | + | - **H-6 (April 2024 fees & June 2021 slow blocks):** *Closed.* Zero absolute CLTV cliffs (relative CSVs only); 100% TRUC v3 + `0`-sat `P2A` ephemeral anchors eliminate pre-signed fee cliffs; PTLC sized for `2.3×` slow blocks; sustained `500 sat/vB` 6.7-day bisection envelope disclosed explicitly. | |
| 216 | + | - **H-7 (Unpaid anchoring & mobile BTC proofs):** *Closed.* Bitcoin L1 IS the canonical rollup ordering & DA layer (`0x02`/`0x01`/`0x03`); no Zenon epoch-handoff anchoring is needed for BTC custody. | |
| 217 | + | - **H-8 (21M pre-mint blast radius inside `SettlementContract`):** *Closed by removal.* Stage 1A `zBTC` is accounted strictly in the Bitcoin-canonical Rollup SMT, never pre-minted into an upgradeable Zenon embedded contract. | |
| 218 | + | - **M-9 & M-10 (`11.4s` Momentum, Dynamic Plasma & honest `8 MiB` ceiling):** *Closed.* Honest `~4.4 / ~8.8 / ~1,050–1,200 tx/s` ceiling (`MaxMomentumContentBytes = 8 MiB`), `28,480` Plasma per `AccountBlock.Data` rollup tx, and full `SetPlasmaVariables` pinning. | |
| 219 | + | - **M-15 (Independent review):** *Enforced.* Stage 1A mainnet activation blocks strictly on Signet measurements and an independent third-party cryptography/Bitcoin-Script audit. | |
| 135 | 220 | ||
Version: v1 (v3.0.0-rfc — Zero-Federation Phased Architecture: Stage 0 Verify Bitcoin SPV + Non-Custodial PTLC/LN → Stage 1A Right-Sized BitVMX n=8 Sovereign ZK Validity Rollup | Stage 1B clArk Alternative Gate → Stage 2 Zero-TTP Scale & Upgrade; supersedes archived v0 / v2.5.0-rfc, see CHANGELOG.md)
Status: Public Request for Comment (v1 / v3.0.0-rfc) — NOT mainnet-active; Stage 0 gated on upstream go-zenon release (0aa299e + #239 closure + full SetPlasmaVariables pinning); Stage 1A gated on BitVMX-CPU Signet verification, independent third-party cryptography/Bitcoin-Script audit (M-15), and hard-BTC operator/verifier capital commitment.
Target Networks: Bitcoin Mainnet TODAY (bip-0141/bip-0340/bip-0341/bip-0342/bip-0431 Taproot + TRUC v3 + P2A — zero Bitcoin soft forks, zero federated signers) ↔ Zenon Network (go-zenon first tagged release containing 0aa299e, #239 closed, DynamicPlasmaSpork & PtlcSpork enforced; local reference clone master e8986a6 / origin/dev 770e893)
Consistency & Bounds Checker: All modeled n = 8 BitVMX W-OTS/TRUC v3 weights, 256-bit Lamport TakeTx stack/size bounds, timelock ordering ([0, 144] → 1,104 < 1,152 < 1,296 < 1,440), colluding-verifier positive-EV matrices (k_collude = 0..6), {0.50, 0.25, 0.25} BTC bank-run exit bounds, halving-indexed TVL-scaled K, 1-/2-block coinbase midstate SHA-256 padding, honest 8 MiB go-zenon Plasma bounds, PTLC 2.3× slow-block margins, clArk exit weights, and a non-no-op 2,000-step randomized state-machine simulation (including real Bitcoin reorgs, ExitSlotUTXO grief slashes, and Lamport equivocation slashes) are asserted by scripts/verify_spec_bounds.py (python3 -I scripts/verify_spec_bounds.py). This script checks internal mathematical consistency against explicitly labeled SOURCED_, POLICY_, and PRE_MAINNET_TARGET_ inputs; it is not an empirical Signet benchmark or audit.
Upstream Provenance & Review Trail:
- Vision Proposal:
https://btc-moonshot.github.io/bigidea/(see §9 for mandatory claims alignment) - Zenon Non-Bridging Thesis:
zenon-developer-commons/essays/Verify Bitcoin, Don't Bridge It.md&docs/specs/spv-event-oracle-spec.md - Reference Node Codebase:
go-zenon(mastere8986a6,origin/dev770e893, target release tag containing0aa299e+#239) - Archived Baseline (
v0/v2.5.0-rfc): Frozen byte-for-byte inversions/v0/(SHA-256 verified in CI). - Consolidated Hostile Review (
R7ofv0):reviews/HOSTILE_REVIEW_R7_CONSOLIDATED.md— every findingC-1..C-4,H-1..H-8,M-1..M-15,L-1..L-4, plus convergence findingsN-1..N-6andB1..B5, is dispositioned inCHANGELOG.md.
1. Executive Summary & Architectural Pivot (v0 → v1)
1.1 Why v0 Failed — and Why Custodial Federated Multisigs Are Explicitly Rejected
The consolidated hostile review of v0 (v2.5.0-rfc, R7) and subsequent consensus/cryptographic audits established that v0 cannot be patched:
- ZNN cannot secure BTC (
C-1): Real market liquidity (400k–727k ZNN/BTC, total ZNN market cap~25–33 BTC) makesv0's10,500 ZNN/BTCslashing deterrents worth only1.4–2.6%of stated value (~0.43–0.79 BTCfor 21 Pillars against a15 BTCcap). - Zenon consensus fails at
≤ 49%compromise (C-2, H-1, H-2, H-3): Currentgo-zenonis longest-chain DPoS with zero slashing, deterministic height-only grindablefindSeed, unweighted top-30groupAsybil amplification, and a 30-Momentum hard rollback cliff (protocol/chain_bridge.go) allowing permanent chain splits at49%; adding classical BFT (CommitteeRootSpork) breaks BOTH safety and liveness at> 33.3%. Single-keySporkAddress/CommunitySporkAddresscan mutate consensus code, and refundable QSR fusion allows whale Dynamic Plasma DoS. - BitVM2 script costs break low-cap economics (
C-3, H-4, M-6): Real chunked Groth16 BitVM2 asserts (~1.0–1.3M vB/4.0–4.8 MBW-OTS) are4.4–10×larger thanv0's220 kvB, forcing~13.30–18.175 BTC/lane (~40–91 BTCin bonds even at bare-minimumM = 3–5, L = 1, exceeding ZNN's entire market cap!). - Never-deleted
N-of-NQ_graph&CommitteeIdentityKey(C-4, N-2) + fixed1.0 BTCbuckets: Rotating 30-day PoS committee roots forced never-deleted standing keys (sweep-all OR 1-key bricking at day 56), while fixed1.0 BTCbuckets rejected0.50and0.25 BTCexits.
Why v1 explicitly REJECTS custodial k-of-n federated multisigs:
Falling back to a custodial k-of-n federated multisig is normatively forbidden in v1. Federated custody:
- Violates Bitcoin's non-custodial ethos and Zenon's own thesis ("Bridges Are Custody Wearing a Mask" —
Verify Bitcoin, Don't Bridge It.md); - Fails Bob's partial-recovery test under
49%Zenon compromise (a 49%go-zenonDPoS split breaks cross-signer Zenon state agreement and freezes payouts, while safety depends entirely on trusting external custodians); - Fails Mike's zero-signer-cooperation test completely (if federated signers refuse to sign Mike's
0.25 BTCpayout,0satoshis leave custody; a backup recovery timelock belongs to another custodial multisig and never unlocks while active signers refresh UTXOs).
1.2 Governing Cryptographic Boundaries (Theorem 1 & Theorem 2)
Every design decision in v1 is constrained by two formal theorems (proved in spec/01 §1 and spec/04 §1):
Theorem 1 (Bitcoin Mainnet No-Covenant Impossibility — BIP-340/341/342, Zero Soft Forks): Given pooled deposit UTXOs
U_A,U_Bcreated att_0on Bitcoin Mainnet today, if ZERO pre-committed parties produce a new signature att_1, it is cryptographically impossible for an unknown future recipient Mike (P_Mike,0.25 BTCunknown att_0) to spendU_AorU_Bpaying0.25 BTC → P_Mikewhile binding0.75 BTCback into custody. Tapscript lacks output introspection (nValue/scriptPubKey), so any unsigned spend is trivially miner-front-run, while pre-signed transactions att_0cannot bind future unknown(P_Mike, 0.25 BTC). Corollary 1B: On Bitcoin Mainnet today, optimistic reimbursement bridges (BitVM2/BitVMX/BitVM3) are strictly bounded by1-of-Nephemeral setup deletion + challenger/verifier safety +1-of-Mpre-committed operator exit liveness.
Theorem 2 (Young Low-Cap Capital / Trust / UX Trilemma — 0 Federation, 0 Soft Forks,
2–20 BTCBootstrap Capital): With zero federated signers, zero Bitcoin soft forks,~25–33 BTCZNN market cap (0%ZNN slashing usable), and realistic bootstrap capitalC ∈ [2, 20] BTC, NO protocol can simultaneously achieve all three of:
- (A) Instant, non-expiring, fungible cross-depositor
zBTC(Alice + Bob → Mikewith zero sender-collusion risk),- (B)
1-of-∞permissionless challenging surviving200–500 sat/vBfee spikes (blocked by BitVM2's irreducible~40–91 BTCbond floor even atM = 3–5, L = 1), AND- (C)
0-of-Nunilateral arbitrary-amount Bitcoin L1 exit (blocked by Theorem 1;clArkachieves post-round0-of-Nonly by sacrificing (A) via discrete expiring VTXOs and pre-roundarkoorsender+ASP collusion).
1.3 What v1 (v3.0.0-rfc) Is, Stated Plainly
v1 specifies a zero-federation, zero-soft-fork, zero-ZNN-custody-coupling phased architecture starting from zero custody risk:
- Stage 0 (
0–6 months,0 BTCbridge custody risk,0–5 BTCvoluntary LP — Mandatory Start):- Ship the Direct-on-L1 Bitcoin SPV Event Oracle (
spec/02 §2, strictly Event Validity, zero custody authority, aligned withVerify Bitcoin, Don't Bridge It.md) and non-custodial PTLC / Lightning HTLC atomic swaps (spec/03 §1, hardened for2.3×June 2021 slow blocks) while building and auditing the Stage 1A Rollup Core +BitVMX-CPURISC-V verifier on Signet.
- Ship the Direct-on-L1 Bitcoin SPV Event Oracle (
- Stage 1 Decision Gate (Explicitly Governed by Hard-BTC Commitment & Timeline):
- Stage 1A — Primary Path for Pooled Fungible
zBTC(12–18+ monthsincl. audit for 4–6 engineers; requires~12.8–18.8 BTCof non-yielding hard BTC ≈40–75%of ZNN's~25–33 BTCmarket cap):- Shared Core (0% Zenon Trust — Survives 49%–100% Zenon Compromise): A Bitcoin-Anchored Sovereign ZK Validity Rollup where Zenon is demoted to an untrusted feeless sequencing & soft-preconfirmation layer (
AccountBlock.Data,~28,480Plasma,0sat BTC fee, NOT native ZTS). Canonical ordering, complete mutated-leaf DA (0x02 BATCH_DA+ embeddedπ_batch), and uncensorable forced inclusion (0x01 FORCED_EXIT,0x03 FORCED_TRANSFER) live strictly on Bitcoin L1 via full stripped-block (≤ 1,000,000 B) scanning. - Custody Engine (Right-Sized
BitVMX,n = 8,M = 3–5,L = 1,N = 7): Open-sourceBitVMX-CPU(RV32IM) interactive bisection (~7.44 kvB/prover tx, 100% BIP-431 TRUC v3 withP2Aephemeral anchors;~75 kvBProver /~15 kvBVerifier;F_chal = 0.40 BTCcovering500 sat/vBsustained across all20steps,533 sat/vBbreak-even), deleted-key{0.50, 0.25, 0.25}BTC multi-tier vaults, 256-bit LamportTakeTxequivocation slashing (~3.1 kvBTRUC v3), dual-inputStake_r+VaultConnector_rbisection slashing (0BTC stolen from vault, positive EV≥ +0.0167 BTCfor every honest verifier even if6 of 7verifiers collude with the operator!), and(2M + 1)-leaf registered-operator spend-or-refundExitSlotUTXO. Pre-mainnet maturity explicitly disclosed.
- Shared Core (0% Zenon Trust — Survives 49%–100% Zenon Compromise): A Bitcoin-Anchored Sovereign ZK Validity Rollup where Zenon is demoted to an untrusted feeless sequencing & soft-preconfirmation layer (
- Stage 1B — Explicit Alternative Gate (If Hard-BTC Budget
< 5–10 BTC,3–6 moLaunch Target, or0-of-NPost-Round Exit Outweighs Pooled Fungibility):- Do NOT under-bond
BitVMX/BitVM2. DeployclArk(Second bark/Ark Labs arkd) + Zenon SPV/PTLC (2–5 BTCactive ASP liquidity,0bonds), explicitly relinquishing global pooledzBTCin favor of discrete expiring VTXOs (disclosingarkoorsender+ASP collusion andlog2(N)L1 exit fees).
- Do NOT under-bond
- Stage 1A — Primary Path for Pooled Fungible
- Stage 2 (
12+ months, Zero-TTP Scale & Upgrade — Zero Dead-End User Trap):- Deleted-key Stage 1A vaults NEVER expire and drain organically 1:1 to native BTC via
0x01exits (no deleted-key L1 rollover). Identical-STFBitVMXexpansion (M = 5 → 20,L = 1 → 4,K = 36 → 144) uses strictlyN-of-NCohort 1 voluntary handover; changing custody backends (BitVM3-GC/BitVM2/ Appendix A Track B Pure Tier-0OP_CCV + OP_TXHASH + OP_VERIFY_STARKorOP_CATCovenant) ALWAYS launches a clean, non-commingledzBTC_v2instance with zero governance backdoor.
- Deleted-key Stage 1A vaults NEVER expire and drain organically 1:1 to native BTC via
2. Normative Module Map & Authority Precedence
| Module | File | Normative Scope in v1 (v3.0.0-rfc) |
|---|---|---|
| Master | SPEC.md | Zero-federation phased architecture, Theorems 1–2, end-to-end Bob & Mike traces (§3), honest Threat Model & Privileged Powers Table (§4), go-zenon baseline (§5), Upstream Amendments (§6), Stage 0/1A/1B/2 Decision Gates (§7), Non-Bridging Alignment & Public Claims (§8–§9), and Written R7 Disposition (§10). |
| Part 1 | spec/01-bitcoin-taproot-vault-enforcement.md | Highest Custody Precedence (BTC-BITVMX-V1): Theorems 1–2; acyclic OP_DROP DepositTx ({0.50, 0.25, 0.25} deleted-key vaults, certBlob = 104 B, opBitmask, zero-TTP cohort rule); BitVMX-CPU n = 8 bisection (301 W-OTS digits ≈ 7.44 kvB, 20 steps, 75/15 kvB, F_chal = 0.40 BTC, 100% TRUC v3); simultaneous [0, 144] challenge window, T_take = 1,152, T_cooldown = 1,296, RetireStakeTx = 1,440; 256-bit Lamport TakeTx (5,922 B script, ~3.1 kvB); dual-input slash (0.15/1.85/0.55 positive-EV matrix); (2M+1)-leaf ExitSlotUTXO; exact 12.8/18.8 BTC capital & 65–72d bank-run math; Stage 1B clArk spec; Appendix A (Track B Pure Tier-0 Bitcoin Soft-Fork Covenant + BitVM2/BitVM3 Reference). |
| Part 2 | spec/02-btc-authorization-domain-and-spv.md | Stage 0 Direct-on-L1 Bitcoin SPV Event Oracle (Event Validity only, 1-/2-block coinbase midstate SHA-256 final padding covering all len % 64, exact ABI/storage-op/dp.MaxContractBlocks = 40 budget) + Stage 1A Bitcoin-L1-Canonical Authorization Domain (0x00..0x07 OP_RETURN "ZBTX" tags, full ≤ 1 MB stripped-block scan + single wtxid_i branch, launch-time (h_lane_init, H, D) PoW anchor with D ≥ 0.50 × D(h_lane_init) and TVL-scaled K). |
| Part 3 | spec/03-settlement-minted-zbtc-and-feeless-rails.md | Stage 0 Hardened Non-Custodial PTLC & LN HTLC Swaps (absolute Unix timestamps, 2.3× slow-block margin) + Stage 1A Sovereign Rollup STF F & Feeless Zenon Sequencer Rails (AccountBlock.Data ~28,480 Plasma, honest 8 MiB ~1,050–1,200 tx/s ceiling, RollupHTLC/RollupPTLC, B_zbtc = 0.60 BTC/lane accounting, ExitSlotUTXO spend-or-refund, permissionless DA batchers) + Stage 1B clArk VTXO Coordination. |
| Part 4 | spec/04-bitcoin-anchoring-and-light-client.md | Zenon 49% Consensus Reality (go-zenon Code Proof) & Inverted Trust Hierarchy: Proof of DPoS failure at 49% (height-only findSeed, unweighted top-30 groupA, zero slashing, 30-Momentum cliff) and BFT failure at > 33.3%, why Bitcoin L1 ordering + DA + forced inbox achieves 0-of-N Zenon trust (eliminating BLS finality from BTC custody), and non-custodial light-client UX notes. |
| Part 5 | spec/05-go-zenon-upgrade-plan.md | Minimal go-zenon Upgrade Plan: Stage 0 prerequisites (0aa299e tag, #239 FIFO panic-stall closure, DynamicPlasmaSpork + full SetPlasmaVariables pinning of MaxBasePlasmaInMomentum, MaxPriceChangePercent, FusedPlasmaTarget, PowPlasmaTarget, PriceChangeDenominator, PtlcSpork, Stage 0 SPV Event Oracle) + zero-hard-fork custody boundary for Stage 1A/1B (SporkAddress cannot steal BTC or censor L1 exits). |
| Checker | scripts/verify_spec_bounds.py | Stdlib-only Python 3 Consistency & Bounds Checker asserting all Stage 0, Stage 1A (BitVMX n=8), Stage 1B (clArk), and Theorem 2 bounds + non-no-op 2,000-step randomized simulation with real Bitcoin reorgs, ExitSlotUTXO grief slashes, and Lamport equivocation slashes. |
| Changelog | CHANGELOG.md | Complete v0 (v2.5.0-rfc) → v1 (v3.0.0-rfc) finding-by-finding disposition (C-1..C-4, H-1..H-8, M-1..M-15, L-1..L-4, N-1..N-6, B1..B5) and rejection rationale for custodial federated multisigs. |
2.1 Authority & Conflict Precedence (M-13 Fixed)
- Bitcoin L1 Consensus & Part 1 Vault Scripts (
spec/01,BTC-BITVMX-V1) — non-overridable custody layer. Hard-pinnedvk_STF, deleted-key Taproot graphs,StakeChain, andExitSlotUTXOrules cannot be overridden by any Zenon contract, Pillar, or spork. - Bitcoin-L1-Canonical Authorization & Rollup STF (
spec/02&spec/03) — deterministic state transition over Bitcoin L1 blocks (0x00..0x07). - Stage 0
go-zenonRuntime & SPV Event Oracle (spec/05) — governs feeless Zenon sequencing UX and Stage 0 non-custodial SPV/PTLC rails; holds ZERO authority over Stage 1A BTC custody. - Non-Custodial Anchoring & Light-Client Infrastructure (
spec/04) — informational/UX layer only.
3. End-to-End Protocol Flows & Hostile Scenario Traces
3.1 Stage 0: Verify Bitcoin (SPV Event Oracle + Non-Custodial PTLC/LN)
Zero pooled BTC custody (0 BTC bridge exposure):
- Relayers submit Bitcoin headers and Merkle inclusion proofs (with 1- or 2-block SHA-256 coinbase midstate padding) to the Stage 0 SPV Event Oracle (
spec/02 §2), proving Event Validity on the best PoW chain. - Users swap native BTC / Lightning against Zenon assets atomically via BIP-327 Taproot MuSig2 PTLCs (
<72> OP_CSVrefund leaf,h_conf + 66confirmed-before-refund with CPFP,T_znn = now + 108,000s=30hleaving4.7hmargin under2.3×June 2021 slow blocks) or SHA-256 HTLCs (hashType = 1,Δ_safety = 36blks, Hold Invoice rate limits,spec/03 §1).
3.2 Stage 1A: Sovereign ZK Validity Rollup + Right-Sized BitVMX (n = 8, M = 3–5, N = 7)
Flow A — Acyclic Deposit (Alice 1 BTC, Bob 1 BTC, Closes v0 C-4, N-2, M-7)
- Alice locks
1.0 BTC + feein her own self-custodial staging UTXOU_Alice_walletwith TapscriptOP_DROP <pk_Alice> OP_CHECKSIG. - Alice prepares
DepositTxspendingU_Alice_wallet→vout[0..2]= multi-tier deleted-key vaults{0.50, 0.25, 0.25}BTC (3vaults/BTC, avg0.333 BTC,maxVaultDenom = 0.50 BTC) +vout[3]=69 BOP_RETURN "ZBTX" || 0x00 || recipientAcctHash(32B) || vaultParamsHash(32B). Becausevout[3]does not hashcertBlob,txid_depis fixed before signing. - Alice +
N = 7presigners + all online operators (≥ M_min, recorded inopBitmask) presign theTakeTx_{d,j,l,r}graphs (M × L × R = 5 × 1 × 64 = 320pre-signedTakeTxs per vault ≈40 KB,< 100msMuSig2 ONCE at deposit) using fresh per-deposit ephemeral keysQ_setup_d = MuSig2(P_{1..N,d}, P_{A,d}). - Each presigner permanently deletes
x_{i,d}and signs non-spending identity attestationσ_certovertxid_dep, formingcertBlob = σ_cert(64B) || Q_setup_d(32B) || opBitmask(8B)(104 B ≤ 520 BBIP-342 stack limit). - Only after verifying all pre-signed
TakeTxs andσ_certdoes Alice deletex_{A,d}, push[sig_Alice, certBlob, script, controlBlock]intoDepositTx.vin[0].witness, and broadcast (zero hash cycle, zero stranding!). AtK = 14confirmations, the STARK scansDepositTxvia stripped block +wtxid_depand credits1.0 zBTCto Alice (identical for Bob).
Flow B — Feeless zBTC Transfers on Zenon (AccountBlock.Data)
- Signed rollup transfers (
~110 B) are submitted in ZenonAccountBlock.Data, paying0satoshis BTC fee,0burned ZNN/QSR, and21,000 + 68 × 110 = 28,480Plasma (~14refundable fused QSR or~42.7MSHA3-256 PoW hashes at floor price1,000;~11.4ssoft confirmations; honest throughput~4.4tx/s at2.1Mfloor,~8.8tx/s default,~1,050–1,200tx/s real hard ceiling underMaxMomentumContentBytes = 8 MiB). - Permissionless market-funded batch proposers aggregate feeless transfers every
~6Bitcoin blocks into0x02 BATCH_DAcarrying complete mutated SMT leaves (16 Bexisting /48 Bnew account) + succinct embedded proofπ_batch(transparent STARK/IPA or Groth16). First valid0x02matchingR_{h-1}in Bitcoin L1 block/tx order wins; invalid batches are deterministically skipped in-circuit.
Flow C — Hostile Trace 1: Bob (1 BTC → 1 zBTC → spends 0.5 → recovers 0.5 BTC Under 49%–100% Zenon Compromise)
- Bob deposits
1.0 BTC({0.50, 0.25, 0.25}vaults) →1.0 zBTCcanonical on Bitcoin L1. - Bob spends
0.5 zBTCfeelessly on Zenon (retaining0.5 zBTC). Even if49%–100%of Zenon Pillars are Byzantine,go-zenonpermanently splits across its 30-Momentum cliff, Dynamic Plasma spikes100,000×, orSporkAddressupgradesgo-zenonmaliciously: no attacker can forge Bob's signature on his remaining0.5 zBTCor mutatevk_STF. - Bob bypasses Zenon completely by broadcasting a
~150 vBBitcoin L10x01 FORCED_EXIT(0.50 BTC → P_Bob) creating a546-sat(2M + 1)-leafExitSlotUTXO. - Any
1-of-M(M = 3–5) operator spendsExitSlotUTXOasvin[0]and pays0.50 BTC - f_opdirectly toP_Bobinvout[0](confirmed in ~1 Bitcoin block / ~10 minutes). - At
K = 14, the STARK creditsReimbursementCredit[O_j] += 0.50 BTC, FIFO-assigns one0.50 BTCvaultU_dtoO_j, andO_jclaimsU_dviaRoundTx_r → TakeTx(T_take = 1,152blks, verified byN = 7pre-committed verifiers undern = 8BitVMXbisection).
Flow D — Hostile Trace 2: Mike (Alice 1 + Bob 1 → Mike 2 → recovers 0.25 BTC When Zenon Signers Refuse to Sign)
- Alice (
1.0 BTC) and Bob (1.0 BTC) deposit into{0.50, 0.25, 0.25}vaults and send2.0 zBTCfeelessly to Mike on Zenon.- Once anchored in
0x02 BATCH_DA, Mike's2.0 zBTChas 100% Bitcoin PoW finality (immune to 100% Zenon + 100% Alice/Bob collusion). - If Zenon Pillars stall or refuse to batch BEFORE
0x02posts, Mike self-includes Alice's and Bob's raw signed transfers directly on Bitcoin L1 via0x03 FORCED_TRANSFER! (Pre-L1-batch~11.4sZenon confirmation is honestly disclosed as a soft confirmation; large receipts like2 BTCwait for L1 batch confirmation.)
- Once anchored in
- Zenon signers refuse to sign everything. Mike ignores Zenon completely and broadcasts L1
0x01 FORCED_EXIT(0.25 BTC → P_Mike, creatingExitSlotUTXO; Mike retains1.75 zBTC). - Any
1-of-M(M = 3–5) operator spendsExitSlotUTXOand pays0.25 BTC - f_opdirectly toP_Mikeinvout[0](~10 minutes). Alice and Bob cannot front-run or steal it; Bitcoin L1 UTXO exclusion prevents double-fronting. - At
K = 14, the STARK FIFO-assigns one0.25 BTCvault toO_j(the remaining0.75 BTCof Alice's split —0.50 + 0.25— stays untouched in deleted-key BitVMX vaults!). For arbitrary non-bucket exits (e.g.,0.2371 BTCor0.001 BTC),O_jstill pays the exact amount inFrontingTxand accumulatesReimbursementCredit[O_j]until hitting an available0.25/0.50 BTCvault — zero new presigning needed! - Fee-spike & grief recovery: If Bitcoin fees spike above
f_op, Mike bumpsf_opvia0x06 EXIT_FEE_BUMPor cancels after<288> OP_CSVvia Leaf2M(EXIT_CANCEL). If a rogue operator sweepsExitSlotUTXOwithout payingvout[0], the STARK atomically refunds0.25 zBTCto Mike, slashes0.01 BTCfrom the operator's0.05 BTCgrief buffer to Mike, and auto-suspends the operator.
4. Honest Threat Model, Residual Boundaries & Privileged Powers Table (H-3 Closed)
v1 Stage 1A (BitVMX Rollup) is trust-minimized (Tier 1), NOT pure Tier 0 (which Theorem 1 proves requires a Bitcoin soft fork — see spec/01 Appendix A). Delivered security is bounded by the following explicit, un-sugarcoated assumptions:
- Zero Zenon Consensus or ZNN Market-Cap Trust (
0-of-NZenon — Survives 49%–100% Zenon Compromise): Neither Zenon Pillars,go-zenonDPoS/BFT, ZNN's~25–33 BTCmarket cap, nor ZenonSporkAddresssit in the Bitcoin custody safety or L1 forced-exit path. Zenon Plasma DoS temporarily degrades feeless UX to L1 BTC fees (0x03/0x01), never custody. 1-of-NEphemeral Setup Deletion & Open-Cohort Attestation (N = 7Pilot): At least 1 ofNpresigners honestly deletes its per-deposit ephemeral sharex_{i,d}(depositor also participates and deletesx_{A,d}!) AND at least 1 ofNlong-term attestation keysid_iremains uncompromised while a cohort is open to new deposits. Compromising allNid_ikeys cannot sweep existing deleted-key vaults; losing 1 ofNid_inever bricks existing vaults (only halts new deposits onv1, requiring a clean non-commingledzBTC_v2).1-of-NPre-Committed Online Verifier Safety (N = 7Pilot, NOT1-of-∞): At least 1 ofN = 7independent pre-committed verifiers monitors Bitcoin within[0, 144]blks (24h) and runs15 kvBn = 8BitVMXbisection (20steps,T_step = 48blks, `total verifier weight) with CPFP. Anyone on Earth can detect fraud and alert all 7 verifiers off-chain, and every honest verifier has **positive EV (≥ +0.0167 BTC@500 sat/vB) even if6 of 7verifiers collude with the operator**. If ALL7verifiers go offline or collude simultaneously during[0, 144], a cheating operator can steal≤ 0.50 BTC`/round.1-of-MPre-Committed Operator Exit Liveness (M = 3–5Pilot — Irreducible Corollary 1B Bound): At least 1 ofM = 3–5independent bonded operators remains online with liquid BTC to front exits. If ALLM = 3–5operators vanish permanently, Mike cannot self-claim on Bitcoin L1 today (0theft; after288blks Mike cancels via Leaf2Mand retains0.25 zBTC, exits stalled until an operator returns).- Sustained Dispute Fee-Rate Envelope (
≤ 500 sat/vBfor6.7Consecutive Days):F_chal = 0.40 BTCcovers~75 kvBProver bisection up to533 sat/vBsustained across all20steps (6.7days); Verifier~15 kvBis covered up to610 sat/vB(worst-case 6-way split) /1,000 sat/vB(winner L1 payout). Historical peaks (1,805 sat/vBApril 2024 lasted~33h≈ 2–4 steps) fit comfortably; a hypothetical week-long> 533 sat/vBspike erodes honest dispute coverage. - TVL-Scaled Private-Fork Bound (
0.50 × K × Subsidy(era) > Cap_TVL): WithoutOP_BLOCKHASH, each lane pins launch-time(h_lane_init, H, D)withD(h) ≥ 0.50 × D(h_lane_init)and caps TVL strictly below private-fork PoW cost (K = 14⇒Cap_TVL ≤ 15 BTC;K = 36⇒≤ 50 BTC;K = 144⇒≤ 200 BTC). - Bank-Run Recycling Queue (
~65–72Days for 100% Run atM = 3–5, L = 1): While individual exits front in10m up to available operator float (72d2.20–3.00 BTC), a 100% bank run recycles at0.111 BTC/day(M = 3, `for10 BTC) or0.185 BTC/day(M = 5,65d47dfor15 BTC) under{0.50, 0.25, 0.25}vaults (or/~43dunder{0.50, 0.50}` vaults). - Stage 1B (
clArk) Alternative Assumptions (If Chosen Instead): Zero operator bonds and pure0-of-Npost-round unilateral exit until VTXO expiry, BUT sacrifices pooled fungiblezBTC, carries hard VTXO expiry (log2(N)L1 branch exit fees), requires100%ASP liquidity per cycle, and exposes pre-roundarkoortransfers tosender + ASPcollusion.
4.1 Complete Privileged Powers Table (H-3 Closed — ZERO Custodial Authority)
| Power / Action | Holder | Threshold | Timelock | Maximum Effect / Blast Radius on Stage 1A BTC Custody |
|---|---|---|---|---|
Spend Existing Stage 1A BTC Vaults (U_d) | NOBODY (ephemeral Q_setup_d deleted) | N/A | N/A | 0 sats custodial sweep power. Spendable ONLY via pre-signed TakeTx after T_take = 1,152 blks subject to N = 7 BitVMX verifiers + Lamport equivocation slash. |
Mutate Rollup STF Rules (vk_STF) on Existing Vaults | NOBODY (vk_STF hard-pinned at t = 0) | N/A | N/A | 0 effect. No Zenon spork, governance vote, or operator can alter STF rules on existing vaults. |
Voluntary Cohort Handover (Same vk_STF Only) | Cohort 1 Presigners (id_1..id_N) | N-of-N (7-of-7) | None (new deposits only) | Strictly 1-of-N safe; cannot touch existing vaults. Involuntary 1-of-N loss halts new v1 deposits cleanly (zBTC_v2 required). |
Zenon Protocol Sporks (CreateSpork, ActivateSpork, SetPlasmaVariables) | SporkAddress (z1qpxsw...) / CommunitySporkAddress (z1qqvwz..., window heights 14,567,887–19,791,986, origin/dev:vm/embedded/definition/spork.go) → future GovernanceContract | 1-of-1 today | SporkMinHeightDelay = 6 Momentums (node layer) | 0 BTC custody blast radius in Stage 1A. Can disrupt feeless Zenon sequencing or Stage 0 embedded SPV contract, but cannot steal 1 satoshi from BitVMX vaults or censor L1 0x01/0x03 exits. (Stage 0 pins full SetPlasmaVariables floor in spec/05.) |
Operator Fronting & Reimbursement Claim (O_1..O_M) | Independent Bonded Operators (M = 3–5 pilot) | 1-of-M for exit liveness | T_take = 1,152 blks; T_cooldown = 1,296 blks | Zero theft power under 1-of-N verifier honesty (-1.94 to -2.55 BTC net loss on fraud: -2.55 BTC solo, -2.40 to -1.9417 BTC with 1..6 colluders); all M vanishing stalls exits (0 principal loss). |
BitVMX Fraud Challenge (V_1..V_7) | Independent Pre-Committed Verifiers (N = 7) | 1-of-7 | [0, 144] blks open; T_step = 48 blks | Any 1 honest verifier stops fraud, collects ≥ +0.0167 to +0.075 BTC net profit, and burns 1.85 BTC of rogue operator's bond. |
5. Reference go-zenon Ground-Truth Baseline (M-3, B1, B2, L-3)
- Verified Local Clone:
master(e8986a6,v0.0.10-alphanet) andorigin/dev(770e893, carryingDynamicPlasmaSpork,PtlcSpork,Libp2pSpork). (Note: upstream fix0aa299eis not present in the local git clone and remains an explicit Stage 0 upstream release gate.) - Stage 0 Hard Preconditions (
spec/05): (1) First taggedgo-zenonrelease containing0aa299e; (2) upstream issue#239deterministic failed-receive closure (B1); (3)DynamicPlasmaSporkenforced with completeSetPlasmaVariablespinning (MaxBasePlasmaInMomentum >= 2,100,000,MaxPriceChangePercent <= 25%, PLUS lower bounds onFusedPlasmaTarget >= 525,000,PowPlasmaTarget >= 525,000, andPriceChangeDenominator >= 8, preventing exponential Dynamic Plasma lockout); (4)PtlcSporkactive. - Stage 1A / 1B Zero-Hard-Fork Property: Stage 1A Rollup nodes read standard Zenon
AccountBlock.Dataand Bitcoin L1 — requiring zerogo-zenonconsensus hard fork beyond Stage 0.
6. Upstream Amendment Register (v1 Zero-Federation Scope)
| ID | Upstream Target | Status in v1 | Normative Requirement |
|---|---|---|---|
| A-SPEC-1, A-SPEC-2, A-SPEC-6 | Project Zeno optimistic bridge framework | Not required in v1 | Stage 0 uses direct Event-Validity SPV; Stage 1A uses Bitcoin-L1-canonical ZK validity (0x00..0x07). |
| A-SPEC-4 | Deterministic Exit ID | Required (Stage 1A) | exitId = SHA256("ZBTX_EXIT_V1" || bitcoinTxid || voutOrIdx || nonce) derived deterministically on Bitcoin L1. |
| A-BTC-1 | Bitcoin Refund / Exclusion Rules | Required (Stage 1A) | Refunds enforced strictly by Bitcoin L1 UTXO exclusion (ExitSlotUTXO spend-or-refund rule) — zero timeout-vs-fronting double-pay races (M-8). |
| A-MINT-1 | TokenContract.IssueMinted | Retired in v1 | Stage 1A zBTC balances live in the Bitcoin-canonical Rollup SMT (NOT pre-minted inside a Zenon embedded contract, eliminating H-8 entirely!). |
| A-PILLAR-1 | go-zenon pillars.go BLS12-381 & 72d lock | Not required in v1 | Zenon consensus & Pillar committees are removed from BTC custody completely (spec/04). |
7. Phased Delivery, Capital Decision Gates & Zero-Dead-End Growth (M-15)
| Stage | Timeline & Hard-BTC Capital | Normative Scope & Blocking Exit Criteria | Zero-Dead-End Migration Guarantee |
|---|---|---|---|
| Stage 0 (Mandatory Foundation — Verify Bitcoin) | 0–6 months, 0 BTC bridge custody risk (0–5 BTC voluntary LP) | Ship go-zenon prerequisites (0aa299e, #239, full SetPlasmaVariables pinning, PtlcSpork), Direct-on-L1 Bitcoin SPV Event Oracle (1-/2-block coinbase midstate, ≤ 24 storage ops, dp.MaxContractBlocks = 40), and non-custodial PTLC/LN atomic swaps (2.3× slow-block safe). Build & test the Rollup stripped-block STARK + BitVMX-CPU (RV32IM n=8) stack on Signet. | Zero custodial BTC at risk while proving every Rollup + BitVMX primitive on Signet. |
Stage 1A (Primary Path — Right-Sized BitVMX Rollup) | 12–18+ months (incl. audit, 4–6 engineers); 12.8 BTC (M=3, N=7, ≤ 10 BTC TVL) or 18.8 BTC (M=5, N=7, ≤ 15 BTC TVL) (≈ 40–75% of ZNN's ~25–33 BTC mcap) | Hard Entry Gates: (1) Full Signet drill of DepositTx, 0x01–0x07, ExitSlotUTXO (fronting, grief slash, cancel), RoundTx → TakeTx (Lamport equivocation slash), and n=8 BitVMX 20-step TRUC v3 bisection (verifying measured weights ≤ 7.44 kvB/tx); (2) independent third-party cryptography & Bitcoin-Script audit (M-15); (3) committed independent operator + verifier hard BTC (2.60 BTC/lane + 0.40 BTC/verifier). Pre-mainnet maturity of BitVMX-CPU explicitly disclosed. | Deleted-key vaults NEVER expire and stay 100% redeemable 1:1 via 0x01 FORCED_EXIT to native BTC L1. |
Stage 1B (Explicit Alternative Gate — clArk) | 3–6 months, 2–5 BTC active ASP liquidity (0 bonds) | Trigger: Choose Stage 1B ONLY if the ecosystem cannot commit ~12.8–18.8 BTC of non-yielding hard BTC OR prioritizes 3–6 mo launch / 0-of-N post-round exit over pooled fungibility. Deploy Second bark / Ark Labs arkd + Zenon SPV/PTLC (spec/01 §7, spec/03 §3). Do NOT under-bond BitVMX/BitVM2. | Users hold self-custodial expiring VTXOs with unilateral L1 exit; explicitly non-commingled with any future Rollup zBTC. |
| Stage 2 (Zero-TTP Scale & Upgrade) | 12+ months post-Stage 1 (15–200+ BTC TVL, or unlimited w/ soft fork) | (a) Same-STF BitVMX scaling (M=5→20, L=1→4, K=36→144): strictly via pre-planned N-of-N Cohort 1 voluntary handover (zero governance key). (b) Custody backend upgrades (BitVM3-GC / BitVM2 / Appendix A Track B Pure Tier-0 OP_CCV or OP_CAT Covenant): ALWAYS launch a clean, non-commingled zBTC_v2 reusing the open-source Rollup STF codebase. | Zero deleted-key L1 rollover needed; Stage 1A vaults drain organically 1:1 to native BTC via 0x01 exits. |
8. Alignment with Zenon's Non-Bridging Philosophy (Verify Bitcoin, Don't Bridge It.md)
- Stage 0 implements
Verify Bitcoin, Don't Bridge It.mdverbatim: Bitcoin stays strictly in user custody while Zenon imports verified PoW Event Validity and coordinates atomic PTLC/LN swaps. - Stage 1A respects the essay's core warning ("Zenon can't prevent spending. That's Bitcoin's job") by refusing custodial federations and refusing to place Zenon consensus in Bitcoin's enforcement path — pushing 100% of custody enforcement, canonical ordering, DA, and forced exits onto Bitcoin L1 (
BitVMX+ ZK validity).
9. Public Claims Alignment (bigidea Synchronization)
All public materials (including btc-moonshot.github.io/bigidea) MUST match v1 verbatim:
Outdated Public Claim (v0 / bigidea) | Accurate v1 (v3.0.0-rfc) Statement |
|---|---|
| "The network never holds a pooled key" | True in v1 for existing vaults: per-deposit ephemeral keys Q_setup_d are permanently deleted at deposit (with zero custodial federation). Honest disclosure: Stage 1A still relies on 1-of-N (N=7) open-cohort deposit attestation + 1-of-N pre-committed online BitVMX verifiers + 1-of-M (M=3–5) bonded fronting operators. Pure 0-of-N unilateral exit requires a Bitcoin soft fork (spec/01 Appendix A). |
| "One honest watcher can stop a bad payout" | Clarified for Stage 1A: Any 1-of-7 pre-committed online BitVMX verifier can stop a bad payout with positive EV (≥ +0.0167 BTC @ 500 sat/vB), and anyone on Earth can detect fraud and relay it to all 7 verifiers. (1-of-∞ permissionless BitVM2 requires ~45–100+ BTC even at M=3–5 and is unaffordable for a young project.) |
| Proofs "end at Bitcoin's proof-of-work" | True in Stage 1A: Canonical zBTC state ordering, DA (0x02), and forced exits (0x01/0x03) are anchored directly on Bitcoin PoW with 0% Zenon consensus trust (bounded by TVL-scaled K against private PoW forks). |
| "Security is funded by the network's own staking token" | False — explicitly rejected. ZNN (~25–33 BTC total market cap) is 0% in the BTC custody safety path; all operator/verifier collateral is hard BTC. |
| "Millions of transactions per second"; per-second streams | Zenon Dynamic Plasma at ~11.4s/Momentum provides ~4.4 base transfers/s at the 2.1M floor, ~8.8 tx/s at default 4.2M, and a real hard ceiling of ~1,050–1,200 tx/s under go-zenon's 8 MiB MaxMomentumContentBytes cap (NOT 4,386 tx/s). Stage 1A rollup txs use AccountBlock.Data (~28,480 Plasma, ~11.4s soft confirmation, Bitcoin L1 finality on 0x02 batch anchor). |
| "0 satoshi fees" | 0 satoshi BTC fee for Stage 1A feeless rollup transfers on Zenon (costing ~28,480 refundable QSR/PoW Plasma; NOT native ZTS). Deposits, L1 forced exits (0x01), and fronting spreads pay Bitcoin L1 fees; under Zenon Plasma DoS, users bypass Zenon via Bitcoin L1 fees. |
| "Oracle verified" | Consistency-checked via scripts/verify_spec_bounds.py against SOURCED_, POLICY_, and PRE_MAINNET_TARGET_ inputs; not empirically audited until Stage 0/1A Signet & third-party audit gates pass. |
| Omission of Zenon / ZNN / QSR / Pillars | Public pages MUST explicitly name Zenon Network, ZNN, QSR, and Pillars, and disclose BitVMX-CPU's pre-mainnet status (12–18+ mo timeline) and ~65–72d 100% bank-run exit queue. |
10. Written Answers to Consolidated Hostile Review (R7)
Every R7 question against v0 is answered normatively in v1 without resorting to federated multisigs (full table in CHANGELOG.md):
- C-1 (ZNN/BTC forging price): Closed by removal.
0%ZNN in BTC safety; allBitVMXbonds (2.60 BTC/lane) and verifier escrows (0.40 BTC) are hard BTC. - C-2 (Honest BLS certs over dishonest Zenon state): Closed by removal. BLS Pillar committees and optimistic Zenon batches are deleted; Stage 1A verifies an immutable Bitcoin-anchored ZK validity rollup (
vk_STF,0-of-NZenon trust). - C-3 (BitVM2 4.4–10× under-costed assert/disprove): Resolved by architecture switch. Groth16 BitVM2 (
~1.0–1.3M vB,~45–100+ BTCmin bonds) is replaced withn = 8BitVMX-CPU(RV32IM) bisection (~7.44 kvB/tx TRUC v3,~75 kvBProver /~15 kvBVerifier,12.8–18.8 BTCtotal pilot capital). - C-4 (Never-deleted
N-of-NQ_graph): Closed. Becausevk_STFnever rotates with PoS epochs, vault graphs never expire; ephemeralQ_setup_dandQ_lanekeys are permanently deleted after setup. Zero custodial multisigs. - H-1 & H-2 (Free-delegation capture & 10-seat cert withholding): Closed by removal. No Pillar finality committee exists in BTC custody.
- H-3 (Upgrade & Plasma authority = custody authority): Closed.
vk_STFis hard-pinned on Bitcoin L1 (SporkAddresshas0BTC custody blast radius); Stage 0 pins allSetPlasmaVariablesfields (spec/05); full Privileged Powers Table in §4.1. - H-4 (Altruistic watcher
-1.46 BTCEV & self-slash): Closed. Pre-committedBitVMXverifiers receive0.15 BTCL1 directly fromStake_r(1.85 BTCburned), reclaim100%ofF_chalfromChalEscrow_{r,i}, and remaining honest challengers split0.55 BTCfromB_zbtc(≥ +0.0167 BTCpositive EV even against6-of-7verifier collusion!). - H-5 (Missing exit liveness & throughput math): Closed.
1-of-M(M = 3–5) operator liveness is Assumption #4 (§4); exact throughput (0.111–0.185 BTC/day) and 100% bank-run duration (~65–72days under{0.50, 0.25, 0.25}vaults;~43–47dunder{0.50, 0.50}) are published alongsideCap_TVL. - H-6 (April 2024 fees & June 2021 slow blocks): Closed. Zero absolute CLTV cliffs (relative CSVs only); 100% TRUC v3 +
0-satP2Aephemeral anchors eliminate pre-signed fee cliffs; PTLC sized for2.3×slow blocks; sustained500 sat/vB6.7-day bisection envelope disclosed explicitly. - H-7 (Unpaid anchoring & mobile BTC proofs): Closed. Bitcoin L1 IS the canonical rollup ordering & DA layer (
0x02/0x01/0x03); no Zenon epoch-handoff anchoring is needed for BTC custody. - H-8 (21M pre-mint blast radius inside
SettlementContract): Closed by removal. Stage 1AzBTCis accounted strictly in the Bitcoin-canonical Rollup SMT, never pre-minted into an upgradeable Zenon embedded contract. - M-9 & M-10 (
11.4sMomentum, Dynamic Plasma & honest8 MiBceiling): Closed. Honest~4.4 / ~8.8 / ~1,050–1,200 tx/sceiling (MaxMomentumContentBytes = 8 MiB),28,480Plasma perAccountBlock.Datarollup tx, and fullSetPlasmaVariablespinning. - M-15 (Independent review): Enforced. Stage 1A mainnet activation blocks strictly on Signet measurements and an independent third-party cryptography/Bitcoin-Script audit.
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.