BenchmarksStack Ranking
APIsPricingDocsWhite PaperTokenBlogAboutSecurity Demo
Log InGet API Key
Blockchain · 5 min read

Building Identity Attestation on Solana:
A Technical Guide

How to implement identity attestation and verification on Solana.

On-chain
Verified
SBT
Minting
PQ
Signatures
<1ms
Verify

The identity layer of web3 remains its most conspicuous gap. DeFi protocols collectively manage hundreds of billions in assets, yet most cannot distinguish a verified institution from a throwaway wallet. Solana's throughput characteristics — 400ms block times, sub-cent transaction fees, and a theoretical ceiling north of 50,000 TPS — make it the strongest candidate for anchoring identity attestations on-chain. This guide walks through the architecture, cryptographic underpinnings, and practical implementation patterns for building a production-grade identity attestation system on Solana, with particular attention to how post-quantum authentication fits into the pipeline.

Why On-Chain Attestation Matters

Traditional identity verification produces a binary result that lives in a silo: a KYC provider tells a single exchange that a user is cleared. That clearance is non-portable, non-verifiable by third parties, and instantly stale. On-chain attestation inverts this model. A cryptographic claim — signed by an issuer and anchored to a blockchain — becomes a persistent, publicly verifiable credential that any smart contract can read without calling back to the issuer.

The benefits compound in DeFi. Lending protocols can gate under-collateralized loans on verified creditworthiness. DAOs can enforce one-person-one-vote governance. NFT marketplaces can screen for sanctioned wallets before settlement. All of these checks become composable: a single attestation, minted once, can satisfy constraints across dozens of protocols simultaneously.

Key design principle: Attestations should be non-transferable (soulbound), carry an expiration timestamp, and include a revocation mechanism. Without all three properties, the credential is either gameable, permanently stale, or irrevocable — none of which are acceptable for regulated use cases.

Architectural Overview

The attestation pipeline consists of four discrete stages: off-chain identity verification, cryptographic attestation generation, on-chain minting, and on-chain verification at the point of access.

StageLocationLatencyDescription
1. Identity VerificationOff-chainVariableKYC/biometric check via FHE-encrypted matching
2. Attestation GenerationOff-chain~42 µsFHE + ZKP + Dilithium signature bundle
3. SBT MintingOn-chain (Solana)~400 msNon-transferable token with attestation metadata
4. Access Gate CheckOn-chain (Solana)~2 msSmart contract reads SBT, checks expiry and revocation

Stage 2 is where H33's stack provides the critical advantage. The full authentication pipeline — BFV fully homomorphic encryption for biometric matching, a ZKP lookup proof cached via in-process DashMap at 0.085 µs per query, and a CRYSTALS-Dilithium post-quantum signature for attestation binding — completes in approximately 42 microseconds per authentication. At scale, this translates to 1.595 million authentications per second on a single Graviton4 instance, meaning the attestation generation step never becomes the bottleneck, even under extreme DeFi event-driven load.

Soulbound Token Design

Solana's token architecture requires a deliberate approach to soulbinding. Unlike ERC-5192 on Ethereum, Solana lacks a native non-transferable standard. The most robust pattern is to use a Program Derived Address (PDA) as the token account authority, with the program logic explicitly rejecting all transfer instructions.

// Anchor program: reject transfers on attestation token
pub fn transfer_hook(ctx: Context<TransferHook>) -> Result<()> {
    // Attestation tokens are soulbound; all transfers rejected
    return Err(AttestationError::NonTransferable.into());
}

// Mint attestation after H33 verification
pub fn mint_attestation(
    ctx: Context<MintAttestation>,
    attestation_hash: [u8; 32],   // SHA3-256 of H33 attestation bundle
    dilithium_sig: Vec<u8>,       // ML-DSA-65 signature
    expiry: i64,                   // Unix timestamp
) -> Result<()> {
    let attestation = &mut ctx.accounts.attestation;
    attestation.subject = ctx.accounts.subject.key();
    attestation.issuer = ctx.accounts.issuer.key();
    attestation.hash = attestation_hash;
    attestation.signature = dilithium_sig;
    attestation.issued_at = Clock::get()?.unix_timestamp;
    attestation.expires_at = expiry;
    attestation.revoked = false;
    Ok(())
}

The attestation_hash field stores a SHA3-256 digest of the full H33 attestation bundle, which includes the FHE match result, the ZKP proof, and the Dilithium signature. Any verifier can reconstruct the hash from the off-chain bundle and confirm it matches the on-chain record without the program needing to store the full proof.

Revocation and Expiry

Revocation is handled by a dedicated instruction callable only by the original issuer. The program checks that ctx.accounts.issuer.key() matches the stored issuer public key, then sets the revoked flag. Downstream contracts must check both revoked == false and Clock::get()?.unix_timestamp < expires_at before granting access. Failing to check expiry is the single most common implementation error in attestation systems — expired credentials that remain honored are functionally equivalent to no verification at all.

Post-Quantum Attestation Signatures

Every attestation issued through H33 is signed with CRYSTALS-Dilithium (ML-DSA-65), a lattice-based signature scheme standardized by NIST in FIPS 204. This is a deliberate architectural choice: attestations anchored on Solana today will remain verifiable after the arrival of cryptographically relevant quantum computers, which are projected within the next 10 to 15 years. Ed25519 signatures — Solana's native scheme — will not survive this transition.

"The attestation signature is the longest-lived component of the system. Blocks finalize in milliseconds, but an identity credential may be verified for months or years. Post-quantum signatures are not a future concern — they are a present-day architectural requirement."

H33's attestation pipeline produces a nested signature: the inner layer is the Dilithium signature over the attestation payload, and the outer layer is the standard Ed25519 signature required by Solana's runtime for transaction validity. This hybrid approach ensures compatibility with existing Solana validators while providing quantum resistance for the attestation content itself.

Performance Under Load

Identity attestation systems face a unique scaling challenge: demand is bursty. A DeFi protocol launching a new lending pool may see tens of thousands of attestation requests within a single minute as users rush to qualify. The off-chain verification layer must absorb these spikes without degrading latency.

ComponentPer-Auth LatencyPQ-Secure
BFV FHE biometric batch (32 users)~1,109 µs (~34.7 µs/user)Yes (lattice)
ZKP lookup (DashMap in-process)0.085 µsYes (SHA3-256)
Dilithium sign + verify~244 µs (batched: ~7.6 µs/user)Yes (ML-DSA)
Full pipeline per auth~42 µsYes

The BFV FHE layer uses SIMD batching to pack 32 users into a single ciphertext (4,096 polynomial slots divided by 128 biometric dimensions), which is why the per-user cost drops so dramatically at batch boundaries. In production on Graviton4 hardware with 96 parallel workers, H33 sustains 2,172,518 authentications per second — more than sufficient to absorb any realistic DeFi attestation surge without queuing.

Smart Contract Access Gating

Once attestations live on-chain as soulbound tokens, any Solana program can gate functionality on their presence. The verification logic is straightforward: deserialize the attestation PDA, confirm the issuer matches a trusted set, verify the token is neither expired nor revoked, and proceed.

pub fn verify_attestation(attestation: &Attestation) -> Result<()> {
    require!(!attestation.revoked, GateError::Revoked);
    require!(
        Clock::get()?.unix_timestamp < attestation.expires_at,
        GateError::Expired
    );
    require!(
        TRUSTED_ISSUERS.contains(&attestation.issuer),
        GateError::UntrustedIssuer
    );
    Ok(())
}

This pattern adds roughly 2,000 compute units to a Solana transaction — negligible against the 200,000 CU default budget. Multiple attestations from different issuers can be composed conjunctively (require all) or disjunctively (require any), enabling sophisticated access policies without additional on-chain state.

Enterprise Deployment Considerations

For organizations deploying attestation infrastructure at scale, three operational concerns dominate:

Cross-Chain Considerations

Attestations minted on Solana can be bridged to other chains via Wormhole or other messaging protocols, but the bridge introduces a trust assumption. The strongest approach for multi-chain deployments is to issue native attestations on each target chain from the same off-chain verification pipeline, using the same Dilithium key pair. This avoids bridge dependency while maintaining cryptographic consistency across chains.

Production tip: Set attestation expiry to 90 days for individual users and 30 days for institutional accounts. Shorter windows reduce the blast radius of a compromised issuer key and force periodic re-verification, which is generally required by compliance frameworks anyway.

Solana's combination of speed, cost, and programmability makes it the natural home for on-chain identity attestation. When paired with H33's post-quantum authentication stack — BFV FHE for private biometric matching, ZKP for proof integrity, and Dilithium for quantum-resistant signatures, all completing in under 42 microseconds per authentication — the result is an identity layer that is fast enough for DeFi, private enough for regulation, and durable enough to outlast the classical cryptographic era.

Ready to Go Quantum-Secure?

Start protecting your users with post-quantum authentication today. 1,000 free auths, no credit card required.

Get Free API Key →

Build With Post-Quantum Security

Enterprise-grade FHE, ZKP, and post-quantum cryptography. One API call. Sub-millisecond latency.

Get Free API Key → Read the Docs
Free tier · 10,000 API calls/month · No credit card required
Verify It Yourself