HomeTechnical Resources

Technical Resources

Open-core architecture. Source code, whitepapers, protocol specs, network scanners, glossary, and frequently asked questions.

Protocol Stack Architecture

Blockchain Layer

Base Sepolia (OP Stack)

EVM-equivalent L2 by Coinbase. Low gas costs, fast finality (2 second block time), and native BN254 precompiles at addresses 0x06, 0x07, and 0x08 for efficient Groth16 proof verification. Chain ID: 84532.

Smart Contracts

Solidity 0.8.28 + Foundry

Six contracts: InstitutionRegistry, CredentialRegistry, RevocationRegistry, SubscriptionManager, PaymasterVault, Groth16Verifier. Fuzz-tested via Foundry. All use custom errors instead of require strings for lower gas costs.

ZKP Compilation

Circom 2.0.8 + SnarkJS 0.7

Groth16 proof system. Circuit compiles to R1CS with approximately 45,000 constraints. Proof generation takes ~0.7 seconds on a modern CPU. Proving key is ~45 MB. Verification key is ~2 KB.

Backend Engine

Fastify 5 + Node.js 22

TypeScript 5.8 with strict mode. Zod-validated environment and request bodies. Prisma 6 ORM with PostgreSQL 16. BullMQ 5 with Redis 7 for async job processing. viem 2 for blockchain interaction.

Account Abstraction

ERC-4337 v0.6 EntryPoint

PaymasterVault implements IPaymaster interface. Institutions submit UserOperations without holding ETH. The Paymaster sponsors gas and deducts from the institution's deposited balance. EntryPoint address: 0x0000000071727De22E5E9d8bA f0eD5fA35Ee7b8.

Commitment Hash

Poseidon (circomlibjs)

ZKP-friendly hash function designed for arithmetic circuits. Approximately 100 constraints per permutation compared to ~30,000 for SHA-256. Uses 3-round sponge construction with BN254 field elements.

Frontend Framework

Next.js 15 + React 19

App Router with server and client components. TanStack Query for data fetching and cache management. shadcn/ui primitives with Tailwind CSS 3.4. Framer Motion 11 for page transitions. Three portals sharing one codebase.

DevOps

Docker Compose + pnpm Workspaces

Single root package.json with pnpm workspaces. Docker Compose for local PostgreSQL 16 and Redis 7. Production deploys use Neon for PostgreSQL and Upstash for Redis. Monorepo structure with shared TypeScript config.

Glossary of Terms

Key technical terms used throughout the Veridaq documentation and codebase.

BN254

An elliptic curve used by Ethereum for precompiled pairing checks. Also known as BN256 or alt_bn128. Supports efficient Groth16 proof verification at addresses 0x06, 0x07, and 0x08.

Blinding Factor

A random 256-bit scalar added to the Poseidon hash input. Ensures that two identical student records produce different commitments. Prevents brute-force matching of on-chain commitments against known student data.

BullMQ

A Redis-backed job queue library for Node.js. Veridaq uses it to process batch uploads and proof generation asynchronously, keeping the API server responsive.

Circom

A domain-specific language for writing arithmetic circuits that compile to R1CS constraint systems. Veridaq's credential circuit is written in Circom 2.0.8.

Commitment (Hash)

A one-way cryptographic value submitted on-chain. The commitment binds the prover to specific data without revealing it. Veridaq uses Poseidon hash commitments.

ERC-4337

The Ethereum account abstraction standard that allows smart contract wallets (accounts) to initiate transactions. Veridaq uses it so institutions can submit batches without holding ETH.

Groth16

A zero knowledge proving system introduced by Jens Groth in 2016. Produces constant-size proofs (3 group elements) with constant-time verification. Requires a trusted setup.

Nullifier

A unique public value derived from the credential data. Prevents the same credential from being verified more than once. Also used for revocation.

Paymaster

An ERC-4337 entity that sponsors gas fees for UserOperations. Veridaq's PaymasterVault maintains per-institution ETH balances and deducts gas costs after execution.

Poseidon

A ZKP-friendly hash function designed by Grassi, Khovratovich, and others. Highly efficient inside arithmetic circuits. Veridaq uses it for all credential commitments.

R1CS

Rank-1 Constraint System. The intermediate representation that Circom compiles to. SnarkJS converts R1CS to a quadratic arithmetic program (QAP) for Groth16.

SnarkJS

A JavaScript library for generating and verifying zk-SNARK proofs. Veridaq uses it for off-chain proof generation and on-chain verification key export.

UserOperation

An ERC-4337 data structure representing a transaction to be executed by an account. Contains sender, calldata, gas limits, and signature.

viem

A TypeScript library for Ethereum blockchain interaction. Veridaq uses viem 2 for all contract calls and transaction management.

Witness

The set of all circuit signals (inputs and intermediate values) that satisfy the constraints. The prover computes the witness before generating the proof.

Frequently Asked Questions

How does Veridaq differ from traditional blockchain credential platforms?

Most blockchain credential platforms put the credential data itself on-chain, sometimes encrypted but often in plaintext. Veridaq never puts student data on-chain. Only a Poseidon hash commitment (32 bytes) goes to the ledger. The raw data stays on the institution's backend server, encrypted with AES-256-GCM, and is only decrypted in memory during proof generation. This means Veridaq is GDPR-compliant by architecture, not by policy.

What happens if the institution's backend goes offline?

Existing on-chain commitments remain valid. However, no new proofs can be generated because the encrypted private data is stored on the institution's backend. The employer sees NOT VERIFIED for any new request. The institution can restore service by bringing their backend back online with the same encryption key and database.

Can an employer verify a credential without the institution's cooperation?

No. The proof generation requires the encrypted student data that only the institution's backend holds. The employer cannot generate a proof on their own. This is intentional: it prevents unauthorized verification and gives the institution control over who can access their data.

How much does it cost to verify one credential?

The on-chain verification costs approximately 236,000 gas on Base Sepolia. At current gas prices (approximately 0.1 gwei) and ETH at $1,669, this is about $0.01 per verification. Employers buy credit packs starting at $15 for 10 verifications. The platform covers on-chain gas costs from its revenue share.

What happens if a student's degree is revoked?

The institution submits the credential's nullifier to the RevocationRegistry contract. Once revoked, the credential can never be verified again, regardless of proof validity. The RevocationRegistry is append-only and entries cannot be removed.

Why Base Sepolia and not Ethereum Mainnet?

Base Sepolia is an EVM-equivalent L2 with significantly lower gas costs than Ethereum Mainnet. It also has native BN254 precompiles for efficient Groth16 verification. The L2 inherits Ethereum's security through OP Stack fraud proofs. For production, Veridaq would deploy to Base Mainnet.

How are proofs generated? Can the backend fabricate a valid proof?

The backend runs SnarkJS fullProve which takes the private inputs and the circuit WASM to produce a Groth16 proof. The backend cannot fabricate a valid proof without a valid witness that satisfies all circuit constraints. The on-chain verifier checks the proof's mathematical soundness using BN254 pairing precompiles. If the backend does not possess the correct private data, the proof will be rejected.

What claim types are supported?

Six claim types: Programme Completion, Minimum Lower Second Class (classification >= 2), Minimum Upper Second Class (classification >= 3), First Class Honours (classification == 4), CGPA Above Threshold, and Course Specific Completion. Employers select the claim type when submitting a verification request.

Is there a mobile app?

Not yet. The frontend is a responsive web application built with Next.js 15 that works on mobile browsers. A React Native mobile app is in the roadmap for future development.

Can Veridaq be deployed to a different blockchain?

Yes. The contracts are standard Solidity and can be deployed to any EVM-compatible chain that supports the BN254 precompiles. The backend configuration has a CHAIN_ID variable. To switch chains, update the RPC URL and chain ID in .env, re-deploy the contracts, and update the addresses.

Further Reading

Academic papers and official documentation that informed the design of Veridaq.

Developer Tools and Utilities

Cast

Foundry's CLI for interacting with EVM contracts. Use it to query contract state and send transactions from the command line.

cast call $ZK_VERIFIER "owner()(address)" --rpc-url $RPC_URL

SnarkJS

JavaScript library for generating and verifying Groth16 proofs. Also exports Solidity verifier contracts.

snarkjs groth16 fullprove input.json circuit.wasm circuit.zkey proof.json public.json

Circom

Circuit compiler that converts Circom DSL to R1CS constraint systems and WASM witness generators.

circom credential.circom --r1cs --wasm --output build/

viem

TypeScript blockchain client. Used by the backend for all contract calls and transaction management.

const tx = await client.writeContract({ address, abi, functionName, args })