ZK VM
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
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:
- the input notes exist in the commitment tree — a Merkle membership proof;
- the sender knows the spending key for those input notes;
- input values sum to output values — conservation;
- 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
| System | Use case | Proof size | Verification gas |
|---|---|---|---|
| Groth16 | Shielded transfers (fixed circuit) | 192 bytes | 200,000 |
| PLONK | General private computation | ~1 KB | 350,000 |
| Halo2 | Recursive proofs (proof aggregation) | ~5 KB | 500,000 |
Precompiles
| Address | Function | Description |
|---|---|---|
0x0400…01 | groth16Verify | Verify a Groth16 proof against public inputs |
0x0400…02 | plonkVerify | Verify a PLONK proof against public inputs |
0x0400…03 | pedersenCommit | Compute a Pedersen commitment |
0x0400…04 | poseidonHash | Poseidon 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
- Trusted setup. Groth16 requires a trusted setup ceremony. PLONK uses a universal structured reference string that is reusable across circuits.
- Viewing key compromise. A compromised viewing key reveals transaction history but cannot spend funds — the separation is the point.
- Nullifier uniqueness. The nullifier set is consensus-critical. Fork divergence in nullifier sets would break double-spend prevention.
Reference
| Resource | Location |
|---|---|
| ZK VM | github.com/luxfi/node/vms/zkvm/ |
| Proof verifiers | github.com/luxfi/node/vms/zkvm/verifier/ |
| Shielded pool circuit | github.com/luxfi/node/vms/zkvm/circuits/ |
| Z-Chain chain spec | LP-8000 |
Copyright
Copyright and related rights waived via CC0.