Skip to Content
ConceptsArchitecturePrivacy Model: Public and Private States

Privacy Model: Private vs Public State

Veil’s architecture cleanly separates what is private from what is verifiable on-chain:

Private state

Completely off-ledger, witness-managed — never disclosed on-chain.

FieldDescription
creditScores[veilId]Full credit score struct per user
scoreAccumulations[veilId]

Score accumulators (repayment counts, liquidation points, etc.) per user

secretKeyUser’s secret key used to derive their Veil ID
ownershipSecret

Secondary secret used to prove NFT ownership during verification

Public state

On-chain — verifiable by anyone, but only updated by Veil’s smart contracts.

FieldDescription
creditScoreCommitmentsHistoric Merkle tree of credit score commitments
scoreAccumulatorCommitmentsHistoric Merkle tree of score accumulator commitments
nftRegistryMap of Veil ID → PoT NFT metadata
issuersMap of issuer public key → issuer metadata
adminsSet of admin public keys
superAdminSuper admin public key
protocolConfigTier thresholds and NFT validity settings
scoreConfigScore formula weights and bounds
processedScoreEventsReplay-protection set for scoring events
usedVerificationChallengesReplay-protection set for NFT verification challenges
issuerTrustWeightsConfigurable per-issuer penalty multipliers
elapsedEpochCounter of protocol epochs elapsed since deployment
tokenIssueCounterMonotonic NFT token ID counter

This split enables a critical guarantee: anyone can verify that a PoT NFT is backed by a valid on-chain commitment without ever seeing the underlying score data.

This is the core of Veil’s privacy model, ensuring users can prove their creditworthiness without revealing sensitive information on-chain.

Last updated on