Skip to main content

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)

ComponentPurpose
Scoring EngineCalculates reputation scores from on-chain activity data
Data IndexersMonitor blockchain events and update the scoring database
SQL DatabaseStores DIDs, credentials, scores, disputes, API keys
WebSocket HubPushes real-time score updates to connected clients (SignalR)
Webhook SystemDelivers HTTP callbacks when scores change
Compliance ModulePrivacy-preserving KYC and sanctions screening

On-Chain (Smart Contracts)

ContractPurpose
DIDRegistryRegisters and resolves Decentralized Identifiers
ReputationOracleStores score commitments and verifies ZK proofs
CredentialVerifierValidates Verifiable Credentials on-chain
PaymentEscrowHandles payments for premium API access
GovernanceTokenDAO governance for protocol parameter changes

Data Flow

  1. Indexers continuously scan supported chains for DeFi, governance, and NFT activity
  2. Scoring Engine processes raw activity through ML models to produce normalized 0–1000 scores
  3. Scores are committed to the ReputationOracle contract as Merkle roots
  4. Users query scores via the REST API or directly from the oracle contract
  5. ZK Proofs allow selective disclosure (e.g., "score > 700") without revealing the actual score
  6. 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

ComponentPlatformRegion
Backend APIAzure App ServiceEast US 2
WebsiteAzure Static Web AppGlobal CDN
PortalAzure Static Web AppGlobal CDN
DatabaseAzure SQLEast US 2
Smart ContractsEVM-compatible chainsDecentralized