Building with zkVerify: A Step-by-Step Guide to Scalable ZK Proof Verification
🚀 Introduction: Why zkVerify?
Wiki topics:
📐 · Mathematics
Building with zkVerify: A Step-by-Step Guide to Scalable ZK Proof Verification
🚀 Introduction: Why zkVerify?
zkVerify is a modular blockchain built on Substrate, dedicated to efficiently verifying zero-knowledge proofs (ZKPs) off-chain and publishing attestations on-chain. It slashes verification costs by up to 50%+ compared to on-chain methods, enabling scalable dApps like zkRollups, private voting, and KYC systems.

Verify with Zero Knowledge
Key Innovations
- Proof Aggregation: Batch proofs into Merkle roots for cost-efficient on-chain verification.
- Multi-Prover Support: Groth16, Plonky2, Risc Zero, and more.
- Interoperability: Attestations are relayed to Ethereum, Base, and other EVM chains via smart contracts .
zkVerify Architecture

🔧 Core Components of zkVerify
1. Substrate-Based Blockchain
- L1 PoS Chain: Specialized for ZKP verification, powered by the
tVFYtoken. - Verifier Pallets: Modular pallets for different proof systems (e.g., Groth16, UltraPlonk).
2. Proof Submission Flow
- Submit Proofs: Via
zkverifyjsSDK or direct RPC calls. - Attestation Generation: Valid proofs are aggregated into Merkle roots and published on-chain.
- On-Chain Verification: Contracts verify attestations using Merkle proofs.
3. SDK (zkverifyjs)
- Installation:
npm install zkverifyjs
- Key Features:
- Submit proofs (Groth16, Risc Zero, etc.) .
- Listen for attestation events (
NewAggregationReceipt) . - Register verification keys for reuse .
🛠 Step-by-Step: Verifying a Circom Proof
1. Circuit Setup
- Example Circuit: Poseidon hash verification in Circom:
template Example() { signal input a; // Private input signal input b; // Public hash component hash = Poseidon(1); hash.inputs[0] <== a; assert(b == hash.out); }
- Compile & Generate Proof: Use
snarkjsto createproof.jsonandpublic.json.
2. Submit Proof via zkverifyjs
const { zkVerifySession } = require("zkverifyjs");
const session = await zkVerifySession.start()
.Volta() // Testnet
.withAccount("seed_phrase");
// Register verification key (Groth16)
const { events } = await session.registerVerificationKey()
.groth16({ library: "snarkjs", curve: "bn128" })
.execute(vkey);
// Submit proof
await session.verify()
.groth16({ library: "snarkjs", curve: "bn128" })
.execute({
proofData: { proof, vk: vkeyHash, publicSignals },
domainId: 0, // Target chain (e.g., Ethereum)
});
- Listen for Attestation:
events.on("NewAggregationReceipt", (event) => { console.log("Attestation ID:", event.aggregationId); });
3. On-Chain Verification
- Smart Contract: Verify attestations using
IVerifyProofAggregation.sol:
function verifyProof( uint256 domainId, uint256 aggregationId, bytes32 leaf, bytes32[] calldata merklePath ) external view returns (bool) {
return IVerifyProofAggregation(zkVerify).verifyProofAggregation( domainId, aggregationId, leaf, merklePath, leafCount, index );
}
- Leaf Calculation:
bytes32 leaf = keccak256(abi.encodePacked( PROVING_SYSTEM_ID, // e.g., "groth16" vkeyHash, VERSION_HASH, keccak256(abi.encodePacked(publicInputs)) ));
🌐 Supported Chains & Use Cases
Deployed Networks
- Testnets: Sepolia, Base Sepolia, Arbitrum Sepolia.
- EVM Compatibility: Attestations are relayed via smart contracts.
Use Cases
- zkRollups: Batch-verify transactions.
- Private Voting: Prove eligibility without revealing identity.
- KYC: Verify credentials off-chain.
📌 Key Takeaways
- Cost Savings: zkVerify reduces gas costs by 50%+ for ZKP verification.
- Modular Design: Supports multiple proving systems (Groth16, Plonky2, etc.).
- SDK Integration:
zkverifyjssimplifies proof submission and event listening. - On-Chain Verification: Use Merkle proofs to validate attestations.
Learn more:
- Explore the zkVerify Circom tutorial.
- Clone the EVM dApp example.
메타데이터
- post_id
- 64fbef8faeda
- slug
- building-with-zkverify-a-step-by-step-guide-to-scalable-zk-proof-verification-64fbef8faeda
- url
- https://medium.com/@pavusa/building-with-zkverify-a-step-by-step-guide-to-scalable-zk-proof-verification-64fbef8faeda
- canonical_url
- https://medium.com/@pavusa/building-with-zkverify-a-step-by-step-guide-to-scalable-zk-proof-verification-64fbef8faeda
- author_url
- https://medium.com/@pavusa
- status
- ok
- fetched_at
- 2026-06-26 03:39:16