Lux Docs
Chains

ZK VM (Z-Chain)

Zero-knowledge proof generation and verification for privacy-preserving UTXO transactions.

The ZK VM (Z-Chain) is a privacy-focused virtual machine that implements zero-knowledge proofs for confidential transactions. It uses a UTXO model with nullifiers to prevent double-spending while keeping transaction details private. The Z-Chain supports multiple proof systems (Groth16, PLONK), shielded addresses, and optional FHE for encrypted computation.

VM/engine boundary. This VM is a pure block.ChainVM state machine: it parses, verifies, and applies blocks deterministically — proof verification and nullifier checks happen at block Verify. The single Quasar engine owns all consensus, gossip, and propagation — this VM ships none of its own. State is replayed from block bytes only; no wall-clock, no floating-point non-determinism, no per-node modes. See the Go-Live Standard.

Status

Go-live target for the Lux primary network (D + A + Z + B).

Architecture

  • Shielded UTXO Model: Privacy-preserving UTXO transactions with nullifier tracking
  • ZK Proof Verification: Groth16 and PLONK proof systems
  • Private Addresses: Stealth address generation for receiver privacy
  • Nullifier Database: Prevents double-spending without revealing which UTXO was spent
  • State Tree: Merkle tree of commitments for membership proofs
  • FHE Support: Optional BFV/CKKS encrypted computation (128/192/256-bit security)
  • Mempool: Transaction pool with proof pre-verification

Configuration

{
  "enableConfidentialTransfers": true,
  "enablePrivateAddresses": true,
  "proofSystem": "groth16",
  "circuitType": "transfer",
  "verifyingKeyPath": "/path/to/vk",
  "trustedSetupPath": "/path/to/setup",
  "enableFHE": false,
  "fheScheme": "BFV",
  "securityLevel": 128,
  "maxUtxosPerBlock": 1000,
  "proofVerificationTimeout": "10s",
  "proofCacheSize": 10000
}

Key Parameters

ParameterDefaultDescription
proofSystemgroth16ZK proof system (groth16 or plonk)
enableConfidentialTransferstrueEnable shielded transactions
enablePrivateAddressestrueEnable stealth address generation
enableFHEfalseEnable FHE encrypted computation
securityLevel128FHE security level (128, 192, 256)
maxUtxosPerBlock1,000Maximum UTXOs processed per block
proofVerificationTimeout10sTimeout for proof verification
proofCacheSize10,000Cache for verified proofs

REST API

The Z-Chain exposes three handler groups. Base endpoint:

https://api.lux.network/{network}/ext/bc/{blockchain-id}

Transaction Endpoints (/rpc)

  • POST /sendTransaction -- Submit a shielded transaction with ZK proof
  • GET /getTransaction -- Get transaction by ID (returns status: pending/confirmed)
  • POST /createShieldedTransaction -- Create a shielded transaction (shield public funds)

Block Endpoints (/rpc)

  • GET /getBlock -- Get block by ID
  • GET /getLatestBlock -- Get the most recent block

UTXO Endpoints (/rpc)

  • GET /getUTXO -- Get a UTXO commitment
  • GET /getUTXOCount -- Get total UTXO count

Status Endpoints (/rpc)

  • GET /getStatus -- Get chain status

Privacy Endpoints (/privacy)

  • POST /generateAddress -- Generate a new stealth address
  • GET /getAddress -- Get address details
  • POST /decryptNote -- Decrypt a received note using viewing key
  • GET /isNullifierSpent -- Check if a nullifier has been spent

Proof Endpoints (/proof)

  • POST /generateTransferProof -- Generate a ZK proof for a transfer
  • POST /generateShieldProof -- Generate a ZK proof for shielding funds
  • POST /verifyProof -- Verify a ZK proof
  • GET /getProofStats -- Get proof generation/verification statistics

Example: Send a Shielded Transaction

curl -X POST \
  https://api.lux.network/mainnet/ext/bc/{blockchain-id}/rpc/sendTransaction \
  -H "Content-Type: application/json" \
  -d '{
    "nullifiers": ["0x..."],
    "commitments": ["0x..."],
    "proof": "0x...",
    "encryptedData": "0x..."
  }'

Example: Check Nullifier

curl "https://api.lux.network/mainnet/ext/bc/{blockchain-id}/privacy/isNullifierSpent?nullifier=0x..."

See lps.lux.network for the relevant Lux Proposals governing this chain.

On this page