Zero-Knowledge Face Verification for Secure Fund Claiming
ZFace Cash is a revolutionary zero-knowledge proof system that enables secure fund claiming through biometric face verification. The platform allows users to deposit funds into a one time address smart contract that can only be withdrawn by proving identity through a zero-knowledge face verification process.
- 🔐 Zero-Knowledge Face Verification: Users can claim funds by proving their identity through face verification without revealing their actual biometric data
- 💰 Secure Fund Management: Smart contracts hold funds until proper face verification is completed
- 🌐 Privacy-Preserving: No biometric data is stored on-chain, only cryptographic proofs
- ⚡ Efficient Verification: Fast on-chain verification using Noir zero-knowledge circuits
- 🔒 Trustless Architecture: No central authority required for identity verification
- Deposit: Users deposit funds into a ZFace smart contract with their face encoding stored as public inputs
- Face Registration: A 128-dimensional face encoding is generated and stored in the contract
- Claim Process: To withdraw funds, users must provide a zero-knowledge proof that their current face matches the registered encoding
- Verification: The smart contract verifies the proof on-chain using the Noir verifier
- Fund Release: If verification succeeds, funds are automatically transferred to the claimant
This system ensures that only the rightful owner with the correct face can claim the funds, while maintaining complete privacy of biometric data through zero-knowledge proofs.
Frontend
Smart Contracts
Zero Knowledge
ZFace Cash is built with cutting-edge zero-knowledge technology:
- Noir Circuits: Custom zero-knowledge circuits for face verification using the Noir programming language
- Barretenberg Backend: High-performance proof generation and verification using the Barretenberg proving system
- Smart Contract Integration: Solidity contracts that verify proofs on-chain and manage fund distribution
- Face Encoding: 128-dimensional face embeddings for robust biometric verification
- Threshold Verification: Configurable similarity thresholds for face matching accuracy
The system leverages advanced cryptographic techniques to ensure that users can prove their identity without compromising their privacy or security.
- Take a photo
- Run a facial recognition model (e.g. FaceAPI) → get embedding
- Derive one-time address (e.g. via hash of
(embedding + salt)) - Send funds to that one-time address
- App runs the same model on selfie
- Embedding matches → Calculates a proof of identity compared to the sender picture
- Claims funds from one-time wallet → forwards to their real wallet
- The one-time wallet is “emptied” and marked as burned
- Events: Send POAPs/tokens by scanning people, even if they don’t have wallets
- Street artists / musicians: Let people tip others without needing contact
- Allow and onboard more people onchain
This project uses Pnpm as package manager & hardhat for smart contracts
npm install -g pnpm
npm install --save-dev hardhat Install my-project with pnpm
pnpm install To run tests, run the following command
npx hardhat compile
npx hardhat testClone the project
git clone https://github.com/anii76/zkhack-berlin.gitSetup the network to deploy into in hardhat.config.ts.
npx hardhat ignition deploy ignition/modules/Deployer.ts --network arbitrumSepolia --verify --deployment-id testnet-deployment-1
npx hardhat ignition deploy ignition/modules/ZFace.ts --network arbitrumSepolia --verify --deployment-id testnet-deployment-2- Zero-knowledge face verification circuit
- Smart contract integration
- Basic frontend interface
- Multi-chain deployment
- Advanced face recognition algorithms
- Mobile app integration
- Batch verification support
Contributions are always welcome!
Distributed under the no License. See LICENSE.txt for more information.