hackquest logo

zk-VEILRWA

VeilRWA is a Zero-knowledge privacy layer for RWA yield on Mantle. Institutions earn verified returns without revealing portfolio balances using Groth16 ZK proofs.

Videos

Tech Stack

Next
React
Web3
Solidity
Node

Description

VeilRWA - Zero-Knowledge Privacy Layer for Real-World Asset Yields

šŸ”“ The Problem:

Institutional investors face a critical privacy dilemma in DeFi RWA markets. When depositing tokenized real-world assets (T-Bills, bonds, treasuries) on-chain, their entire portfolio balance becomes publicly visible. A $100M fund depositing treasury tokens reveals exact holdings to competitors, enabling front-running and market manipulation. Traditional DeFi protocols force investors to choose between transparency and yield—compromising institutional privacy requirements and regulatory compliance.

Current solutions fail: mixing protocols sacrifice auditability, private chains lack composability, and centralized custodians reintroduce counterparty risk. Institutions need cryptographic privacy that preserves verifiable compliance.

āœ… Our Solution:

VeilRWA enables institutions to earn verified yields on tokenized RWAs without revealing portfolio balances on-chain. Using zero-knowledge proofs on Mantle's L2, investors deposit assets behind cryptographic commitments—the blockchain stores only a hash, never the amount. When claiming accrued yield, users generate ZK proofs that cryptographically verify: (1) they own the commitment, (2) yield calculations are correct, and (3) time-based accrual is valid—all without exposing the principal balance.

šŸ” Zero-Knowledge Architecture:

Groth16 Proving System: Industry-standard ZK-SNARKs with 200-byte proofs, verified on-chain in 200K gas ($0.05 on Mantle vs $120 on Ethereum L1).

Circom Circuits: Three production circuits—

  • Deposit (250 constraints): Generates Poseidon commitment from balance + salt

  • Yield Claim (2500 constraints): Proves yield = balance Ɨ rate Ɨ time without revealing balance

  • KYC (1800 constraints): Verifies credentials off-chain, proves eligibility on-chain

Poseidon Hashing: ZK-friendly hash function optimized for minimal circuit constraints, enabling efficient proof generation client-side (2-3 seconds in browser).

Commitment Scheme: commitment = Poseidon(balance, randomSalt) stored on-chain. Balance never touches blockchain storage—only the cryptographic hash is recorded, making portfolio amounts computationally infeasible to reverse.

Nullifier System: Prevents double-claims without linking transactions. Each claim generates unique nullifier from commitment, ensuring same commitment can't claim twice while preserving transaction unlinkability.

šŸš€ Key Differentiators:

vs Tornado Cash/Privacy Pools: We're privacy for yield, not transfers. Maintains institutional auditability through selective disclosure—users can prove holdings to auditors without public exposure.

vs Aztec/Aleo: Purpose-built for RWA compliance, not general computation. Circuit constraints optimized specifically for yield calculations, reducing gas costs 60% vs general-purpose ZK-VMs.

vs Private Chains (Hyperledger): Full DeFi composability on public Mantle L2. Interact with AMMs, lending protocols, and oracles while maintaining balance privacy—impossible in isolated private networks.

vs Centralized Custodians: Self-custody + cryptographic verification. Smart contracts enforce rules, not trusted intermediaries. Mantle's decentralization guarantees censorship resistance.

vs ZK-Rollups (zkSync, StarkNet): We provide privacy, not just scalability. Those platforms compress transactions but balances remain public. VeilRWA hides the balance itself using commitment schemes.

šŸŽÆ Technical Innovation:

  • Gas Efficiency: Mantle's DA solution reduces proof verification costs 96% vs Ethereum L1

  • Client-Side Proving: SnarkJS generates proofs in-browser—no trusted servers

  • Modular Verifiers: Separate circuits for deposit/yield/KYC enable independent upgrades

  • Time-Based Privacy: Yield accrues off-chain, claimed with ZK proof of elapsed time

  • Regulatory Ready: Commitment scheme enables selective disclosure for auditors/regulators without public exposure

šŸ—ļø Built With:

Solidity 0.8.20 | Circom 2.0 | Groth16 SNARKs | Poseidon Hashing | Next.js 14 | Wagmi v2 | Mantle L2

šŸ“Š Live Demo:

Deployed on Mantle Sepolia with working end-to-end flow. Deposit 100 TBILL → Generate ZK proof → Claim 5 TBILL yield. On-chain explorer shows commitment hash, never balance. Privacy preserved cryptographically.

🌐 Use Cases:

Institutional treasury management | Hedge fund RWA allocations | Corporate bond portfolios | Pension fund fixed-income | Private credit markets | Compliant DeFi for TradFi

Privacy meets institutional compliance on Mantle.

Team Leader
RRohit Amal Raj
Project Link
Sector
RWADeFiDAO