Inspiration
When loan applications are filled out traditionally, borrowers are required to submit unredacted pay stubs, W-2s and bank statements, which provide exact salary and employer details, personal identifiers and bank account numbers to underwriters and a third-party verification portal. This data frequently sits in unencrypted PDFs or database backups, creating huge privacy and security risks. Eliminating this trade-off is what we did with Veritas: employees can prove they have an income that exceeds a lender's requirement, without ever exposing their salary, bank account information, or their identity.
What it does
Veritas is a salary attestation and zero-knowledge (ZK) protocol for income verification that works on the Midnight Network.
It allows a 3-party trust model: Employer: Registers on-chain and writes an employee's salary in a cryptographic commitment with an employer's public verifying key (vk). The amount of actual pay never goes on the public's books.
- Lender: Initiates an income verification request that sets a threshold (e.g., "Must earn $\ge$ $50,000/year"), currency, and expiration block time which are only bound to verified employer keys.
- Employee: Generates a Zero-Knowledge proof locally in his/her browser. The proof shows that the contracted salary is as much or more than the amount the lender specified, but it doesn't show the specific amount that the smart contract pledged.
- Lender: Accepts a cryptographically proven proof on-chain and makes an official loan offer.
How we built it
The report lists the following as the Smart Contract & ZK Circuits, which are written in the Compact (language_version 0.23) network on Midnight Network. Computes anti-replay nullifiers and salary commitments deterministically using persistentHash vectors. On-Chain Attestations: Create maps of employers,ts, ZK proofs, and loan offers on the built ledger. Powered by the @midnight-ntwrk/midnight-js SDK, wallet-sdk-facade, and Docker-based local proof server. (proof-server:8.0.3) for ZK key compilation and proving. Frontend & CLI: Created a modern, responsive, and responsive UI (React/MUI) ("Cinder" design) and a stand-alone CLI end-to-end verification pipeline using TypeScript.
We encountered some difficulties:
- Compact 0.31 Toolchain Constraints: Compact 0.31.x does not have in-circuit ECDSA/Ed25519 signature builtins. This is achieved by designing an on-chain existence model, where the attestation itself is the on-chain existence, and the employer's proof is a commitment inserted into the ledger state under his derived verifying key (callerVk). For PreProd 3 diselded, Unshielded, and DUST) synchronization & Fee Balancing, it was important to make sure the walletsync guards were in place to avoid BalanceCheckOverspend ledger errors when generating fee recipes for tDUST.
- Nullifier Anti-Replay: Nullifier logic H("veritas:nquestId") for ensuring non-reusability of income proof across multiple loan requests, while maintaining strong zero-knowledge privacy.
Things we are proud of that we have done
- Salary Values, Salts, and Employee's Identity Witnesss are all completely hidden from public state and block explorers. Designed an end-to-end deploymt creation process, faucet funding, tDUST generation, contractdeployment and a 5-stage circuit interaction flow all on-chain. Production-Ready UI: Developed a simple and user-friendly 3-role portal interoof generation, transparent to non-technicalusers.
What we learned
Experienced with the Compact language of Midnight and witnessed key derivation (witness signingKey()), and private management of state (levelPrivateStateProvider).
- Private witness argumeclosures: architectural strategies for balancing.
- Solving InvalidTransaction ledger error codes in Substrate and handling custom fee/DUST token economies.
What's next for Veritas
Multi-Employer Income Aggregation: Enable borrowers to combine multiple gig or part-time income sources into one proof of threshold income. Lace Wallet Deep Integration: increase browser wallet DApp connick proof signing.
- multi-variable underwriting, use salary thresholds, along with encrypted credit-score range proofs.
Built With
- blockchain
- cardano
- compact
- docker
- material-ui
- midnight
- node.js
- privacy
- react
- smart-contracts
- typescript
- vite
- web3
- zero-knowledge-proofs
- zk-snarks

Log in or sign up for Devpost to join the conversation.