Shortlink to prior context: This proposal builds on the earlier forum thread, STARK verification as a Transparent Zcash Extension (TZE), i.e. enabler for a Starknet‑style L2 on Zcash.
Ztarknet POC website: https://ztarknet.cash
Ztarknet L1 testnet explorer: https://explorer.ztarknet.cash/
Why Cairo / FAQ and concerns / security, blockspace footprint, etc
Plain‑English overview (start here)
What we change on Zcash L1: add one narrowly scoped extension point—a built‑in STARK proof checker (using the TZE mechanism already contemplated by ZIP‑222). It does one job: given some bytes (a STARK proof + public inputs), it returns true/false inside consensus.
What that unlocks: we can run a separate, scalable Starknet‑style layer (L2) where most transactions and app logic live. The L2 posts “old state root, new state root, proof” to Zcash. Full nodes verify the proof via the TZE. If valid, L1 accepts the update. Privacy and value accounting stay with Zcash; scale and programmability move to L2.
What we don’t change: no changes to shielded pools, no new L1 scripting language, no L1 programmability features. We add one auditable verifier and keep all ZEC value conservation rules exactly as they are today.
Value proposition for ZEC holders (non‑technical)
-
Keep the base layer conservative. Zcash remains the privacy‑first settlement layer.
-
Get utility without L1 churn. Payments, stablecoins, perps, and other apps run on L2 with cheap, fast transactions.
-
Direct linkage to ZEC:
-
L2 settlement transactions pay ZEC fees on L1.
-
ZEC is bridged and becomes a base asset on L2.
-
Option (policy): denominate L2 gas in ZEC to deepen usage.
Honest risk summary: any consensus change is non‑zero risk. This proposal restricts the new surface to a single verifier with pinned parameters and byte‑size limits, and keeps all value accounting in existing, time‑tested code paths. That’s the prudent way to add scale.
What exactly changes on Zcash? (high‑level technical)
Mechanism: introduce a Transparent Zcash Extension (TZE) type, called (working name) STARK_VERIFY_V1.
-
Purpose: verify a bounded STARK proof under pinned algorithms/parameters, returning a boolean into consensus.
-
Inputs (public): a small, fixed‑format byte string containing at least:
-
root_old(previous L2 state commitment), -
root_new(next L2 state commitment), -
program_or_air_id(identifies the Cairo/AIR semantics we’re verifying), -
optional data‑availability (DA) commitment (if used by the L2),
-
and any other minimal public inputs required by the verifier.
-
Inputs (private): the proof bytes.
-
Outputs: success (
true) means “the claimed transition(root_old → root_new)follows from the pinned verifier and the provided public inputs”; failure means the transaction is invalid.
Consensus & policy bounds:
-
Consensus: proof byte size is capped (so verification cost is indirectly bounded). Parameters (field, hash(es), FRI settings, etc.) are pinned.
-
Mempool policy: standardness rules can be stricter (lower byte caps per tx and/or per block) to be DoS‑safe during rollout.
No minting path. The TZE is pure verification. It cannot create ZEC or relax any existing conservation rules.
What does the L2 look like?
Ztarknet proposes an L2 that:
-
executes Cairo programs (Starknet‑compatible),
-
proves state transitions using Circle STARKs (via the Stwo/Cairo prover),
-
and settles on Zcash L1 by having full nodes verify a STARK proof with the TZE.
Lifecycle of an L2 block:
-
Users submit L2 transactions to a Starknet‑compatible sequencer.
-
The sequencer executes Cairo, updates the L2 state root, and emits an execution trace.
-
A prover constructs a Circle‑STARK proof that “given
root_oldand the batch, the resultingroot_newis correct.” -
A submitter posts a Zcash L1 transaction embedding
{root_old, root_new, (optional) DA commitment, proof}via the TZE verifier. -
Zcash full nodes verify the proof inside consensus. If
true, the L2 anchor on L1 advances toroot_new.
Withdrawals & deposits (sketch):
-
Deposit to L2: an L1 transaction “locks” ZEC to a bridge UTXO (transparent or unified address path), emitting a small, verifiable record that the L2 can read as an allowed credit.
-
Withdraw to L1: an L2 exit operation is proven (with a STARK) and verified by the same TZE, which authorizes releasing a specific L1 output to the exiting party.
Note: This uses the same yes/no primitive—no new mint rules.
Safety & invariants (explicitly)
Inflation / counterfeiting:
-
The TZE verifier does not manipulate ZEC amounts. It cannot mint coins.
-
Conservation of value remains enforced by existing Zcash code paths (exactly as today).
-
The verifier is pinned and bounded (algorithms, security level, byte caps), minimizing consensus surface.
DoS resistance:
-
Consensus caps on proof size; validation cost tracks bytes.
-
Mempool standardness can be stricter initially (e.g., lower per‑tx limits).
Soundness assumptions:
-
The L1 verifier relies on the soundness of the STARK scheme (transparent, hash‑based) and the chosen cryptographic hash.
-
No trusted setup. Hash security becomes the main assumption (plus classical finite‑field assumptions). This is post‑quantum‑plausible pending the hash.
L2 failure modes:
-
If the L2 halts or is upgraded, Zcash L1 is unaffected. The anchor can pause; funds on L1 stay safe.
-
Withdraw proofs remain verifiable on L1 as long as the verifier type is present and parameters are pinned.
Why STARKs (and Circle‑STARKs / Stwo) here?
-
Transparent (no trusted setup); assumptions are mainly about hashes + FRI.
-
Verification scales well (dominated by hashing; predictable cost as a function of proof size).
-
Tooling exists today for Cairo/Starknet (mature developer ecosystem and provers).
Concrete deliverables & repos (work in the open)
Check the Ztarknet Github Organization repositories.
Economics & fees (initial framing)
-
L1 fees: settlement transactions (posting L2 blocks, exits) pay ZEC.
-
L2 fees: sequencer fees fund proving; can be denominated in ZEC (policy choice).
-
Bridged ZEC: locked on L1; represented 1:1 on L2. Withdrawals provably redeem on L1.
Goal: more ZEC utility without increasing L1 complexity—activity migrates to L2 while L1 remains the conservative privacy base.
Implementation status & how to try it
-
Run a local devnet: see the
ztarknetrepo for Docker Compose / K8s recipes (sequencer + prover + Zcash node). -
L1 experiments: use the Zebra fork to test verification on regtest/testnet.
-
L2 experiments: use the Madara fork for Cairo execution/state roots.
Appendix — STARK primer
A STARK proof lets a prover convince a verifier that a computation was done correctly. It’s transparent (no trusted setup) and relies primarily on the security of hash functions and algebraic checks (FRI). Verification cost grows much slower than re‑executing the computation, so you can batch thousands of transactions, prove the result once, and verify it cheaply on‑chain. Circle‑STARKs (as implemented in Stwo) are a modern STARK instantiation with efficient Cairo support and production‑grade engineering.
Closing
Zcash is already the right privacy base layer. By adding one carefully specified, auditable proof‑checking port (TZE), we can let a Starknet‑style L2 handle scale and programmability—without entangling those concerns with L1 custody and privacy. The proposal is minimal by design: a single verifier, pinned parameters, byte caps, staged rollout, and independent review. If we do this right, we keep ZEC hard and make it more useful.
Appendix: Simple pitch (for sharing)
-
Don’t change L1 privacy. Add a tiny STARK proof‑checker (TZE) so experimentation happens on L2.
-
One small port, many apps. Zcash stays private; Starknet‑style L2 brings speed and programmability.
-
No inflation path. TZE only returns yes/no on proofs; value rules stay unchanged.
-
Direct ZEC linkage. Settlement pays ZEC; bridged ZEC is used in L2 apps; gas can be ZEC‑denominated.