Reusable Zero-Knowledge Age Credentials on Stellar
ProofPass is a zero-knowledge identity validation and credential issuance protocol built for the Stellar network using Soroban smart contracts. It enables users to verify their age eligibility (e.g., proving they are at least 18 years old) using zk-SNARKs, and receive a secure, privacy-preserving, reusable on-chain credential without exposing their actual date of birth or age.
Traditional age verification processes (e.g., signing up for age-restricted services, token launches, or gating apps) require users to upload government IDs or enter their exact birthdate. This approach has critical drawbacks:
- Privacy Invasiveness: Service providers learn the user's exact age, full name, address, and document numbers.
- Centralized Data Storage: Storing sensitive personal identification information (PII) creates honeypots for hackers and data breaches.
- Friction: Users must undergo repetitive verification flows for every new application.
ProofPass solves this by decoupling eligibility verification from identity disclosure:
- Zero-Knowledge Age Proof: Users generate a mathematical proof locally in their browser using a private input (their age) and a public policy input (the threshold, e.g., 18).
- On-Chain Verification & Issuance: A Soroban smart contract validates the zk-SNARK proof. If valid, the contract issues an on-chain, reusable credential bound to the user's Stellar address.
- Instant Verification: Other Web3 apps can query the contract instantly to check if the user is verified, removing the need for a secondary KYC/ID check.
+------------------+ +------------------------+ +-------------------------+
| | | | | |
| Private Input | -------->| Local zk-SNARK Proof | -------->| Freighter Wallet |
| (User's Age) | | (snarkjs in Browser) | | (Transaction Sign) |
| | | | | |
+------------------+ +------------------------+ +-------------------------+
|
v
+------------------+ +------------------------+ +-------------------------+
| | | | | |
| Query & Verify |<-------- | On-Chain Credential |<-------- | Soroban Contract |
| (Other Web3) | | (Stored on Ledger) | | (Verify & Save State) |
| | | | | |
+------------------+ +------------------------+ +-------------------------+
- ZK Proving System: Circom (circuit logic) & SnarkJS (Groth16 proving/witness calculation in-browser).
- Blockchain Ecosystem: Stellar & Soroban smart contract environment.
- Smart Contract Logic: Rust, using the
soroban-sdkand standard cryptographic pairing checks for BLS12-381. - Wallet Connection: Freighter wallet for Stellar transaction signing.
- Frontend Web Application: React, Vite, CSS, and
@stellar/stellar-sdkfor transaction simulation, assembly (prepareTransaction), and submission.
PROOFPASS/
├── circuits/ # Circom source circuits (age_verifier.circom)
├── contract/ # Soroban verifier contract in Rust (contract/src/lib.rs)
├── proving/ # SNARK keys and proving inputs (zkey, wasm, input.json)
├── frontend/ # Vite + React Web Application
├── tools/ # Rust command-line tools for JSON-to-hex encoding
├── docs/ # Documentation, phase reviews, and screenshots
├── DEMO.md # Detailed walkthrough script for judges
├── Cargo.toml # Cargo workspace configuration
└── LICENSE # MIT license
Execute the integrated script to compile the contract, deploy to Testnet, generate a local proof, and verify on-chain:
./demo.shNavigate to the frontend folder, configure variables, and launch the dev server:
cd frontend
cp .env.example .env
npm install
npm run devRun cargo commands from the workspace root:
cargo check --workspace
cargo test --workspaceTo test all edge cases (happy path, underage rejection, and administrative authorization checks), see our step-by-step instructions in the DEMO.md file.
This project is licensed under the MIT License — see the LICENSE file for details.