SOVA Protocol

Technical Specification & System Architecture

SOVA Protocol Architecture

A comprehensive guide to SOVA Protocol's trust boundaries, smart contract registry, salted cryptographic attestations, SQLite event indexer, and Whitechain dApp integration paths.

1. Overview & Ecosystem Position

SOVA Protocol operates as the verifiable reputation layer for Whitechain L2. While WhiteBIT and WB Soul provide the foundation for identity verification (Who is this user?), SOVA evaluates onchain behavior (How has this identity performed?) and publishes machine-readable scores directly onto Whitechain Sepolia.

ECOSYSTEM STACK PIPELINE
WhiteBIT (5M+ Users) ➔ Whitechain (Distribution L2) ➔ WB Soul (Identity Anchor) ➔ SOVA Engine (Reputation Primitive) ➔ Whitechain dApps

2. Trust Boundaries & Isolated Signing (Phase 1.3)

To protect attestation integrity, the pilot architecture strictly separates three processes so that private keys are never exposed to untrusted environments or request files:

01. PreparerUnsigned RequestCreates synthetic disclosures, random salts, and commitment hashes without access to any private keys.
02. Issuer SignerEIP-712 SignerValidates disclosures via encrypted keystore, refreshes timestamps, and signs exact EIP-712 requests.
03. RelayerUntrusted SubmitterRecovers signer from signature, checks skew (<240s), and submits `attestBySig` without ability to alter fields.

3. Onchain Smart Contracts (Whitechain Sepolia)

The protocol is governed by three primary smart contracts deployed and verified on Whitechain Sepolia (Chain ID 1874/1875):

SovaAttestationRegistry.solAuthoritative storage for salted attestation hashes, score commitments, and getScore(soulId) query views.
0x953a4edC84CEBdC113688310F54adce6Dc2c8bCf
SovaTimelockMultisig.solTimelocked multi-signature governance controlling registry parameters, issuer permissions, and emergency pauses.
0x9B1d...a341
SovaNetworkProof.solVerifies EIP-712 ECDSA proofs and relay authorizations from trusted Pilot Issuers.
0xC2f4...8b09

4. Privacy & Salted Cryptographic Attestations

Raw transaction logs, individual loan balances, and sensitive financial metrics remain 100% offchain in local SQLite indexes. Only salted cryptographic commitment hashes are written onchain:

// Commitment Formula
bytes32 commitment = keccak256(
    abi.encodePacked(soulId, rawMetricsHash, salt, nonce)
);

// Onchain Verification
function verifyAttestation(
    uint256 soulId, 
    bytes32 rawMetricsHash, 
    bytes32 salt
) external view returns (bool) {
    return registry.commitments(soulId) == keccak256(abi.encodePacked(soulId, rawMetricsHash, salt));
}

5. Persistent Indexer & Query Service (Phase 1.2)

The Node.js indexer syncs registry logs into a local SQLite database (`indexer-data/whitechain-sepolia.sqlite`). Each sync automatically rewinds 20 blocks to purge reorganized events, fetches in 5,000-block chunks, and transactionally rebuilds projections.

• Reorg Safety: 20-block automatic rewind window
• Data Storage: Local Node.js experimental SQLite module
• Authoritative Validation: Every query result is re-checked against SovaAttestationRegistry onchain state before returning.

6. Observability & Rate Limiting Controls (Phase 1.5)

  • X-Request-Id: Traced on every API request; request bodies & salts are never logged.
  • Health Endpoint (/health): Returns HTTP 503 if indexer lag exceeds `SOVA_MAX_INDEX_LAG_BLOCKS` or SQLite integrity check fails.
  • Rate Limiting (/v1/*): 60 requests per minute per socket connection, returning HTTP 429 Retry-After.
  • Metrics (/metrics): Exposes Prometheus-formatted counters for confirmed index lag without exposing subject addresses.
Ready to integrate?
Explore the smart contract codebase or API specifications.
API Reference →View GitHub ↗