Zero-Knowledge Proof System
CrowdProof uses Groth16 SNARKs to enable selective disclosure of reputation data. A user can prove their score exceeds a threshold without revealing the actual score.
Why ZK Proofs?
| Problem | ZK Solution |
|---|---|
| DeFi protocol needs to verify creditworthiness | User proves "score ≥ 700" without sharing exact score |
| DAO requires governance participation history | User proves "governance score ≥ 500" privately |
| Age-restricted service needs compliance | User proves "age ≥ 21" without sharing birthdate |
How It Works
┌─────────────────┐
│ CrowdProof API │
│ (Prover) │
└────────┬─────────┘
│
┌───────────────────────┼───────────────────────┐
│ │ │
1. Score Lookup 2. Circuit Eval 3. Proof Gen
(from DB) (score ≥ threshold?) (Groth16 SNARK)
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────▼──────┐
│ Proof │
│ (bytes) │
└─────┬──────┘
│
┌───────────────┼───────────────┐
│ │
Off-Chain Verify On-Chain Verify
POST /verify ReputationOracle
(API endpoint) .verifyProof()
Proof Circuit
The circuit enforces:
- Score inclusion — The claimed score exists in the Merkle tree committed on-chain
- Threshold comparison — The score is ≥ the stated threshold
- Freshness — The score was calculated within a configurable time window
Public Inputs (visible to verifier)
- Merkle root (from on-chain oracle)
- Threshold value
- Score category
- Timestamp bound
Private Inputs (hidden from verifier)
- Actual score
- Merkle proof (inclusion path)
- Wallet address
Supported Proof Types
Score Above Threshold
Proves a wallet's score in a given category meets or exceeds a threshold.
{
"subject": "0x1234...",
"proofType": "ScoreAboveThreshold",
"category": "DEFI_LENDING",
"threshold": 700
}
Age Verification
Proves a user meets a minimum age requirement using ZK, without revealing their actual age or birthdate.
{
"walletAddress": "0x1234...",
"minimumAge": 21
}
Security Properties
| Property | Guarantee |
|---|---|
| Completeness | Valid proofs always verify successfully |
| Soundness | Cannot create valid proofs for false statements |
| Zero-Knowledge | Verifier learns nothing beyond the statement's truth |
| Non-Interactive | Proof generated once, verified any number of times |
| Succinctness | Proof size is constant (~192 bytes) regardless of circuit size |
Trusted Setup
Groth16 requires a one-time trusted setup ceremony:
- Powers of Tau — Phase 1 ceremony with 100+ participants
- Circuit-Specific — Phase 2 ceremony for each proof circuit
- Verification — Setup parameters are publicly auditable
The toxic waste from the ceremony is destroyed. As long as at least one participant was honest, the system is secure.
Performance
| Operation | Time |
|---|---|
| Proof generation | ~2 seconds |
| Off-chain verification | ~10 milliseconds |
| On-chain verification | ~250,000 gas |