Protocol Architecture
CrowdProof is a hybrid on-chain/off-chain system. Computation-heavy reputation scoring runs off-chain for speed and cost efficiency, while proofs, identities, and governance live on-chain for trustlessness.
System Layers
┌─────────────────────────────────────────────────────┐
│ Applications │
│ DeFi · Lending · DAOs · Marketplaces │
├─────────────────────────────────────────────────────┤
│ REST API │
│ Scores · Proofs · Identity · Compliance │
├──────────────────┬──────────────────────────────────┤
│ Off-Chain │ On-Chain │
│ │ │
│ Scoring Engine │ DIDRegistry │
│ ML Models │ ReputationOracle │
│ Data Indexers │ CredentialVerifier │
│ SQL Database │ PaymentEscrow │
│ WebSocket Hub │ GovernanceToken │
│ Webhook System │ │
├──────────────────┴──────────────────────────────────┤
│ Blockchain Data Sources │
│ Ethereum · Polygon · Arbitrum · Optimism │
└─────────────────────────────────────────────────────┘
Component Responsibilities
Off-Chain (Backend API)
| Component | Purpose |
|---|---|
| Scoring Engine | Calculates reputation scores from on-chain activity data |
| Data Indexers | Monitor blockchain events and update the scoring database |
| SQL Database | Stores DIDs, credentials, scores, disputes, API keys |
| WebSocket Hub | Pushes real-time score updates to connected clients (SignalR) |
| Webhook System | Delivers HTTP callbacks when scores change |
| Compliance Module | Privacy-preserving KYC and sanctions screening |
On-Chain (Smart Contracts)
| Contract | Purpose |
|---|---|
| DIDRegistry | Registers and resolves Decentralized Identifiers |
| ReputationOracle | Stores score commitments and verifies ZK proofs |
| CredentialVerifier | Validates Verifiable Credentials on-chain |
| PaymentEscrow | Handles payments for premium API access |
| GovernanceToken | DAO governance for protocol parameter changes |
Data Flow
- Indexers continuously scan supported chains for DeFi, governance, and NFT activity
- Scoring Engine processes raw activity through ML models to produce normalized 0–1000 scores
- Scores are committed to the ReputationOracle contract as Merkle roots
- Users query scores via the REST API or directly from the oracle contract
- ZK Proofs allow selective disclosure (e.g., "score > 700") without revealing the actual score
- WebSockets and Webhooks notify subscribers of score changes in real-time
Authentication Model
┌──── API Key (X-API-Key header)
│ For: queries, batch, webhooks
Client ─────────────┤
│
└──── JWT (Bearer token)
For: DID updates, credentials, billing
Source: SIWE (Sign-In with Ethereum)
Deployment Topology
| Component | Platform | Region |
|---|---|---|
| Backend API | Azure App Service | East US 2 |
| Website | Azure Static Web App | Global CDN |
| Portal | Azure Static Web App | Global CDN |
| Database | Azure SQL | East US 2 |
| Smart Contracts | EVM-compatible chains | Decentralized |