v2 (v3.1.0-rfc) · public rfc · zero-federation · not mainnet-active
Part 3: Stage 0 Erlang-Hardened PTLC/HTLC Swaps, Stage 1A Sovereign Rollup STF & Feeless Zenon Rails, and Stage 1B clArk Coordination
Showing word-highlighted redline changes from archived v1 (v3.0.0-rfc) to v2 (v3.1.0-rfc). For structured finding-by-finding rationale, see theChangelog.
| @@ -1,5 +1,5 @@ | |||
| 1 | - | # Part 3: Stage 0 Non-Custodial PTLC/HTLC Swaps, Stage 1A Sovereign Rollup STF & Feeless Zenon Rails, and Stage 1B `clArk` Coordination | |
| 1 | + | # Part 3: Stage 0 Erlang-Hardened PTLC/HTLC Swaps, Stage 1A Sovereign Rollup STF & Feeless Zenon Rails, and Stage 1B `clArk` Coordination | |
| 2 | 2 | ||
| 3 | - | **Document Class:** Normative Settlement, Rollup State Transition & Feeless Payment Specification (`v1` / `v3.0.0-rfc` — Zero-Federation Phased Architecture; supersedes archived `v0` `v2.5.0-rfc`) | |
| 3 | + | **Document Class:** Normative Settlement, Rollup State Transition & Feeless Payment Specification (`v2` / `v3.1.0-rfc` — Zero-Federation Phased Architecture; supersedes archived `v1` `v3.0.0-rfc` and `v0` `v2.5.0-rfc`) | |
| 4 | 4 | **Custody Posture:** **ZERO federated signers, ZERO ZNN governance/slashing custody coupling, ZERO federated multisig or embedded-contract pre-minting.** | |
| 5 | 5 | **Consistency Checker:** [`scripts/verify_spec_bounds.py`](../scripts/verify_spec_bounds.py) | |
| @@ -7,39 +7,40 @@ | |||
| 7 | 7 | --- | |
| 8 | 8 | ||
| 9 | - | ## 1. Stage 0: Non-Custodial PTLC & HTLC Atomic Swaps (`PtlcSpork`, `M-4` Hardened) | |
| 9 | + | ## 1. Stage 0: Erlang-Hardened Non-Custodial PTLC & HTLC Atomic Swaps (`PtlcSpork`, `M-4`, `R8-H07`) | |
| 10 | 10 | ||
| 11 | 11 | Stage 0 launches with **`0 BTC` protocol custody** (`0–5 BTC` voluntary LP capital), strictly honoring `zenon-developer-commons` (`essays/Verify Bitcoin, Don't Bridge It.md`). Native BTC stays in user self-custody on Bitcoin L1 or Lightning; Zenon swaps native ZNN/QSR/ZTS assets atomically via `PtlcContract` and `HtlcContract`. | |
| 12 | 12 | ||
| 13 | - | > **Stage 0 Scope Honesty:** Stage 0 atomic swaps do **not** create pooled, fungible `zBTC` on Zenon. A counterparty LP is required for every swap, and under a severe Zenon attack rational LPs pull liquidity. Stage 0 delivers immediate zero-custody Bitcoin interoperability while Stage 1A (`BitVMX` Sovereign Rollup) or Stage 1B (`clArk`) is built and audited. | |
| 13 | + | > **Stage 0 Scope & Conditional Atomicity Honesty (`R8-H07`):** Stage 0 atomic swaps do **not** create pooled, fungible `zBTC` on Zenon. A counterparty LP is required for every swap, and under a severe Zenon attack rational LPs pull liquidity. Furthermore, cross-chain swap atomicity is explicitly **conditional on bounded Bitcoin/Zenon block progress and timely automated refund broadcast** — never unconditional against arbitrary unbounded chain stalls. | |
| 14 | 14 | ||
| 15 | - | ### 1.1 Hardened BIP-327 Tweaked Taproot PTLC Swap (`M-4`) | |
| 15 | + | ### 1.1 Erlang-Hardened BIP-327 Tweaked Taproot PTLC Swap (`M-4`, `R8-H07` Closed) | |
| 16 | 16 | ||
| 17 | 17 | **Protocol (Alice sells BTC on Bitcoin L1; Bob sells Zenon asset on Zenon; Bob holds secret scalar $t \in \mathbb{Z}_n^*$):** | |
| 18 | 18 | 1. **Setup:** Bob sends compressed 33-byte point $T = \text{compress}(t \cdot G)$ to Alice. | |
| 19 | 19 | 2. **Bitcoin Taproot Funding (`>= 72`-Block CSV):** Compute $P_{\text{swap}} = \text{MuSig2\_KeyAgg}(pk_A, pk_B)$, Tapscript refund leaf $L_{\text{ref}} = \text{<72> OP\_CSV OP\_DROP <pk\_A> OP\_CHECKSIG}$, tweak $t_{\text{tap}} = H_{\text{"TapTweak"}}(x(P_{\text{swap}}) \parallel \text{TapLeaf}(L_{\text{ref}}))$, and $Q_{\text{swap}} = P_{\text{swap}} + t_{\text{tap}} \cdot G$ with BIP-327 accumulated tweak `t_acc` and parity `g_key`. Alice funds `0x51 0x20 || x(Q_swap)`. Let $h_{\text{conf}}$ be Bitcoin confirmation height and `now_unix` be current UTC Unix seconds. | |
| 20 | - | 3. **Absolute Unix Timestamp Lock & `2.3×` Slow-Block Margin:** | |
| 20 | + | 3. **Absolute Unix Timestamp Lock & Erlang-Safe `>= 48h` Slow-Block Margin (`R8-H07`):** | |
| 21 | 21 | - `go-zenon`'s `PtlcContract.Create` compares `momentum.Timestamp.Unix() >= param.ExpirationTime` (`origin/dev:vm/embedded/implementation/ptlc.go:326`), requiring an **absolute Unix timestamp** (NEVER a relative duration!). | |
| 22 | - | - Define `T_znn_sec = 108,000` seconds (`30.0h`, `~9,474` Momentums at observed `11.4s`/Momentum) and **`expirationTime = now_unix + T_znn_sec`**. | |
| 23 | - | - **Verified `2.3×` June-2021 Slow-Block Margin:** Bob MUST confirm his Bitcoin claim by `h_conf + 66` (`6` blocks before Alice's `h_conf + 72` refund). Even under June 2021's worst daily average block slowdown (`2.3×` nominal = `1,380s`/block), `66 × 600s × 2.3 = 91,080s = 25.3h < 30.0h`, leaving Alice **`>= 4.7h`** of honest wall-clock safety margin to extract $t$ and call `PtlcContract.Unlock`. | |
| 24 | - | - Bob calls `PtlcContract.Create(expirationTime = now_unix + 108000, pointType = 2, pointLock = compress(T), destination = Alice_Addr)` (`origin/dev:vm/embedded/definition/ptlc.go:118-129`). | |
| 25 | - | 4. **Adaptor Exchange & Explicit Grief/Free-Option Disclosure:** | |
| 22 | + | - Under Poisson block arrivals at June 2021's worst daily slowdown (`2.3×` nominal = `1,380s`/blk), an old `30h` lock suffered `P(T_72 > 30h | 2.3×) = 22.47%` (`~22.34%` in R8's continuous approx) refund-race exposure (`R8-H07`). Therefore `v3.1.0-rfc` mandates **`T_znn_sec >= 172,800` seconds (`48.0h`, `~15,158` Momentums at observed `11.4s`/Momentum)** and **`expirationTime = now_unix + T_znn_sec`**. | |
| 23 | + | - **Exact Erlang Tail Proof (`scripts/verify_spec_bounds.py`):** At `2.3×` slowdown (`λ = 1/1,380` blks/s), the 99.9th percentile of `72` blocks is `p99.9(T_72) = 38.75h`, leaving **`>= 9.25h` wall-clock tail margin** before `48.0h` and reducing tail exceedance to **`P(T_72 > 48h | 2.3×) < 10^{-6}`** (`~9.5 × 10^{-8}`)! | |
| 24 | + | - Bob calls `PtlcContract.Create(expirationTime = now_unix + 172800, pointType = 2, pointLock = compress(T), destination = Alice_Addr)` (`origin/dev:vm/embedded/definition/ptlc.go:118-129`). | |
| 25 | + | 4. **Mandatory Automated High-Fee RBF Refund Watchtower & Grief Disclosure:** | |
| 26 | 26 | - Alice sends BIP-327 adaptor partial signature $\tilde{s}_A$ within `<= 6` Bitcoin blocks of Zenon PTLC confirmation ($R' = R_A + R_B + T$ with parity $g_R$, $\tilde{s} = \tilde{s}_A + \tilde{s}_B + e \cdot g_{\text{key}} \cdot t_{\text{acc}} \pmod n$). | |
| 27 | - | - **Explicit Disclosure:** Because `PtlcContract` has **no early reclaim** prior to `ExpirationTime`, if Alice withholds $\tilde{s}_A$, Bob's Zenon funds remain grief-locked for the full `30h` duration (zero theft, pure time-lock grief). Once Alice releases $\tilde{s}_A$, Bob holds an `~8h` (`~48`-block) free option until his `h_conf + 54` (`18`-block remaining) broadcast cutoff. Production LPs bound this via small per-peer swap limits or reputation/Lightning Hold Invoices. | |
| 28 | - | 5. **Confirmed-Before-Refund Atomic Claim:** Bob completes $s = \tilde{s} + g_R \cdot t \pmod n$ with a `<pk_B>` CPFP anchor and **MUST confirm by `h_conf + 66`**. Alice extracts $t_{\text{ext}} = g_R \cdot (s - \tilde{s}) \bmod n$, checks `compress(t_ext * G) == PointLock`, and calls `PtlcContract.Unlock(ptlcId, t_ext)` (`origin/dev:vm/embedded/implementation/ptlc.go:82-97`). | |
| 27 | + | - **Mandatory Watchtower Rule (`R8-H07`):** Alice MUST NOT rely on Bob voluntarily honoring a `h_conf + 66` cutoff. Alice's wallet/watchtower MUST automatically broadcast her `<72> OP_CSV` refund transaction **immediately at height `h_conf + 72`** with aggressive RBF fee-bumping (and direct-to-miner backup if mempools exceed `200 sat/vB`) so Bob cannot confirm a late claim near `48h`! | |
| 28 | + | - **Explicit Grief Disclosure:** Because `PtlcContract` has **no early reclaim** prior to `ExpirationTime`, if Alice withholds $\tilde{s}_A$, Bob's Zenon funds remain grief-locked for the full `48h` duration (zero theft, pure time-lock grief). Production LPs bound this via small per-peer swap limits or reputation/Lightning Hold Invoices. | |
| 29 | + | 5. **Atomic Claim & Secret Extraction:** Bob completes $s = \tilde{s} + g_R \cdot t \pmod n$ with a `<pk_B>` CPFP anchor prior to Alice's block-72 watchtower refund. Alice extracts $t_{\text{ext}} = g_R \cdot (s - \tilde{s}) \bmod n$, checks `compress(t_ext * G) == PointLock`, and calls `PtlcContract.Unlock(ptlcId, t_ext)` (`origin/dev:vm/embedded/implementation/ptlc.go:82-97`). | |
| 29 | 30 | ||
| 30 | - | ### 1.2 HTLC & Lightning Submarine-Swap Gateway | |
| 31 | + | ### 1.2 Erlang-Hardened HTLC & Lightning Submarine-Swap Gateway (`R8-H07`) | |
| 31 | 32 | ||
| 32 | 33 | - **Hash Type:** ALL Bitcoin/Lightning HTLCs MUST use **`hashType = 1` (`HashTypeSHA256`, `origin/dev:vm/embedded/definition/htlc.go:92`)**. | |
| 33 | - | - **Consistent Unix-Second Arithmetic:** Let `Δ_safety_blocks = 36` (`6h` nominal, `13.8h` at `2.3×` slow blocks) and `Δ_safety_sec = 36 × 600 = 21,600s` (or `49,680s` at `2.3×`). | |
| 34 | - | - **Inbound (`LN → Zenon`):** User pays Gateway's LN Hold Invoice FIRST; ONLY AFTER Hold Invoice reaches `ACCEPTED` with `remaining_cltv_blocks >= 72` (`2 × Δ_safety_blocks`) does Gateway lock Zenon funds in `HtlcContract` with **`expirationTime_unix <= now_unix + (remaining_cltv_blocks - 36) * 600`**. Gateways MUST enforce `<= 5` concurrent pending hold invoices, `<= 0.10 BTC` exposure per peer, and a **5-minute cancel TTL**. | |
| 35 | - | - **Outbound (`Zenon → LN`):** User locks Zenon funds (`hashType = 1`, `expirationTime_unix >= now_unix + 2 * 21,600`); Gateway pays BOLT-11 invoice whose CLTV expiry satisfies `now_unix + cltv_blocks * 600 <= expirationTime_unix - 21,600`, learns preimage $r$, and unlocks Zenon `HtlcContract`. | |
| 34 | + | - **Slowdown-Adjusted Erlang-Safe Unix-Second Delta (`R8-H07`):** At `100%` hashrate, `36` nominal blocks (`6h` mean) exceed `6h` with probability `P(T_36 > 6h | 1.0×) = 47.78%`! Therefore, while Bitcoin/Lightning block delta remains `Δ_safety_blocks = 36`, **Zenon wall-clock safety delta MUST be `Δ_safety_sec >= 86,400s` (`24.0h`)** — exceeding `p99.9(T_36 | 2.3×) = 22.01h` with **`P(T_36 > 24h | 2.3×) < 0.0002`** (and `< 10^{-20}` at `1.0×` nominal!): | |
| 35 | + | - **Inbound (`LN → Zenon`):** User pays Gateway's LN Hold Invoice FIRST; ONLY AFTER Hold Invoice reaches `ACCEPTED` with `remaining_cltv_blocks >= 72` (`2 × Δ_safety_blocks`) does Gateway lock Zenon funds in `HtlcContract` with **`expirationTime_unix <= now_unix + (remaining_cltv_blocks - 36) * 600`** (ensuring `>= 36` Bitcoin blocks remain after Zenon expiry for Gateway's LN claim/cancel). Gateways MUST enforce `<= 5` concurrent pending hold invoices, `<= 0.10 BTC` exposure per peer, and a **5-minute cancel TTL**. | |
| 36 | + | - **Outbound (`Zenon → LN`):** User locks Zenon funds (`hashType = 1`, `expirationTime_unix >= now_unix + 2 * 86,400 = now_unix + 172,800` = `48h`); Gateway pays a BOLT-11 invoice whose CLTV expiry satisfies **`now_unix + (cltv_blocks * 600 * 2.3) <= expirationTime_unix - 86,400`** (leaving `>= 24h` Erlang-safe wall-clock margin even under `2.3×` slowdown!), learns preimage $r$, and unlocks Zenon `HtlcContract`. | |
| 36 | 37 | ||
| 37 | 38 | --- | |
| 38 | 39 | ||
| 39 | - | ## 2. Stage 1A: Sovereign Rollup STF $\mathcal{F}$ & Feeless Zenon Sequencer Rails | |
| 40 | + | ## 2. Stage 1A: Sovereign Rollup STF $\mathcal{F}$ & L1-Subsidized Feeless Zenon Sequencer Rails | |
| 40 | 41 | ||
| 41 | 42 | In Stage 1A, `zBTC` is a **Bitcoin-Anchored Sovereign ZK Validity Rollup** backed by **right-sized `BitVMX` (`n = 8`, `M = 3–5`, `N = 7`) deleted-key vaults** (`spec/01`). **Zero federated signers and zero ZNN governance keys touch BTC custody or `zBTC` supply.** | |
| 42 | 43 | ||
| 43 | - | ### 2.1 Immutable Rollup SMT State Schema | |
| 44 | + | ### 2.1 Immutable Rollup SMT State Schema & Exact Conservation Law With `AssignedObligations (A)` (`R8-C02`, `R8-H01`) | |
| 44 | 45 | ||
| 45 | 46 | The canonical `zBTC` ledger state $R_h$ is a 256-bit Sparse Merkle Tree (`SHA-256` / Poseidon2) maintained deterministically by $\mathcal{F}$ over Bitcoin L1 blocks (`spec/02 §3`): | |
| @@ -47,70 +48,93 @@ | |||
| 47 | 48 | | SMT Namespace | Key | Value Fields | Invariants | | |
| 48 | 49 | |---|---|---|---| | |
| 49 | - | | `Accounts` | `acctId (u32)` | `{ pubkey: bytes32 (BIP-340), balanceSats: u64, nonce: u32 }` | `balanceSats >= 0`; `nonce` strictly monotonic (`+1`/tx). | | |
| 50 | - | | `Vaults` | `vaultId (bytes32)` | `{ denomSats: u64 ∈ {50_000_000, 25_000_000}, status: UNASSIGNED \| ASSIGNED(opId, lane, round) \| REIMBURSED \| SLASHED_EQUIV }` | Total active vaults always back `Circ + PendingExits + ReimbursementCredit` 1:1. | | |
| 51 | - | | `PendingExits` | `exitId (bytes32)` | `{ acctId, grossSats, maxOpFeeSats, destScriptPubKey, cancelPubKey, exitSlotOutpoint(36B), status: OPEN \| COMPLETED \| CANCELLED }` | Created ONLY by burning `grossSats` from `Accounts[acctId]` via `0x02` or L1 `0x01`. | | |
| 52 | - | | `RollupLocks` | `lockId (bytes32)` | `{ senderAcctId, destAcctId, amountSats, expiryBtcHeight, lockType: HTLC \| PTLC, lockDigest(33B) }` | First-class rollup opcodes (`RollupHTLC`, `RollupPTLC`) for atomic swaps inside the SMT. | | |
| 53 | - | | `OperatorState` | `opId (u32)` | `{ active: bool, lanes: [L], suspended: bool }` | Auto-suspended if `B_zbtc < 0.60 BTC`/lane. | | |
| 54 | - | | `ReimbursementCredit` | `opId (u32)` | `creditSats: u64` | Incremented ONLY on `K`-deep verified `ExitSlotUTXO` payout (`vout[0]`); deterministically consumed FIFO inside $\mathcal{F}$ to assign the oldest eligible `UNASSIGNED` vault (re-credited only on explicit `O_j`-signed `0x07 RELEASE_ASSIGNMENT`). | | |
| 55 | - | | `LockedOperatorCollateral` (`B_zbtc`) | `(opId, lane)` | `collateralSats: u64` (**`60,000,000` sats = `0.60 BTC`/lane floor**) | Partitioned: `0.50 BTC` max-vault restitution + `0.05 BTC` equivocation bounty + `0.05 BTC` `ExitSlotUTXO` grief buffer. | | |
| 50 | + | | `Accounts` (`C`) | `acctId (u32)` | `{ pubkey: bytes32 (BIP-340), balanceSats: u64, nonce: u32, leafDepositSats: u64 }` | `balanceSats >= 0`; `nonce` strictly monotonic (`+1`/tx); brand-new leaf locks refundable `500`-sat `leafDepositSats` (`R8-M01`, counted in `C`). | | |
| 51 | + | | `Vaults` (`V`) | `vaultId (bytes32)` | `{ outpoint(36B), denomSats: u64 ∈ {50_000_000, 25_000_000}, opBitmask: u64, status: UNASSIGNED \| ASSIGNED(opId, lane, round) \| REIMBURSED \| SLASHED_EQUIV }` | Partitioned into $V_{\text{unassigned}}$ and $V_{\text{assigned}}$; satisfies exact $2^M$ Hall's Marriage Invariant (`spec/01 §6.2`). | | |
| 52 | + | | `PendingExits` (`E`) | `exitId (bytes32)` | `{ acctId, grossSats >= max(dust, 100_000), maxOpFeeSats, createdBtcHeight, destScriptPubKey, cancelPubKey, exitSlotOutpoint(36B), status: OPEN \| COMPLETED \| CANCELLED }` | Created ONLY by burning `grossSats` from `Accounts[acctId]` via `0x02` or L1 `0x01`; `MIN_EXIT_SATS = 100,000` sats (`0.001 BTC`, `R8-M05`). | | |
| 53 | + | | `RollupLocks` (`L`) | `lockId (bytes32)` | `{ senderAcctId, destAcctId, amountSats, expiryBtcHeight, lockType: HTLC \| PTLC, lockDigest(33B) }` | First-class rollup opcodes (`RollupHTLC`, `RollupPTLC`) serialized in `0x02 BATCH_DA` (`R8-C05`). | | |
| 54 | + | | `OperatorState` | `opId (u32)` | `{ active: bool, lanes: [L], remainingRounds: u32, suspended: bool }` | Auto-suspended & excluded from all new `ExitSlotUTXO`s if `B_grief < 0.05 BTC` or `B_custody < 0.55 BTC`. | | |
| 55 | + | | `ReimbursementCredit` (`R`) | `opId (u32)` | `{ creditSats: u64, oldestBackedExitHeight: u32 }` | Incremented ONLY on `K`-deep verified `ExitSlotUTXO` payout (`vout[0]`); supports signed `TransferCredit(from_op, to_op, amt)` (`R8-M04`) and oldest-`PendingExit` priority (`R8-N01`). | | |
| 56 | + | | `AssignedObligations` (`A`) | `vaultId (bytes32)` | `{ opId: u32, lane: u8, round: u16, denomSats: u64, assignedHeight: u32 }` | **Explicitly tracks pending `TakeTx` claims across the `T_take = 1,728`-block gap (`R8-C02`)!** Created atomically on FIFO assignment (`R -> A`), destroyed on `TakeTx` confirmation (`V_assigned, A -> 0`) or `0x07` release (`A -> R`). | | |
| 57 | + | | `LockedOperatorCollateral` (`B`) | `(opId, lane)` | `{ bCustodySats: u64 (floor 55_000_000), bGriefSats: u64 (floor 5_000_000) }` | **Hard-partitioned (`R8-H01`, `R8-N05`):** `bCustodySats` (`0.55 BTC`) NEVER debited by `ExitSlotUTXO` griefing; `bGriefSats` (`0.05 BTC`) exclusively absorbs grief penalties. Total `B_zbtc = 0.60 BTC`/lane. | | |
| 56 | 58 | ||
| 57 | - | **Global Solvency Conservation Invariant (Checked on Every State Transition $R_{h-1} \to R_h$):** | |
| 58 | - | $$\sum_{v \in \text{Unassigned} \cup \text{Assigned}} D_v \;=\; \sum_{a \in \text{Accounts}} \text{balance}_a \;+\; \sum_{\ell \in \text{RollupLocks}} \text{amt}_\ell \;+\; \sum_{e \in \text{PendingExits}_{\text{OPEN}}} \text{gross}_e \;+\; \sum_{o} \text{ReimbursementCredit}_o \;+\; \sum_{o,l} B_{\text{zbtc}}(o,l)$$ | |
| 59 | + | **Amended Global Solvency Conservation Invariant (`R8-C02` Closed — Checked on EVERY State Transition $R_{h-1} \to R_h$):** | |
| 60 | + | $$\underbrace{\sum_{v \in \text{Unassigned}} D_v}_{V_{\text{unassigned}}} \;+\; \underbrace{\sum_{v \in \text{Assigned}} D_v}_{V_{\text{assigned}}} \;=\; \underbrace{\sum_{a \in \text{Accounts}} (\text{bal}_a + \text{dep}_a)}_{C} \;+\; \underbrace{\sum_{\ell \in \text{Locks}} \text{amt}_\ell}_{L} \;+\; \underbrace{\sum_{e \in \text{Exits}_{\text{OPEN}}} \text{gross}_e}_{E} \;+\; \underbrace{\sum_{o} \text{Credit}_o}_{R} \;+\; \underbrace{\sum_{v \in \text{Assigned}} \text{Obl}_v}_{A} \;+\; \underbrace{\sum_{o,l} (B_{\text{custody}} + B_{\text{grief}})}_{B}$$ | |
| 59 | 61 | ||
| 60 | - | ### 2.2 Honest Feeless Zenon Sequencer Rails (`M-9`, `M-10`) | |
| 62 | + | **Exact Atomic Conservation Matrix Across Every Lifecycle Transition:** | |
| 61 | 63 | ||
| 64 | + | | Transition | $\Delta V_{\text{unassigned}}$ | $\Delta V_{\text{assigned}}$ | $\Delta C$ | $\Delta E$ | $\Delta R$ | $\Delta A$ | $\Delta B$ | Net $\Delta(\text{LHS} - \text{RHS})$ | | |
| 65 | + | |---|---:|---:|---:|---:|---:|---:|---:|---:| | |
| 66 | + | | `deposit` (`0x00`) | $+D$ | $0$ | $+D$ | $0$ | $0$ | $0$ | $0$ | **`0`** | | |
| 67 | + | | `forced_exit` (`0x01`) / `0x02` exit | $0$ | $0$ | $-g$ | $+g$ | $0$ | $0$ | $0$ | **`0`** | | |
| 68 | + | | `front_paid` (`ExitSlotUTXO` valid) | $0$ | $0$ | $0$ | $-g$ | $+g$ | $0$ | $0$ | **`0`** | | |
| 69 | + | | `front_grief` (`k`-burst pro-rata `p <= B_grief`) | $0$ | $0$ | $+g + p$ | $-g$ | $0$ | $0$ | $-p$ (`B_grief` only!) | **`0`** | | |
| 70 | + | | `exit_cancel` (Leaf `2M_active`) | $0$ | $0$ | $+g$ | $-g$ | $0$ | $0$ | $0$ | **`0`** | | |
| 71 | + | | `fifo_assign` (oldest tightest-slack vault $v$) | $-D_v$ | $+D_v$ | $0$ | $0$ | $-D_v$ | $+D_v$ | $0$ | **`0`** | | |
| 72 | + | | `take_confirmed` (after `T_take = 1,728` blks) | $0$ | $-D_v$ | $0$ | $0$ | $0$ | $-D_v$ | $0$ | **`0`** | | |
| 73 | + | | `release_assignment` (`0x07`, signed by $O_j$) | $+D_v$ | $-D_v$ | $0$ | $0$ | $+D_v$ | $-D_v$ | $0$ | **`0`** | | |
| 74 | + | | `disprove_dual_slash` (`Stake_r + VaultConnector_r`) | $+D_v$ (if assigned) | $-D_v$ (if assigned) | $+0.55$ (insurance) | $0$ | $+D_v$ (if assigned) | $-D_v$ (if assigned) | $-0.55$ (`B_custody`) | **`0`** | | |
| 75 | + | | `lamport_equivocation_slash` (unassigned $v$ stolen) | $-D_v$ | $0$ | $+0.05$ (bounty) | $0$ | $0$ | $0$ | $-(D_v + 0.05)$ (`B_custody`) | **`0`** | | |
| 76 | + | | `lamport_equivocation_slash` (assigned to innocent $O_k$!) | $0$ | $-D_v$ | $+0.05$ (bounty) | $0$ | $+D_v$ ($O_k$ whole!) | $-D_v$ | $-(D_v + 0.05)$ (`B_custody`) | **`0`** | | |
| 77 | + | | `transfer_credit` (`O_a -> O_b`, `R8-M04`) | $0$ | $0$ | $0$ | $0$ | $0$ ($-x/+x$) | $0$ | $0$ | **`0`** | | |
| 78 | + | | `retire` (`RetireStakeTx_r` + Hall OK + $A[O_j]=0$) | $0$ | $0$ | $+B_j + R_j$ | $0$ | $-R_j$ | $0$ | $-B_j$ | **`0`** | | |
| 79 | + | ||
| 80 | + | ### 2.2 Honest L1-Subsidized Feeless Zenon Sequencer Rails & Two-Column Throughput Table (`M-9`, `M-10`, `R8-M01`, `R8-M08`) | |
| 81 | + | ||
| 62 | 82 | - **Exact Zenon Transport Format (NOT Native `TokenContract` ZTS):** | |
| 63 | - | - Because `TokenContract` ZTS transfers depend on Zenon L1 consensus (which fails at 49% — `spec/04 §1`), Stage 1A `zBTC` balances live strictly in the Rollup SMT above, **NOT** in `go-zenon`'s `TokenContract`. | |
| 64 | - | - Users transmit signed `110 B` rollup transactions (`op(1) || domain(1) || fromAcctId(4) || toAcctId(4) || amountSats(8) || nonce(4) || batchTipSats(4) || expiryBtcHeight(4) || memoTag(16) || bip340Sig(64)` = **`110 B`**; `+32 B = 142 B` when creating a new recipient pubkey) inside standard Zenon `AccountBlock.Data` (`UserSend` to a canonical burn/sequencer sink address with `Amount = 0`). | |
| 83 | + | - Stage 1A `zBTC` balances live strictly in the Bitcoin-canonical Rollup SMT, **NOT** in `go-zenon`'s `TokenContract`. | |
| 84 | + | - Users transmit signed `110 B` rollup transactions (`op(1) || domain(1) || fromAcctId(4) || toAcctId(4) || amountSats(8) || nonce(4) || batchTipSats(4) || expiryBtcHeight(4) || memoTag(16) || bip340Sig(64)` = **`110 B`**; `+32 B = 142 B` for new recipient pubkey) inside standard Zenon `AccountBlock.Data` (`UserSend` to canonical sequencer sink with `Amount = 0`). | |
| 65 | 85 | - **Exact Zenon Plasma Cost (At Floor Price `1,000`):** | |
| 66 | 86 | $$\text{BasePlasma}(\text{110 B rollup tx}) = 21{,}000 + 68 \times 110 = \mathbf{28{,}480\text{ Plasma}}$$ | |
| 67 | - | - Funded by **`14 QSR` refundable fused Plasma** (`ceil(28,480 / 2,100) = 14 QSR`, zero burn, replenished immediately upon confirmation) OR **`42.72M` SHA3-256 PoW hashes** (`28,480 × 1,500`, `~0.15–0.4s` desktop / `~3–12s` mobile WASM). | |
| 68 | - | - **Bitcoin L1 Fee Paid by User on Zenon Transfer:** **`0` satoshis** (`0` burned ZNN/QSR; optional `batchTipSats` for fast L1 `0x02` batch inclusion). | |
| 69 | - | - **Honest `go-zenon` Throughput Ceilings (Bounded by `8 MiB` Wire Cap):** | |
| 70 | - | - Observed mainnet Momentum time is **`~11.4s`** (`origin/dev:vm/embedded/definition/spork.go:43-46`). | |
| 71 | - | - Standard 2-block Zenon transfers (`21,000` send + `21,000` receive = `42,000` Plasma): **`~4.4` tx/s** at the pinned `2,100,000` floor, **`~8.8` tx/s** at the `4,200,000` default. | |
| 72 | - | - 1-block `110 B` `AccountBlock.Data` rollup sends (`28,480` Plasma, zero receive block needed): **`~6.5` tx/s** at `2.1M` floor, **`~12.9` tx/s** at `4.2M` default. | |
| 73 | - | - **Real Hard Protocol Ceiling (`MaxMomentumContentBytes = 8 MiB`):** `origin/dev:verifier/momentum.go:93` hard-caps cumulative protobuf-serialized Momentum content at **`8,388,608 B` (`8 MiB`)** and `origin/dev:protocol/protocol.go:70` caps `MaxDetailedMomentumWireSize = 10 MiB - 2 MiB - 4 KiB` (`~8.38 MB`). At `~300–350 B` serialized per account block, a Momentum holds `~24,000–27,000` blocks **maximum** — yielding **`~1,050–1,200` full 2-block transfers/s** (or `~2,100–2,400` 1-block rollup sends/s), **NOT** the naive `4,386` tx/s implied by `2.1B / 42,000 / 11.4`! | |
| 74 | - | - **Graceful Degradation Under Dynamic Plasma DoS:** Because `origin/dev:dp/dp.go:102-151` has no absolute upper price clamp, a whale QSR attack can temporarily spike Zenon Plasma prices (`spec/05 §2.2`). Under such an attack, feeless Zenon soft preconfirmations degrade cleanly to **Bitcoin L1 `0x03 FORCED_TRANSFER` and `0x01 FORCED_EXIT`** (paying standard Bitcoin L1 miner fees, completely bypassing Zenon!). | |
| 87 | + | - Funded by **`14 QSR` refundable fused Plasma** (`ceil(28,480 / 2,100) = 14 QSR`, zero burn, replenished upon confirmation) OR **`42.72M` SHA3-256 PoW hashes**. | |
| 88 | + | - **Honest Fee Framing (`R8-M01`):** Stage 1A transfers on Zenon are **L1-subsidized soft preconfirmations (`0` sat direct user BTC fee for existing accounts)** — NOT unbounded zero-cost Bitcoin L1 DA. To defeat zero-cost `0x02` DA flooding via refundable QSR (`8.8 tx/s` spraying 1-sat dust to fresh addresses = `~3.80 BTC/day` @ `50 sat/vB`), **creating a brand-new SMT account leaf locks a refundable `500`-sat `zBTC` `leafDepositSats`** (reclaimed when the account sweeps to `0` and closes) AND `0x02` batches enforce a hard **`<= 1,000` new SMT leaves per 6-block batch epoch** cap (`<= 48 KB` witness ≈ `12 kvB`/hour max new-leaf DA!). | |
| 89 | + | - **Two-Column Throughput Reality Table (`R8-M08` Reconciled — Zenon Transport vs Bitcoin L1 `0x02` Physical DA Cap):** | |
| 90 | + | Observed Zenon Momentum cadence is **`~11.4s`** (`origin/dev:vm/embedded/definition/spork.go:43-46`), explaining the exact rates below (note: `2.1M / 28,480 / 10s = 7.37 tx/s` assumes idealized `10s` blocks rather than observed `11.4s`): | |
| 75 | 91 | ||
| 76 | - | ### 2.3 Permissionless DA Batcher Economics | |
| 92 | + | | Regime / Bottleneck | Zenon Soft-Preconfirmation Transport (`~11.4s`/Mom) | **Bitcoin L1 `0x02` Physical Mutated-Leaf DA Ceiling** (`600s`/blk, `4 MWU` = `1M vB`/blk) | | |
| 93 | + | |---|---|---| | |
| 94 | + | | **Pinned Floor (`2,100,000` Plasma/Mom)** | `4.4` 2-blk tx/s (`42,000` Plasma) / **`6.5` 1-blk rollup sends/s** (`28,480` Plasma; `7.37` at nominal `10s`) | **Blended `40 B` (`10 vB`) leaf:** `166.7 leaves/s` @ **100%** of all Bitcoin blockspace (**`1.67 leaves/s` @ 1%**) | | |
| 95 | + | | **Default Dynamic Plasma (`4,200,000`/Mom)** | `8.8` 2-blk tx/s / **`12.9` 1-blk rollup sends/s** (`14.75` at nominal `10s`) | **Existing `16 B` (`4 vB`) leaf:** `416.7 leaves/s` @ 100% of Bitcoin (**`4.17 leaves/s` @ 1%**) | | |
| 96 | + | | **Hard `go-zenon` `8 MiB` Wire Ceiling** (`MaxMomentumContentBytes = 8 MiB`, `MaxDetailedMomentumWireSize = 8.38 MB`) | **`1,050–1,200` 2-blk tx/s** (`~2,100–2,400` 1-blk sends/s; *NOT `4,386` tx/s!*) | **New `48 B` (`12 vB`) leaf:** `138.9 leaves/s` @ 100% of Bitcoin (**`1.39 leaves/s` @ 1%**, further capped to `<= 1,000` new leaves/6-blk epoch = `~0.28 new leaves/s`!) | | |
| 77 | 97 | ||
| 78 | - | - **Zero Trusted Sequencer or Protocol Treasury:** Anyone (an operator, a wallet provider, or a user) can read `AccountBlock.Data` rollup txs from Zenon, generate `π_batch`, and post `0x02 BATCH_DA` onto Bitcoin L1 with complete mutated SMT leaves (`16 B` existing / `48 B` new). | |
| 79 | - | - **Sustainable Incentives:** Batchers earn optional `batchTipSats` from rollup transfers, operator fronting fee spreads (since fronting operators need timely `0x02` batching to settle `PendingExits`), or self-sponsored batching by users/merchants. A batch of `500` transfers updating `~600` existing accounts requires `~9.6 KB` witness (`~2.4 kvB` vbytes) + `~0.1–10 kvB` proof = `~2.5–12.4 kvB` (`~0.0005–0.0025 BTC` at `20 sat/vB`, or `~100–500` sats amortized per transfer!). | |
| 98 | + | *Key takeaway (`R8-M08`):* High Zenon transport TPS (`> 10 tx/s`) translates to L1-anchored settlement ONLY to the extent transfers **net across repeated accounts** within each 6-block batch (`0x02` publishes net post-batch leaf states, not individual transactions); distinct mutated accounts per second are strictly physically bounded by Bitcoin L1 blockspace! | |
| 99 | + | - **Graceful Degradation Under Dynamic Plasma DoS:** Under a QSR whale Dynamic Plasma spike (`spec/05 §2.2`), feeless Zenon soft preconfirmations degrade cleanly to **Bitcoin L1 `0x03 FORCED_TRANSFER` and `0x01 FORCED_EXIT`**, completely bypassing Zenon! | |
| 80 | 100 | ||
| 81 | - | ### 2.4 `B_zbtc` Accounting, `ExitSlotUTXO` Spend-or-Refund & Dual-Input Slash Split | |
| 101 | + | ### 2.3 Slotted Permissionless DA Batcher Economics (`R8-M01`, `R8-M02`) | |
| 82 | 102 | ||
| 83 | - | 1. **Per-Lane `B_zbtc` Collateral (`0.60 BTC` = `60,000,000` sats):** | |
| 84 | - | - `0.50 BTC` (`maxVaultDenom`) reserved for 1:1 vault restitution if $O_j$ executes a Lamport equivocation on `TakeTx` after `T_take = 1,152`. | |
| 85 | - | - `0.05 BTC` equivocation bounty paid to the challenger who broadcasts `BurnBondTx_{r,k}` before `T_cooldown = 1,296` (on top of burning `100%` of $O_j$'s `2.00 BTC` L1 `Bond_BTC` to `OP_RETURN`). | |
| 86 | - | - `0.05 BTC` `ExitSlotUTXO` grief buffer (handles up to `5` consecutive non-paying grief attempts before hitting the `0.55 BTC` custody floor, with immediate auto-suspension on the first grief!). | |
| 87 | - | 2. **`ExitSlotUTXO` Universal Spend-or-Refund Rule (Zero Frozen Exits):** | |
| 88 | - | - Created by `0x01 FORCED_EXIT` with **`2M + 1` Tapscript leaves** (zero anonymous `OP_TRUE` leaves!): | |
| 89 | - | - Leaves `0..M-1`: Priority slot per registered operator $O_j$ (staggered `<6*j> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIG`). | |
| 90 | - | - Leaves `M..2M-1`: Open-race leaves for all registered operators (`<6*M> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIG`). | |
| 91 | - | - Leaf `2M` (`EXIT_CANCEL`): `<288> OP_CSV OP_DROP <cancelPubKey_user> OP_CHECKSIG`. | |
| 92 | - | - On **ANY `K`-deep spend** of `ExitSlotUTXO`: | |
| 93 | - | - **Valid Fronting (Leaf `0..2M-1` AND `vout[0]` pays `destScriptPubKey` `>= grossSats - maxOpFeeSats`):** Transition `PendingExits[exitId] -> COMPLETED`, credit `ReimbursementCredit[O_j] += grossSats`. | |
| 94 | - | - **Non-Paying Grief Spend (Leaf `0..2M-1` AND `vout[0]` FAILS payment check):** Atomically transition `PendingExits[exitId] -> CANCELLED`, refund full `grossSats` `zBTC` to `Accounts[acctId]`, **slash `0.01 BTC` (`1,000,000` sats) from $O_j$'s `B_zbtc` grief buffer (credited to the victim's `zBTC` balance to cover L1 retry fees)**, and **auto-suspend $O_j$** from fronting until $O_j$ tops `B_zbtc` back up to `>= 0.60 BTC`/lane! | |
| 95 | - | - **User Cancel (Leaf `2M` after `288` blocks):** Atomically transition `PendingExits[exitId] -> CANCELLED` and refund full `grossSats` `zBTC` to `Accounts[acctId]`. | |
| 96 | - | 3. **Dual-Input `Stake_r` Slash (Positive EV Even Against `6-of-7` Verifier Collusion):** | |
| 97 | - | - When `DisproveTx_{r,i}` or `TimeoutSlashTx_{r,i}` spends **BOTH `Stake_r` (`vin[0]`) AND `VaultConnector_r` (`vin[1]`)** before `T_take = 1,152`: | |
| 98 | - | - **`0` sats** are stolen from `U_d`; `Vaults[vaultId]` immediately returns to `UNASSIGNED`. | |
| 99 | - | - L1 `Stake_r` (`2.00 BTC`) splits **`0.15 BTC` → winning verifier $V_i$** and **`1.85 BTC` → `OP_RETURN` burn**. | |
| 100 | - | - Inside $\mathcal{F}$, $O_j$'s entire **`0.55 BTC` custody slice of `B_zbtc`** (`0.50 + 0.05`, untouched because `0` sats were stolen!) is **atomically split equally across all remaining `k <= 6` verifiers** who posted `0x04 CHALLENGE_CLAIM` in `[0, 144]`: each receives **`>= 0.55 / 6 = 0.09166666 BTC > 0.075 BTC`** (`15 kvB` verifier fee @ `500 sat/vB`) + `100%` of their `F_chal = 0.40 BTC` returned from `ChalEscrow_{r,j}`, guaranteeing **`>= +0.0167 BTC` positive EV** for every honest verifier even if `6 of 7` verifiers collude with $O_j$ (while attacker P&L is **`-2.55 BTC`** solo and **`-2.40` to `-1.9417 BTC`** with `1..6` colluding verifiers — strictly `-1.94` to `-2.55 BTC`!). | |
| 103 | + | - **Deterministic Slotted Batcher Priority (`R8-M02` Closed):** To prevent competing permissionless batchers from burning L1 fees on stale-root `0x02` collisions in the same block, registered batchers (zero custody power; permissionless registration via `0x03`) follow deterministic slot priority **`primary_batcher = H(header[h-1].hash) mod K_batchers`** for blocks `[prevBatchHeight + 6, prevBatchHeight + 7]`; from `prevBatchHeight + 8` onward, **any** batcher may post `0x02` permissionlessly. | |
| 104 | + | - **Sustainable Incentives:** Batchers earn optional `batchTipSats`, operator fronting fee spreads, and merchant/wallet sponsorship. A batch updating `600` existing accounts requires `9.6 KB` witness (`2.4 kvB`) + `~0.1–10 kvB` proof = `~2.5–12.4 kvB` (`~0.0005–0.0025 BTC` at `20 sat/vB`). | |
| 101 | 105 | ||
| 106 | + | ### 2.4 Hard-Partitioned `B_zbtc`, Cyclic `ExitSlotUTXO`, Oldest-Exit Priority & `TransferCredit` (`R8-H01`, `R8-H02`, `R8-N01`, `R8-N05`, `R8-M03`, `R8-M04`, `R8-M05`) | |
| 107 | + | ||
| 108 | + | 1. **Hard-Partitioned Per-Lane `B_zbtc` (`0.60 BTC` = `60,000,000` sats):** | |
| 109 | + | - **`B_custody = 0.55 BTC` (`55,000,000` sats):** Reserved strictly for `0.50 BTC` max-vault Lamport equivocation restitution + `0.05 BTC` equivocation bounty (or protocol insurance slash on dual-input `DisproveTx`). **NEVER debited by `ExitSlotUTXO` griefing!** | |
| 110 | + | - **`B_grief = 0.05 BTC` (`5,000,000` sats):** Exclusively absorbs `ExitSlotUTXO` non-paying grief penalties (`min(0.01 BTC, floor(B_grief / k_burst))` pro-rata per grieved exit in a block), guaranteeing zero `B_custody` overflow even under `k = 20` concurrent single-block griefs! | |
| 111 | + | 2. **Active-Operator `(2M_active + 1)`-Leaf `ExitSlotUTXO` With Collision-Free Cyclic Priority (`R8-M03`, `R8-H01`):** | |
| 112 | + | - Created by `0x01 FORCED_EXIT` (`grossSats >= max(dust(destScriptPubKey), MIN_EXIT_SATS = 100,000)` sats, `R8-M05`) using ONLY active non-suspended operators `M_active` from `R_{h-1}`: | |
| 113 | + | - **Leaves `0..M_active-1`:** `<6*r> OP_CSV OP_DROP <P_{O_{k_r}}> OP_CHECKSIG` where **`k_r = (H(exitId) + r) mod M_active`** (`0%` repeat across `r = 0..M_active - 1`, matching `spec/01 §5` identically!). | |
| 114 | + | - **Leaves `M_active..2M_active-1`:** Open-race leaves `<6*M_active> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIG`. | |
| 115 | + | - **Leaf `2M_active` (`EXIT_CANCEL`):** `<288> OP_CSV OP_DROP <cancelPubKey_user> OP_CHECKSIG`. | |
| 116 | + | - On **ANY `K`-deep spend** of `ExitSlotUTXO` (detected via full stripped-`vin` scan even without `0x05` tag, `R8-C05`!): | |
| 117 | + | - **Valid Fronting (`vout[0]` pays `destScriptPubKey` `>= grossSats - maxOpFeeSats`):** `PendingExits[exitId] -> COMPLETED`, `ReimbursementCredit[O_j] += grossSats`. | |
| 118 | + | - **Non-Paying Grief Spend (`vout[0]` fails payment check):** Atomically `PendingExits[exitId] -> CANCELLED`, refund `100%` of `grossSats` `zBTC` to victim (`E -> C`), distribute `min(0.01 BTC, floor(B_grief[O_j] / k_burst))` strictly from `B_grief` to each victim in that block, auto-suspend `O_j`, and exclude `O_j` from all future `ExitSlotUTXO` trees! | |
| 119 | + | - **User Cancel (Leaf `2M_active` after `288` blocks):** `PendingExits[exitId] -> CANCELLED`, refund `grossSats` `zBTC` to `Accounts[acctId]` (restores `zBTC`, NOT native BTC). | |
| 120 | + | 3. **Oldest-`PendingExit` Credit Priority & `TransferCredit` (`R8-N01`, `R8-M04`):** | |
| 121 | + | - **Anti-Self-Fronting Priority (`R8-N01`):** Whenever open retail `PendingExits` older than `6` blocks exist in the queue, deterministic FIFO vault assignment strictly prioritizes `ReimbursementCredit` earned from fronting the **oldest `createdBtcHeight`** exits ahead of fresh self-fronted exits — stopping operators from pausing par retail fronting to jump the bank-run queue via discounted self-exits! Wallets may additionally specify an optional Dutch-auction `f_op` curve via `0x06` for transparent fee discovery. | |
| 122 | + | - **Residual Credit Consolidation (`R8-M04`):** Operators holding `< 0.25 BTC` fractional `ReimbursementCredit` residuals may execute a signed **`TransferCredit(from_op, to_op, amt)`** (via `0x02` or `0x03`, conserving `sum(R)` identically) to merge residuals into a `>= 0.25 BTC` vault claim, or convert remaining `R[op]` into `Accounts[op]` (`R -> C`) upon clean retirement (`RetireStakeTx_r`). | |
| 123 | + | 4. **Native-L1 Dual-Input `Stake_r` Slash (`R8-H02`, `R8-N05`):** | |
| 124 | + | - On `DisproveTx_{r,i}` / `TimeoutSlashTx_{r,i}` spending `Stake_r` + `VaultConnector_r` before `T_take = 1,728`, **`0` sats** leave `U_d` (if `U_d` was `ASSIGNED`, `V_assigned -> V_unassigned` and `A[U_d] -> R[O_j]`). Every active honest verifier collects **`0.15 BTC` in native Bitcoin L1 BTC** directly from `Stake_r` (`vout[0]` immediate winner, `vout[1..6]` `ChalPayoutEscrow` via `ChalProofConnector`, `>= 0.95 BTC` immediate `OP_RETURN` burn), delivering **`+0.0645 BTC` net EV @ `500 sat/vB`** (`+0.0232 BTC` @ `750 sat/vB`) completely immune to `zBTC` crisis discounts and `B_grief` depletion! On L2, `O_j`'s `0.55 BTC` `B_custody` is slashed to the protocol insurance account (`B -= 0.55, C += 0.55`, exact conservation). | |
| 125 | + | ||
| 102 | 126 | ### 2.5 End-to-End State Traces: Bob (`0.50 BTC`) & Mike (`0.25 BTC`) | |
| 103 | 127 | ||
| 104 | 128 | - **Bob's Partial Recovery (`1 BTC → spend 0.50 zBTC → recover 0.50 BTC` under `49%–100%` Zenon Compromise):** | |
| 105 | - | 1. Bob deposits `1.00 BTC` via `0x00 DEPOSIT` → creates deleted-key vaults `{0.50, 0.25, 0.25}` BTC; after `K = 14` blocks, `Accounts[Bob] = 1.00 zBTC`. | |
| 106 | - | 2. Bob sends `0.50 zBTC` to Carol via `110 B` `AccountBlock.Data` on Zenon (`28,480` Plasma, `0` sat BTC fee) → batcher anchors `0x02 BATCH_DA` → `Accounts[Bob] = 0.50 zBTC`, `Accounts[Carol] = 0.50 zBTC`. | |
| 129 | + | 1. Bob confirms `U_Bob_wallet`, consumes `1 × Ticket_050 + 2 × Ticket_025`, and deposits `1.00 BTC` via `0x00 DEPOSIT` → creates deleted-key vaults `{0.50, 0.25, 0.25}` BTC keyed by acyclic `vault_id`; at `K = 18` blocks, `Accounts[Bob] = 1.00 zBTC`. | |
| 130 | + | 2. Bob sends `0.50 zBTC` to Carol via `110 B` `AccountBlock.Data` on Zenon (`28,480` Plasma, `0` sat direct BTC fee) → slotted batcher anchors `0x02 BATCH_DA` → `Accounts[Bob] = 0.50 zBTC`, `Accounts[Carol] = 0.50 zBTC`. | |
| 107 | 131 | 3. **Attack:** `49%` (or `100%`) of Zenon Pillars turn hostile, split Zenon across its 30-Momentum cliff, censor Bob on Zenon, and spike Dynamic Plasma. | |
| 108 | - | 4. **Bob Exits Directly on Bitcoin L1:** Bob broadcasts `0x01 FORCED_EXIT(0.50 BTC, P_Bob, maxOpFee)` + `ExitSlotUTXO` on Bitcoin L1 (completely bypassing Zenon!). After `K = 14` blocks, $\mathcal{F}$ burns Bob's `0.50 zBTC` and opens `PendingExits[exit_Bob]`. | |
| 109 | - | 5. Any `1-of-M` honest operator $O_j$ (`M = 3–5`) spends `ExitSlotUTXO` paying `0.50 BTC - fee` directly to `P_Bob` in `vout[0]` (~10 min on L1!), earns `ReimbursementCredit[O_j] += 0.50 BTC`, and later reclaims one `0.50 BTC` vault via `BitVMX` `RoundTx_r` → `TakeTx` (monitored by `N = 7` verifiers). **Zero Zenon signers, zero federated signers, zero ZNN trust.** | |
| 132 | + | 4. **Bob Exits Directly on Bitcoin L1:** Bob broadcasts `0x01 FORCED_EXIT(0.50 BTC, P_Bob, maxOpFee)` + active-operator `ExitSlotUTXO` on Bitcoin L1 (completely bypassing Zenon!). At `K = 18` blocks, $\mathcal{F}$ moves `0.50 zBTC` from `C → E`. | |
| 133 | + | 5. Any `1-of-M` active honest operator $O_j$ (`M = 3–5`) spends `ExitSlotUTXO` paying `0.50 BTC - fee` directly to `P_Bob` in `vout[0]` (~10 min on L1!), moves `0.50` from `E → R[O_j]`, gets FIFO-assigned one `0.50 BTC` vault (`V_unassigned -> V_assigned`, `R[O_j] -> A[v]`), and after `T_take = 1,728` blks claims the vault via `TakeTx` (`V_assigned, A -> 0`, recycling `Ticket_050`). **Zero Zenon signers, zero federated signers, zero ZNN trust.** | |
| 110 | 134 | - **Mike's Cross-Depositor Exit (`Alice 1 + Bob 1 → Mike 2 → Mike recovers 0.25 BTC` with `0` Zenon Signer Cooperation):** | |
| 111 | - | 1. Alice deposits `1.00 BTC` (`{0.50, 0.25, 0.25}`) and Bob deposits `1.00 BTC` (`{0.50, 0.25, 0.25}`); both send `1.00 zBTC` feelessly to Mike on Zenon → `0x02 BATCH_DA` sets `Accounts[Mike] = 2.00 zBTC`. | |
| 135 | + | 1. Alice (`1.00 BTC`) and Bob (`1.00 BTC`) deposit into `{0.50, 0.25, 0.25}` vaults and send `1.00 zBTC` each feelessly to Mike on Zenon → `0x02 BATCH_DA` (or Mike's `0x03 FORCED_TRANSFER` fallback) sets `Accounts[Mike] = 2.00 zBTC`. | |
| 112 | 136 | 2. **Attack:** Zero Zenon signers cooperate; Alice and Bob are offline or hostile. | |
| 113 | - | 3. **Mike Exits `0.25 BTC` Directly on Bitcoin L1:** Mike posts `0x01 FORCED_EXIT(0.25 BTC, P_Mike, maxOpFee)` + `ExitSlotUTXO`. Any `1-of-M` honest operator $O_j$ fronts `0.25 BTC - fee` directly to `P_Mike` in `vout[0]` (leaving Mike `1.75 zBTC` intact in `Accounts[Mike]`), earns `ReimbursementCredit[O_j] += 0.25 BTC`, and reclaims one `0.25 BTC` vault from the unassigned pool (`0.50 + 0.25 + 0.25` maps `0.25 BTC` 1:1 with zero change bottleneck!). | |
| 114 | - | 4. *Irreducible Residual Boundary ([`spec/01 §1.2`](./01-bitcoin-taproot-vault-enforcement.md) Corollary 1B):* If **100% of all `M = 3–5` pre-registered operators** vanish simultaneously, Mike's exit stalls until an operator returns (zero theft; Mike can reclaim his `0.25 zBTC` via Leaf `2M` `EXIT_CANCEL` after `288` blocks). Under a `100%` bank run of `15 BTC` (`3.0` float + `12.0` vaults), full queue drain takes **`~65 days`** (`M = 5`, `0.556` vaults/d ≈ `0.185 BTC/d`) or **`~72 days`** (`M = 3` on `10 BTC`, `~43–47d` with `{0.50, 0.50}` vaults). | |
| 137 | + | 3. **Mike Exits `0.25 BTC` Directly on Bitcoin L1:** Mike posts `0x01 FORCED_EXIT(0.25 BTC, P_Mike, maxOpFee)` + `ExitSlotUTXO`. Any `1-of-M` active honest operator $O_j$ fronts `0.25 BTC - fee` directly to `P_Mike` in `vout[0]` (leaving Mike `1.75 zBTC` intact), earns `R[O_j] += 0.25 BTC`, and claims one `0.25 BTC` vault via `R -> A -> TakeTx` (recycling `Ticket_025`). | |
| 138 | + | 4. *Irreducible Residual Boundary (`spec/01 §1.2` Corollary 1B, `R8-C06`):* If **`0-of-M` operators remain permanently unavailable**, Mike's native BTC exit stalls permanently (`0` theft; Leaf `2M_active` `EXIT_CANCEL` after `288` blocks restores `0.25 zBTC` inside the rollup, **NOT** native BTC on L1). Under a `100%` bank run of `15 BTC` (`3.0` float + `12.0` vaults, `T_cooldown = 13.0d`), full queue drain takes **`~94–104 days`** (`M = 5`, `0.385` vaults/d ≈ `0.128 BTC/d`) or **`~101–104 days`** (`M = 3` on `10 BTC`; `~62–68d` with `{0.50, 0.50}` vaults). | |
| 115 | 139 | ||
| 116 | 140 | --- | |
| @@ -118,11 +142,11 @@ | |||
| 118 | 142 | ## 3. Stage 1B (Alternative Gate): `clArk` VTXO Coordination Rails | |
| 119 | 143 | ||
| 120 | - | If the project cannot commit `~12.8–18.8 BTC` of hard operator/verifier capital or requires a `3–6` month mainnet ship window using existing audited open-source stacks (`Second bark/barkd` or `Ark Labs arkd`), Stage 1B offers an explicit **non-federated, zero-soft-fork alternative** with **`2–5 BTC` active ASP liquidity** (`0` dead slashing bonds): | |
| 144 | + | If the project cannot commit `~14.75–21.25+ BTC` of hard operator/verifier capital or requires a `3–6` month mainnet ship window using existing audited open-source stacks (`Second bark/barkd` or `Ark Labs arkd`), Stage 1B offers an explicit **non-federated, zero-soft-fork alternative** with **`2–5 BTC` active ASP liquidity** (`0` dead slashing bonds): | |
| 121 | 145 | ||
| 122 | 146 | - **Zenon's Role:** Feeless off-chain coordination, round scheduling, VTXO intent indexing, and Stage 0 SPV verification — **0% Zenon consensus custody dependency**. | |
| 123 | 147 | - **Exact Trade-Offs (Mandatory Disclosure):** | |
| 124 | - | 1. **Post-Round `0-of-N` Unilateral Exit (Until Expiry):** Once Mike's `0.25 BTC` VTXO is confirmed in an L1 `clArk` round tree, Mike exits unilaterally on Bitcoin L1 with **zero ASP/signer cooperation** by broadcasting his pre-signed `log2(N)` branch (`6..10` txs for `N = 64..1,024` VTXOs, using TRUC v3 + ephemeral anchors). | |
| 125 | - | 2. **Pre-Round (`arkoor`) Sender+ASP Collusion Risk:** Instant feeless out-of-round transfers (`Alice -> Mike`) are vulnerable to `Alice + ASP` double-spend collusion until the next L1 round refreshes Mike into a new VTXO tree. | |
| 126 | - | 3. **Hard VTXO Expiry & Liquidity Lockup:** VTXOs expire (e.g., `14–30` days) back to the ASP sweep key, forcing Mike online to refresh or pay `log2(N)` L1 exit fees; ASP liquidity (`2–5 BTC`) is locked `100%` for each full expiry cycle, capping round turnover to `2–5 BTC`/cycle. | |
| 148 | + | 1. **Post-Round `0-of-N` Unilateral Exit (Until Expiry):** Once Mike's `0.25 BTC` VTXO is confirmed in an L1 `clArk` round tree, Mike exits unilaterally on Bitcoin L1 with **zero ASP/signer cooperation** by broadcasting his pre-signed `log2(N)` branch (`6..10` txs for `N = 64..1,024` VTXOs, using TRUC v3 + ephemeral anchors on Core `>= 29.0`). | |
| 149 | + | 2. **Pre-Round (`arkoor`) Sender+ASP Collusion Risk:** Instant feeless out-of-round transfers (`Alice -> Mike`) are vulnerable to `Alice + ASP` double-spend collusion until the next L1 round refreshes Mike into a new VTXO tree (wallets MUST visually separate trustless in-round VTXOs from `arkoor` balances!). | |
| 150 | + | 3. **Hard VTXO Expiry & Watchtower Requirement:** VTXOs expire (e.g., `30–60` days) back to the ASP sweep key, requiring automated watchtowers/online refreshes or `log2(N)` L1 exit fees; ASP liquidity (`2–5 BTC`) is locked `100%` for each full expiry cycle, capping round turnover to `2–5 BTC`/cycle. | |
| 127 | 151 | 4. **No Global Pooled `zBTC` Token:** `clArk` VTXOs are discrete UTXO trees, not a single global fungible `zBTC` balance sheet composable with Zenon DeFi — and `clArk` VTXOs do **not** migrate automatically into Stage 1A Rollup `zBTC` without on-chain L1 settlement. | |
| 128 | 152 | ||
Document Class: Normative Settlement, Rollup State Transition & Feeless Payment Specification (v2 / v3.1.0-rfc — Zero-Federation Phased Architecture; supersedes archived v1 v3.0.0-rfc and v0 v2.5.0-rfc)
Custody Posture: ZERO federated signers, ZERO ZNN governance/slashing custody coupling, ZERO federated multisig or embedded-contract pre-minting.
Consistency Checker: scripts/verify_spec_bounds.py
1. Stage 0: Erlang-Hardened Non-Custodial PTLC & HTLC Atomic Swaps (PtlcSpork, M-4, R8-H07)
Stage 0 launches with 0 BTC protocol custody (0–5 BTC voluntary LP capital), strictly honoring zenon-developer-commons (essays/Verify Bitcoin, Don't Bridge It.md). Native BTC stays in user self-custody on Bitcoin L1 or Lightning; Zenon swaps native ZNN/QSR/ZTS assets atomically via PtlcContract and HtlcContract.
Stage 0 Scope & Conditional Atomicity Honesty (
R8-H07): Stage 0 atomic swaps do not create pooled, fungiblezBTCon Zenon. A counterparty LP is required for every swap, and under a severe Zenon attack rational LPs pull liquidity. Furthermore, cross-chain swap atomicity is explicitly conditional on bounded Bitcoin/Zenon block progress and timely automated refund broadcast — never unconditional against arbitrary unbounded chain stalls.
1.1 Erlang-Hardened BIP-327 Tweaked Taproot PTLC Swap (M-4, R8-H07 Closed)
Protocol (Alice sells BTC on Bitcoin L1; Bob sells Zenon asset on Zenon; Bob holds secret scalar $t \in \mathbb{Z}_n^*$):
- Setup: Bob sends compressed 33-byte point $T = \text{compress}(t \cdot G)$ to Alice.
- Bitcoin Taproot Funding (
>= 72-Block CSV): Compute $P_{\text{swap}} = \text{MuSig2_KeyAgg}(pk_A, pk_B)$, Tapscript refund leaf $L_{\text{ref}} = \text{<72> OP_CSV OP_DROP <pk_A> OP_CHECKSIG}$, tweak $t_{\text{tap}} = H_{\text{"TapTweak"}}(x(P_{\text{swap}}) \parallel \text{TapLeaf}(L_{\text{ref}}))$, and $Q_{\text{swap}} = P_{\text{swap}} + t_{\text{tap}} \cdot G$ with BIP-327 accumulated tweakt_accand parityg_key. Alice funds0x51 0x20 || x(Q_swap). Let $h_{\text{conf}}$ be Bitcoin confirmation height andnow_unixbe current UTC Unix seconds. - Absolute Unix Timestamp Lock & Erlang-Safe
>= 48hSlow-Block Margin (R8-H07):go-zenon'sPtlcContract.Createcomparesmomentum.Timestamp.Unix() >= param.ExpirationTime(origin/dev:vm/embedded/implementation/ptlc.go:326), requiring an absolute Unix timestamp (NEVER a relative duration!).- Under Poisson block arrivals at June 2021's worst daily slowdown (
2.3×nominal =1,380s/blk), an old30hlock sufferedP(T_72 > 30h | 2.3×) = 22.47%(~22.34%in R8's continuous approx) refund-race exposure (R8-H07). Thereforev3.1.0-rfcmandatesT_znn_sec >= 172,800seconds (48.0h,~15,158Momentums at observed11.4s/Momentum) andexpirationTime = now_unix + T_znn_sec. - Exact Erlang Tail Proof (
scripts/verify_spec_bounds.py): At2.3×slowdown (λ = 1/1,380blks/s), the 99.9th percentile of72blocks isp99.9(T_72) = 38.75h, leaving>= 9.25hwall-clock tail margin before48.0hand reducing tail exceedance toP(T_72 > 48h | 2.3×) < 10^{-6}(~9.5 × 10^{-8})! - Bob calls
PtlcContract.Create(expirationTime = now_unix + 172800, pointType = 2, pointLock = compress(T), destination = Alice_Addr)(origin/dev:vm/embedded/definition/ptlc.go:118-129).
- Mandatory Automated High-Fee RBF Refund Watchtower & Grief Disclosure:
- Alice sends BIP-327 adaptor partial signature $\tilde{s}_A$ within
<= 6Bitcoin blocks of Zenon PTLC confirmation ($R' = R_A + R_B + T$ with parity $g_R$, $\tilde{s} = \tilde{s}A + \tilde{s}B + e \cdot g{\text{key}} \cdot t{\text{acc}} \pmod n$). - Mandatory Watchtower Rule (
R8-H07): Alice MUST NOT rely on Bob voluntarily honoring ah_conf + 66cutoff. Alice's wallet/watchtower MUST automatically broadcast her<72> OP_CSVrefund transaction immediately at heighth_conf + 72with aggressive RBF fee-bumping (and direct-to-miner backup if mempools exceed200 sat/vB) so Bob cannot confirm a late claim near48h! - Explicit Grief Disclosure: Because
PtlcContracthas no early reclaim prior toExpirationTime, if Alice withholds $\tilde{s}_A$, Bob's Zenon funds remain grief-locked for the full48hduration (zero theft, pure time-lock grief). Production LPs bound this via small per-peer swap limits or reputation/Lightning Hold Invoices.
- Alice sends BIP-327 adaptor partial signature $\tilde{s}_A$ within
- Atomic Claim & Secret Extraction: Bob completes $s = \tilde{s} + g_R \cdot t \pmod n$ with a
<pk_B>CPFP anchor prior to Alice's block-72 watchtower refund. Alice extracts $t_{\text{ext}} = g_R \cdot (s - \tilde{s}) \bmod n$, checkscompress(t_ext * G) == PointLock, and callsPtlcContract.Unlock(ptlcId, t_ext)(origin/dev:vm/embedded/implementation/ptlc.go:82-97).
1.2 Erlang-Hardened HTLC & Lightning Submarine-Swap Gateway (R8-H07)
- Hash Type: ALL Bitcoin/Lightning HTLCs MUST use
hashType = 1(HashTypeSHA256,origin/dev:vm/embedded/definition/htlc.go:92). - Slowdown-Adjusted Erlang-Safe Unix-Second Delta (
R8-H07): At100%hashrate,36nominal blocks (6hmean) exceed6hwith probabilityP(T_36 > 6h | 1.0×) = 47.78%! Therefore, while Bitcoin/Lightning block delta remainsΔ_safety_blocks = 36, Zenon wall-clock safety delta MUST beΔ_safety_sec >= 86,400s(24.0h) — exceedingp99.9(T_36 | 2.3×) = 22.01hwithP(T_36 > 24h | 2.3×) < 0.0002(and< 10^{-20}at1.0×nominal!):- Inbound (
LN → Zenon): User pays Gateway's LN Hold Invoice FIRST; ONLY AFTER Hold Invoice reachesACCEPTEDwithremaining_cltv_blocks >= 72(2 × Δ_safety_blocks) does Gateway lock Zenon funds inHtlcContractwithexpirationTime_unix <= now_unix + (remaining_cltv_blocks - 36) * 600(ensuring>= 36Bitcoin blocks remain after Zenon expiry for Gateway's LN claim/cancel). Gateways MUST enforce<= 5concurrent pending hold invoices,<= 0.10 BTCexposure per peer, and a 5-minute cancel TTL. - Outbound (
Zenon → LN): User locks Zenon funds (hashType = 1,expirationTime_unix >= now_unix + 2 * 86,400 = now_unix + 172,800=48h); Gateway pays a BOLT-11 invoice whose CLTV expiry satisfiesnow_unix + (cltv_blocks * 600 * 2.3) <= expirationTime_unix - 86,400(leaving>= 24hErlang-safe wall-clock margin even under2.3×slowdown!), learns preimage $r$, and unlocks ZenonHtlcContract.
- Inbound (
2. Stage 1A: Sovereign Rollup STF $\mathcal{F}$ & L1-Subsidized Feeless Zenon Sequencer Rails
In Stage 1A, zBTC is a Bitcoin-Anchored Sovereign ZK Validity Rollup backed by right-sized BitVMX (n = 8, M = 3–5, N = 7) deleted-key vaults (spec/01). Zero federated signers and zero ZNN governance keys touch BTC custody or zBTC supply.
2.1 Immutable Rollup SMT State Schema & Exact Conservation Law With AssignedObligations (A) (R8-C02, R8-H01)
The canonical zBTC ledger state $R_h$ is a 256-bit Sparse Merkle Tree (SHA-256 / Poseidon2) maintained deterministically by $\mathcal{F}$ over Bitcoin L1 blocks (spec/02 §3):
| SMT Namespace | Key | Value Fields | Invariants |
|---|---|---|---|
Accounts (C) | acctId (u32) | { pubkey: bytes32 (BIP-340), balanceSats: u64, nonce: u32, leafDepositSats: u64 } | balanceSats >= 0; nonce strictly monotonic (+1/tx); brand-new leaf locks refundable 500-sat leafDepositSats (R8-M01, counted in C). |
Vaults (V) | vaultId (bytes32) | { outpoint(36B), denomSats: u64 ∈ {50_000_000, 25_000_000}, opBitmask: u64, status: UNASSIGNED | ASSIGNED(opId, lane, round) | REIMBURSED | SLASHED_EQUIV } | Partitioned into $V_{\text{unassigned}}$ and $V_{\text{assigned}}$; satisfies exact $2^M$ Hall's Marriage Invariant (spec/01 §6.2). |
PendingExits (E) | exitId (bytes32) | { acctId, grossSats >= max(dust, 100_000), maxOpFeeSats, createdBtcHeight, destScriptPubKey, cancelPubKey, exitSlotOutpoint(36B), status: OPEN | COMPLETED | CANCELLED } | Created ONLY by burning grossSats from Accounts[acctId] via 0x02 or L1 0x01; MIN_EXIT_SATS = 100,000 sats (0.001 BTC, R8-M05). |
RollupLocks (L) | lockId (bytes32) | { senderAcctId, destAcctId, amountSats, expiryBtcHeight, lockType: HTLC | PTLC, lockDigest(33B) } | First-class rollup opcodes (RollupHTLC, RollupPTLC) serialized in 0x02 BATCH_DA (R8-C05). |
OperatorState | opId (u32) | { active: bool, lanes: [L], remainingRounds: u32, suspended: bool } | Auto-suspended & excluded from all new ExitSlotUTXOs if B_grief < 0.05 BTC or B_custody < 0.55 BTC. |
ReimbursementCredit (R) | opId (u32) | { creditSats: u64, oldestBackedExitHeight: u32 } | Incremented ONLY on K-deep verified ExitSlotUTXO payout (vout[0]); supports signed TransferCredit(from_op, to_op, amt) (R8-M04) and oldest-PendingExit priority (R8-N01). |
AssignedObligations (A) | vaultId (bytes32) | { opId: u32, lane: u8, round: u16, denomSats: u64, assignedHeight: u32 } | Explicitly tracks pending TakeTx claims across the T_take = 1,728-block gap (R8-C02)! Created atomically on FIFO assignment (R -> A), destroyed on TakeTx confirmation (V_assigned, A -> 0) or 0x07 release (A -> R). |
LockedOperatorCollateral (B) | (opId, lane) | { bCustodySats: u64 (floor 55_000_000), bGriefSats: u64 (floor 5_000_000) } | Hard-partitioned (R8-H01, R8-N05): bCustodySats (0.55 BTC) NEVER debited by ExitSlotUTXO griefing; bGriefSats (0.05 BTC) exclusively absorbs grief penalties. Total B_zbtc = 0.60 BTC/lane. |
Amended Global Solvency Conservation Invariant (R8-C02 Closed — Checked on EVERY State Transition $R_{h-1} \to R_h$):
$$\underbrace{\sum_{v \in \text{Unassigned}} D_v}{V{\text{unassigned}}} ;+; \underbrace{\sum_{v \in \text{Assigned}} D_v}{V{\text{assigned}}} ;=; \underbrace{\sum_{a \in \text{Accounts}} (\text{bal}a + \text{dep}a)}{C} ;+; \underbrace{\sum{\ell \in \text{Locks}} \text{amt}\ell}{L} ;+; \underbrace{\sum_{e \in \text{Exits}{\text{OPEN}}} \text{gross}e}{E} ;+; \underbrace{\sum{o} \text{Credit}o}{R} ;+; \underbrace{\sum_{v \in \text{Assigned}} \text{Obl}v}{A} ;+; \underbrace{\sum_{o,l} (B_{\text{custody}} + B_{\text{grief}})}_{B}$$
Exact Atomic Conservation Matrix Across Every Lifecycle Transition:
| Transition | $\Delta V_{\text{unassigned}}$ | $\Delta V_{\text{assigned}}$ | $\Delta C$ | $\Delta E$ | $\Delta R$ | $\Delta A$ | $\Delta B$ | Net $\Delta(\text{LHS} - \text{RHS})$ |
|---|---|---|---|---|---|---|---|---|
deposit (0x00) | $+D$ | $0$ | $+D$ | $0$ | $0$ | $0$ | $0$ | 0 |
forced_exit (0x01) / 0x02 exit | $0$ | $0$ | $-g$ | $+g$ | $0$ | $0$ | $0$ | 0 |
front_paid (ExitSlotUTXO valid) | $0$ | $0$ | $0$ | $-g$ | $+g$ | $0$ | $0$ | 0 |
front_grief (k-burst pro-rata p <= B_grief) | $0$ | $0$ | $+g + p$ | $-g$ | $0$ | $0$ | $-p$ (B_grief only!) | 0 |
exit_cancel (Leaf 2M_active) | $0$ | $0$ | $+g$ | $-g$ | $0$ | $0$ | $0$ | 0 |
fifo_assign (oldest tightest-slack vault $v$) | $-D_v$ | $+D_v$ | $0$ | $0$ | $-D_v$ | $+D_v$ | $0$ | 0 |
take_confirmed (after T_take = 1,728 blks) | $0$ | $-D_v$ | $0$ | $0$ | $0$ | $-D_v$ | $0$ | 0 |
release_assignment (0x07, signed by $O_j$) | $+D_v$ | $-D_v$ | $0$ | $0$ | $+D_v$ | $-D_v$ | $0$ | 0 |
disprove_dual_slash (Stake_r + VaultConnector_r) | $+D_v$ (if assigned) | $-D_v$ (if assigned) | $+0.55$ (insurance) | $0$ | $+D_v$ (if assigned) | $-D_v$ (if assigned) | $-0.55$ (B_custody) | 0 |
lamport_equivocation_slash (unassigned $v$ stolen) | $-D_v$ | $0$ | $+0.05$ (bounty) | $0$ | $0$ | $0$ | $-(D_v + 0.05)$ (B_custody) | 0 |
lamport_equivocation_slash (assigned to innocent $O_k$!) | $0$ | $-D_v$ | $+0.05$ (bounty) | $0$ | $+D_v$ ($O_k$ whole!) | $-D_v$ | $-(D_v + 0.05)$ (B_custody) | 0 |
transfer_credit (O_a -> O_b, R8-M04) | $0$ | $0$ | $0$ | $0$ | $0$ ($-x/+x$) | $0$ | $0$ | 0 |
retire (RetireStakeTx_r + Hall OK + $A[O_j]=0$) | $0$ | $0$ | $+B_j + R_j$ | $0$ | $-R_j$ | $0$ | $-B_j$ | 0 |
2.2 Honest L1-Subsidized Feeless Zenon Sequencer Rails & Two-Column Throughput Table (M-9, M-10, R8-M01, R8-M08)
- Exact Zenon Transport Format (NOT Native
TokenContractZTS):- Stage 1A
zBTCbalances live strictly in the Bitcoin-canonical Rollup SMT, NOT ingo-zenon'sTokenContract. - Users transmit signed
110 Brollup transactions (op(1) || domain(1) || fromAcctId(4) || toAcctId(4) || amountSats(8) || nonce(4) || batchTipSats(4) || expiryBtcHeight(4) || memoTag(16) || bip340Sig(64)=110 B;+32 B = 142 Bfor new recipient pubkey) inside standard ZenonAccountBlock.Data(UserSendto canonical sequencer sink withAmount = 0). - Exact Zenon Plasma Cost (At Floor Price
1,000): $$\text{BasePlasma}(\text{110 B rollup tx}) = 21{,}000 + 68 \times 110 = \mathbf{28{,}480\text{ Plasma}}$$- Funded by
14 QSRrefundable fused Plasma (ceil(28,480 / 2,100) = 14 QSR, zero burn, replenished upon confirmation) OR42.72MSHA3-256 PoW hashes. - Honest Fee Framing (
R8-M01): Stage 1A transfers on Zenon are L1-subsidized soft preconfirmations (0sat direct user BTC fee for existing accounts) — NOT unbounded zero-cost Bitcoin L1 DA. To defeat zero-cost0x02DA flooding via refundable QSR (8.8 tx/sspraying 1-sat dust to fresh addresses =~3.80 BTC/day@50 sat/vB), creating a brand-new SMT account leaf locks a refundable500-satzBTCleafDepositSats(reclaimed when the account sweeps to0and closes) AND0x02batches enforce a hard<= 1,000new SMT leaves per 6-block batch epoch cap (<= 48 KBwitness ≈12 kvB/hour max new-leaf DA!).
- Funded by
- Stage 1A
- Two-Column Throughput Reality Table (
R8-M08Reconciled — Zenon Transport vs Bitcoin L10x02Physical DA Cap): Observed Zenon Momentum cadence is~11.4s(origin/dev:vm/embedded/definition/spork.go:43-46), explaining the exact rates below (note:2.1M / 28,480 / 10s = 7.37 tx/sassumes idealized10sblocks rather than observed11.4s):
| Regime / Bottleneck | Zenon Soft-Preconfirmation Transport (~11.4s/Mom) | Bitcoin L1 0x02 Physical Mutated-Leaf DA Ceiling (600s/blk, 4 MWU = 1M vB/blk) |
|---|---|---|
Pinned Floor (2,100,000 Plasma/Mom) | 4.4 2-blk tx/s (42,000 Plasma) / 6.5 1-blk rollup sends/s (28,480 Plasma; 7.37 at nominal 10s) | Blended 40 B (10 vB) leaf: 166.7 leaves/s @ 100% of all Bitcoin blockspace (1.67 leaves/s @ 1%) |
Default Dynamic Plasma (4,200,000/Mom) | 8.8 2-blk tx/s / 12.9 1-blk rollup sends/s (14.75 at nominal 10s) | Existing 16 B (4 vB) leaf: 416.7 leaves/s @ 100% of Bitcoin (4.17 leaves/s @ 1%) |
Hard go-zenon 8 MiB Wire Ceiling (MaxMomentumContentBytes = 8 MiB, MaxDetailedMomentumWireSize = 8.38 MB) | 1,050–1,200 2-blk tx/s (~2,100–2,400 1-blk sends/s; NOT 4,386 tx/s!) | New 48 B (12 vB) leaf: 138.9 leaves/s @ 100% of Bitcoin (1.39 leaves/s @ 1%, further capped to <= 1,000 new leaves/6-blk epoch = ~0.28 new leaves/s!) |
Key takeaway (R8-M08): High Zenon transport TPS (> 10 tx/s) translates to L1-anchored settlement ONLY to the extent transfers net across repeated accounts within each 6-block batch (0x02 publishes net post-batch leaf states, not individual transactions); distinct mutated accounts per second are strictly physically bounded by Bitcoin L1 blockspace!
- Graceful Degradation Under Dynamic Plasma DoS: Under a QSR whale Dynamic Plasma spike (
spec/05 §2.2), feeless Zenon soft preconfirmations degrade cleanly to Bitcoin L10x03 FORCED_TRANSFERand0x01 FORCED_EXIT, completely bypassing Zenon!
2.3 Slotted Permissionless DA Batcher Economics (R8-M01, R8-M02)
- Deterministic Slotted Batcher Priority (
R8-M02Closed): To prevent competing permissionless batchers from burning L1 fees on stale-root0x02collisions in the same block, registered batchers (zero custody power; permissionless registration via0x03) follow deterministic slot priorityprimary_batcher = H(header[h-1].hash) mod K_batchersfor blocks[prevBatchHeight + 6, prevBatchHeight + 7]; fromprevBatchHeight + 8onward, any batcher may post0x02permissionlessly. - Sustainable Incentives: Batchers earn optional
batchTipSats, operator fronting fee spreads, and merchant/wallet sponsorship. A batch updating600existing accounts requires9.6 KBwitness (2.4 kvB) +~0.1–10 kvBproof =~2.5–12.4 kvB(~0.0005–0.0025 BTCat20 sat/vB).
2.4 Hard-Partitioned B_zbtc, Cyclic ExitSlotUTXO, Oldest-Exit Priority & TransferCredit (R8-H01, R8-H02, R8-N01, R8-N05, R8-M03, R8-M04, R8-M05)
- Hard-Partitioned Per-Lane
B_zbtc(0.60 BTC=60,000,000sats):B_custody = 0.55 BTC(55,000,000sats): Reserved strictly for0.50 BTCmax-vault Lamport equivocation restitution +0.05 BTCequivocation bounty (or protocol insurance slash on dual-inputDisproveTx). NEVER debited byExitSlotUTXOgriefing!B_grief = 0.05 BTC(5,000,000sats): Exclusively absorbsExitSlotUTXOnon-paying grief penalties (min(0.01 BTC, floor(B_grief / k_burst))pro-rata per grieved exit in a block), guaranteeing zeroB_custodyoverflow even underk = 20concurrent single-block griefs!
- Active-Operator
(2M_active + 1)-LeafExitSlotUTXOWith Collision-Free Cyclic Priority (R8-M03,R8-H01):- Created by
0x01 FORCED_EXIT(grossSats >= max(dust(destScriptPubKey), MIN_EXIT_SATS = 100,000)sats,R8-M05) using ONLY active non-suspended operatorsM_activefromR_{h-1}:- Leaves
0..M_active-1:<6*r> OP_CSV OP_DROP <P_{O_{k_r}}> OP_CHECKSIGwherek_r = (H(exitId) + r) mod M_active(0%repeat acrossr = 0..M_active - 1, matchingspec/01 §5identically!). - Leaves
M_active..2M_active-1: Open-race leaves<6*M_active> OP_CSV OP_DROP <P_{O_j}> OP_CHECKSIG. - Leaf
2M_active(EXIT_CANCEL):<288> OP_CSV OP_DROP <cancelPubKey_user> OP_CHECKSIG.
- Leaves
- On ANY
K-deep spend ofExitSlotUTXO(detected via full stripped-vinscan even without0x05tag,R8-C05!):- Valid Fronting (
vout[0]paysdestScriptPubKey>= grossSats - maxOpFeeSats):PendingExits[exitId] -> COMPLETED,ReimbursementCredit[O_j] += grossSats. - Non-Paying Grief Spend (
vout[0]fails payment check): AtomicallyPendingExits[exitId] -> CANCELLED, refund100%ofgrossSatszBTCto victim (E -> C), distributemin(0.01 BTC, floor(B_grief[O_j] / k_burst))strictly fromB_griefto each victim in that block, auto-suspendO_j, and excludeO_jfrom all futureExitSlotUTXOtrees! - User Cancel (Leaf
2M_activeafter288blocks):PendingExits[exitId] -> CANCELLED, refundgrossSatszBTCtoAccounts[acctId](restoreszBTC, NOT native BTC).
- Valid Fronting (
- Created by
- Oldest-
PendingExitCredit Priority &TransferCredit(R8-N01,R8-M04):- Anti-Self-Fronting Priority (
R8-N01): Whenever open retailPendingExitsolder than6blocks exist in the queue, deterministic FIFO vault assignment strictly prioritizesReimbursementCreditearned from fronting the oldestcreatedBtcHeightexits ahead of fresh self-fronted exits — stopping operators from pausing par retail fronting to jump the bank-run queue via discounted self-exits! Wallets may additionally specify an optional Dutch-auctionf_opcurve via0x06for transparent fee discovery. - Residual Credit Consolidation (
R8-M04): Operators holding< 0.25 BTCfractionalReimbursementCreditresiduals may execute a signedTransferCredit(from_op, to_op, amt)(via0x02or0x03, conservingsum(R)identically) to merge residuals into a>= 0.25 BTCvault claim, or convert remainingR[op]intoAccounts[op](R -> C) upon clean retirement (RetireStakeTx_r).
- Anti-Self-Fronting Priority (
- Native-L1 Dual-Input
Stake_rSlash (R8-H02,R8-N05):- On
DisproveTx_{r,i}/TimeoutSlashTx_{r,i}spendingStake_r+VaultConnector_rbeforeT_take = 1,728,0sats leaveU_d(ifU_dwasASSIGNED,V_assigned -> V_unassignedandA[U_d] -> R[O_j]). Every active honest verifier collects0.15 BTCin native Bitcoin L1 BTC directly fromStake_r(vout[0]immediate winner,vout[1..6]ChalPayoutEscrowviaChalProofConnector,>= 0.95 BTCimmediateOP_RETURNburn), delivering+0.0645 BTCnet EV @500 sat/vB(+0.0232 BTC@750 sat/vB) completely immune tozBTCcrisis discounts andB_griefdepletion! On L2,O_j's0.55 BTCB_custodyis slashed to the protocol insurance account (B -= 0.55, C += 0.55, exact conservation).
- On
2.5 End-to-End State Traces: Bob (0.50 BTC) & Mike (0.25 BTC)
- Bob's Partial Recovery (
1 BTC → spend 0.50 zBTC → recover 0.50 BTCunder49%–100%Zenon Compromise):- Bob confirms
U_Bob_wallet, consumes1 × Ticket_050 + 2 × Ticket_025, and deposits1.00 BTCvia0x00 DEPOSIT→ creates deleted-key vaults{0.50, 0.25, 0.25}BTC keyed by acyclicvault_id; atK = 18blocks,Accounts[Bob] = 1.00 zBTC. - Bob sends
0.50 zBTCto Carol via110 BAccountBlock.Dataon Zenon (28,480Plasma,0sat direct BTC fee) → slotted batcher anchors0x02 BATCH_DA→Accounts[Bob] = 0.50 zBTC,Accounts[Carol] = 0.50 zBTC. - Attack:
49%(or100%) of Zenon Pillars turn hostile, split Zenon across its 30-Momentum cliff, censor Bob on Zenon, and spike Dynamic Plasma. - Bob Exits Directly on Bitcoin L1: Bob broadcasts
0x01 FORCED_EXIT(0.50 BTC, P_Bob, maxOpFee)+ active-operatorExitSlotUTXOon Bitcoin L1 (completely bypassing Zenon!). AtK = 18blocks, $\mathcal{F}$ moves0.50 zBTCfromC → E. - Any
1-of-Mactive honest operator $O_j$ (M = 3–5) spendsExitSlotUTXOpaying0.50 BTC - feedirectly toP_Bobinvout[0](~10 min on L1!), moves0.50fromE → R[O_j], gets FIFO-assigned one0.50 BTCvault (V_unassigned -> V_assigned,R[O_j] -> A[v]), and afterT_take = 1,728blks claims the vault viaTakeTx(V_assigned, A -> 0, recyclingTicket_050). Zero Zenon signers, zero federated signers, zero ZNN trust.
- Bob confirms
- Mike's Cross-Depositor Exit (
Alice 1 + Bob 1 → Mike 2 → Mike recovers 0.25 BTCwith0Zenon Signer Cooperation):- Alice (
1.00 BTC) and Bob (1.00 BTC) deposit into{0.50, 0.25, 0.25}vaults and send1.00 zBTCeach feelessly to Mike on Zenon →0x02 BATCH_DA(or Mike's0x03 FORCED_TRANSFERfallback) setsAccounts[Mike] = 2.00 zBTC. - Attack: Zero Zenon signers cooperate; Alice and Bob are offline or hostile.
- Mike Exits
0.25 BTCDirectly on Bitcoin L1: Mike posts0x01 FORCED_EXIT(0.25 BTC, P_Mike, maxOpFee)+ExitSlotUTXO. Any1-of-Mactive honest operator $O_j$ fronts0.25 BTC - feedirectly toP_Mikeinvout[0](leaving Mike1.75 zBTCintact), earnsR[O_j] += 0.25 BTC, and claims one0.25 BTCvault viaR -> A -> TakeTx(recyclingTicket_025). - Irreducible Residual Boundary (
spec/01 §1.2Corollary 1B,R8-C06): If0-of-Moperators remain permanently unavailable, Mike's native BTC exit stalls permanently (0theft; Leaf2M_activeEXIT_CANCELafter288blocks restores0.25 zBTCinside the rollup, NOT native BTC on L1). Under a100%bank run of15 BTC(3.0float +12.0vaults,T_cooldown = 13.0d), full queue drain takes~94–104 days(M = 5,0.385vaults/d ≈0.128 BTC/d) or~101–104 days(M = 3on10 BTC;~62–68dwith{0.50, 0.50}vaults).
- Alice (
3. Stage 1B (Alternative Gate): clArk VTXO Coordination Rails
If the project cannot commit ~14.75–21.25+ BTC of hard operator/verifier capital or requires a 3–6 month mainnet ship window using existing audited open-source stacks (Second bark/barkd or Ark Labs arkd), Stage 1B offers an explicit non-federated, zero-soft-fork alternative with 2–5 BTC active ASP liquidity (0 dead slashing bonds):
- Zenon's Role: Feeless off-chain coordination, round scheduling, VTXO intent indexing, and Stage 0 SPV verification — 0% Zenon consensus custody dependency.
- Exact Trade-Offs (Mandatory Disclosure):
- Post-Round
0-of-NUnilateral Exit (Until Expiry): Once Mike's0.25 BTCVTXO is confirmed in an L1clArkround tree, Mike exits unilaterally on Bitcoin L1 with zero ASP/signer cooperation by broadcasting his pre-signedlog2(N)branch (6..10txs forN = 64..1,024VTXOs, using TRUC v3 + ephemeral anchors on Core>= 29.0). - Pre-Round (
arkoor) Sender+ASP Collusion Risk: Instant feeless out-of-round transfers (Alice -> Mike) are vulnerable toAlice + ASPdouble-spend collusion until the next L1 round refreshes Mike into a new VTXO tree (wallets MUST visually separate trustless in-round VTXOs fromarkoorbalances!). - Hard VTXO Expiry & Watchtower Requirement: VTXOs expire (e.g.,
30–60days) back to the ASP sweep key, requiring automated watchtowers/online refreshes orlog2(N)L1 exit fees; ASP liquidity (2–5 BTC) is locked100%for each full expiry cycle, capping round turnover to2–5 BTC/cycle. - No Global Pooled
zBTCToken:clArkVTXOs are discrete UTXO trees, not a single global fungiblezBTCbalance sheet composable with Zenon DeFi — andclArkVTXOs do not migrate automatically into Stage 1A RollupzBTCwithout on-chain L1 settlement.
- Post-Round
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.