LPsLux Proposals
EVM & Execution
LP-8010

ZK VM

Final

The Z-Chain shielded pool — a 32-level Merkle tree of Pedersen commitments, nullifiers that stop double spends, transfers proven in zero knowledge, and an optional viewing key that satisfies disclosure without surrendering spend authority

Category
Core
Created
2021-08-01

Normative topology + fee model: LP-5210. Z-Chain (zkvm) is one of the ten canonical chains; commitments and nullifiers are domain state, with no canonical UTXO asset supply. Its fee pool is funded from X in LUX.

Abstract

The ZK VM runs the Z-Chain shielded pool. Users deposit assets into a pool where transfers occur without revealing sender, receiver, or amount. The VM supports both fixed-circuit and general-computation proof systems, with GPU-accelerated verification through precompiles.

The chain-level specification — parameters, proof substrate, hardware acceleration, RPC surface — is LP-8000. This LP specifies the pool: what a note is, what a shielded transfer proves, and how disclosure works.

Specification

Shielded pool

The pool is a Merkle tree of commitments over shielded UTXOs:

Note {
    owner      [32]byte    // derived from the recipient's viewing key
    value      uint256     // asset amount
    asset      [32]byte    // asset identifier
    randomness [32]byte    // blinding factor
}

Commitment = PedersenCommit(owner || value || asset || randomness)

The tree is 32 levels deep. Nullifiers, derived from spent notes, prevent double spending.

Shielded transfer

A shielded transfer proves, in zero knowledge, that:

  1. the input notes exist in the commitment tree — a Merkle membership proof;
  2. the sender knows the spending key for those input notes;
  3. input values sum to output values — conservation;
  4. the nullifiers are correctly derived and have not been seen before.
ShieldedTx {
    nullifiers  [][32]byte   // nullifiers of spent notes
    commitments [][32]byte   // new note commitments
    proof       []byte       // Groth16 or PLONK proof
    ciphertext  [][]byte     // encrypted notes for recipients
}

Proof systems

SystemUse caseProof sizeVerification gas
Groth16Shielded transfers (fixed circuit)192 bytes200,000
PLONKGeneral private computation~1 KB350,000
Halo2Recursive proofs (proof aggregation)~5 KB500,000

Precompiles

AddressFunctionDescription
0x0400…01groth16VerifyVerify a Groth16 proof against public inputs
0x0400…02plonkVerifyVerify a PLONK proof against public inputs
0x0400…03pedersenCommitCompute a Pedersen commitment
0x0400…04poseidonHashPoseidon hash (ZK-friendly)

The as-built address table for every deployed Lux precompile is LP-1210; where a deployed address and the table above disagree, LP-1210 is what the chain answers to.

Shield and unshield

  • Shield — deposit public assets into the pool: a public transaction produces a commitment.
  • Unshield — withdraw from the pool to a public address: a nullifier plus a proof produces a public transfer.

Cross-chain shielding rides Warp (LP-6602): shield on Z-Chain, unshield on any Lux chain.

Disclosure

For regulated assets (LP-3100) the Z-Chain supports optional disclosure without surrendering spend authority. A viewing key can be shared with a compliance officer, who can then decrypt transaction details but cannot spend, because the spending key is separate. That satisfies AML requirements while preserving privacy from everyone else.

Security Considerations

  1. Trusted setup. Groth16 requires a trusted setup ceremony. PLONK uses a universal structured reference string that is reusable across circuits.
  2. Viewing key compromise. A compromised viewing key reveals transaction history but cannot spend funds — the separation is the point.
  3. Nullifier uniqueness. The nullifier set is consensus-critical. Fork divergence in nullifier sets would break double-spend prevention.

Reference

ResourceLocation
ZK VMgithub.com/luxfi/node/vms/zkvm/
Proof verifiersgithub.com/luxfi/node/vms/zkvm/verifier/
Shielded pool circuitgithub.com/luxfi/node/vms/zkvm/circuits/
Z-Chain chain specLP-8000

Copyright and related rights waived via CC0.