What this is, and what it asks. We built a fixed-denomination hiding pool whose membership proof is a hash-based STARK, and verified it in ErgoScript on unmodified nodes — no fork — then measured the whole lifecycle on a devnet.
This is the privacy-proof companion to the base-layer post-quantum work already on this forum (the exposure scan and no-fork hash-based spend, [5369]; the SLH-DSA verifier, quantum-day vault and rotating address, 5372; the key derivation, 5385). The point of this post is not a product — it is a measurement: what does in-script STARK verification cost on Ergo today, where does its soundness cap under the relay-size limit, and what would a native verifier (the subject of EIP-0045, 5316 or transaction-chaining need to do to make it secure? It is devnet-only, unaudited, and must not hold real funds. Nothing for holders to do; this is a request for review before testnet, and empirical input to the native-verifier question.
The headline finding. It runs — a ~14 KB verifier expression plus a ~48 KB proof fit, just, under Ergo’s 98,304-byte relay limit, so a withdrawal verifies on a stock node. But that budget forces the FRI parameters down to 16 queries, and at those parameters the provable soundness is low: the query phase gives a soundness error of about 2⁻⁴⁰ (Reed–Solomon at the Johnson radius, rate 1/32), and 20 bits of grinding raise an attacker’s work to about 2⁶⁰. A ~2⁶⁰ grind is embarrassingly parallel and classically cheap — Bitcoin-scale hardware does it in well under a second — so at the proven bound a resourced classical attacker can forge a withdrawal today. The pool’s safety rests on the true soundness sitting well above that proven floor (nearer the ~99 the tooling conjectures); recent work disproving the up-to-capacity proximity-gaps conjecture in its stated form (Crites–Stewart 2025/2046; and, for Reed–Solomon over a smooth multiplicative subgroup of a prime field — our code family — Krachun–Kazanin–Haböck 2026/782) removes our evidence for that higher number without lowering the true one. Whether it bites our exact parameters is open (ask 2). So the measured result is: in-script STARK verification works on Ergo, but the relay cap holds it at a soundness floor that is not yet safe.
Why that is the interesting number: soundness vs. transaction size. Lifting the floor means more FRI queries — and the sweep shows that in the degree-2 extension F_{p²}, the provable figure caps near 94 bits at 32 queries (beyond that the field terms, not the queries, bind). Thirty-two queries roughly doubles the per-query openings, pushing the withdrawal over the 98 KB relay cap. So a safe classical floor cannot be reached in a single transaction with this
construction. Two ways out, and both are what a serious reviewer should weigh:
-
A native verifier (EIP-0045’s direction): if the node verified STARKs natively, the 14 KB in-script expression and much of the per-query overhead leave the transaction, and the query budget is set by security rather than by relay bytes. Our measurements are a concrete statement of what that opcode would have to accommodate.
-
Transaction-chaining (no fork): split the verification across several chained transactions, each carrying the verifier’s intermediate state, the way a single hot box serves many operations today. We have not built this yet; it is the next thing we will run and measure, and we will report it as a follow-up to this post.
If a forged withdrawal did get through, a turnstile invariant in the contract bounds the damage: the pool is one box with a visible balance and fixed denominations (so ordinary UTXO value-conservation already stops minting ERG), and each spend moves exactly one denomination, so one forged proof steals at most one denomination, never more than the pool holds. It protects the chain’s supply, not the depositors.
The rest of the security budget, stated honestly.
-
Classical, per component. The binding term is the FRI low-degree test above (~2⁻⁴⁰ query error, +20-bit grinding work-factor — “proven” for the interactive protocol; the Fiat–Shamir compilation of our exact fold is not covered by a published round-by-round proof, so for the deployed non-interactive proof it is conjectured — ask 3). The other terms (ALI batching, DEEP quotient, FRI commit-phase, SHA-256 Merkle collision) sit at ~2⁻⁹⁰ or better at |F_{p²}| ≈
2¹²⁸ and do not bind here, but they are the ceiling once queries rise.nthroughout is the code block length (~2¹⁴: a ~512-row trace times the 32× blowup), not the 2¹⁵-leaf membership tree. -
Post-quantum. The reason to use a hash-based proof at all: there is no discrete-log assumption to break, so no structural Shor attack. But the post-quantum soundness number is moot until the classical floor is raised — a quantum adversary does not need Grover when the classical 2⁶⁰ grind is already cheap. For the record, the query-model estimate is the classical figure halved (~30 bits), a corollary of the QROM bound of Chiesa–Manohar–Spooner 2019/834 over the round-by-round soundness of Block et al. 2023/1071 (a classical result); it is an estimate, not a theorem for our instantiation, and even the concrete Grover attack sits within NIST’s MAXDEPTH range, not beyond it. The honest statement is: hash-based soundness is the right direction for post-quantum; the current parameters do not yet deliver a meaningful post-quantum level, because they do not yet deliver a safe classical one.
-
Hiding is computational, and that is a property of the hash-based STARK itself, not of the leaf. The trace — which carries
s,r, the path and the index — is committed under salted SHA-256 Merkle leaves and opened at the query positions; an unbounded adversary inverts those openings and reads it, whatever the leaf commitment is. So everlasting privacy is out of reach for any hash-based IOP.sandrare two Goldilocks elements each (≈128 bits); the leaf digest is four elements (≈256 bits, ≈128-bit collision resistance); linking a deposit to a withdrawal costs ≈2¹²⁸ classically / ≈2⁶⁴ under Grover (NIST Category 1), conditional on Poseidon2’s algebraic security at this width. Zcash Sprout shares this (a hash commitment); Sapling and Orchard use perfectly-hiding commitments — but even they are not everlastingly private against a quantum adversary, since their note ciphertexts ride on elliptic-curve key exchange that Shor breaks. (Statistically-hiding hash commitments do exist — Halevi–Micali — but they would not help, because the STARK’s zero-knowledge is the limiting layer.)
Versus the existing mixer. ErgoMixer is deployed, used, and classically ~128-bit; this prototype is devnet-only and classically ~60-bit at the proven bound — so it is not a drop-in improvement. Where a hash-based design wins is the quantum axis, and on two counts: a quantum adversary cannot forge the membership proof (no Shor target), and cannot retroactively de-anonymize past withdrawals the way Shor against the mixer’s discrete-log unlinkability would (our hiding is Grover-only at ≈2⁶⁴). It is not post-quantum end-to-end regardless: Ergo payout authorization and user keys are secp256k1, which is exactly what the base-layer work ([5369]/[5372]/[5385]) addresses — this pool and that work are two halves of the same program, and neither alone is end-to-end.
How the pieces bind (the one mechanism worth stating precisely). The box script pins the verifier by hash — blake2b256(getVar(7)) == VerifierHash — and runs it with executeFromVar, so the spender cannot substitute a permissive verifier. The committed Merkle root (from the box’s register), the revealed nullifier (checked absent in and inserted into an on-chain AVL set), and the payout (OUTPUTS(0)) are bound into the proof’s public inputs, so a mempool observer cannot redirect the withdrawal. Pool identity is a singleton token minted by a one-shot launcher whose script forces a clean genesis and the canonical pool script; a client verifies lineage back to a launcher hash it trusts.
Deposits append a leaf to a depth-15 Poseidon2-over-Goldilocks tree, recomputed on chain (~106k units, ~14 KB). STARKs need no trusted setup. The anonymity set is per-denomination (1/10/100 ERG) and only as large as that pool’s live deposits — today, zero.
What we would value review on (we will share the AIR, the verifier expression, the exact Plonky3 configuration, and the soundness derivation with anyone who takes an item up — same as 5369 shipped code with a static page):
-
The classical error budget above — is it right for this exact shape, and what is the honest proven work factor?
-
Does the capacity-conjecture disproof materially affect our parameters (
n≈2¹⁴, rate 1/32, challenges inF_{p²})? The bad-challenge construction in the cited work is explicit; we have not computed its impact at our parameters. -
Is a round-by-round soundness proof tractable for our exact fold (one arity-8 fold driven by powers of a single challenge) composed with DEEP-ALI — the piece that would make the non-interactive soundness a theorem rather than an estimate?
-
For the native-verifier question (EIP-0045): given these measurements, what query budget and proof size would an opcode need to support to reach a provable ~100-bit classical floor — and is transaction-chaining a credible no-fork alternative worth us building and measuring next?
Tell us where this is wrong. This is a measurement of what Ergo can do in script today and what it would take to do it safely, not a claim that it is safe today.