Technical Architecture

System Overview

Grape Verification is built on Solana using the Anchor framework. The system consists of on-chain programs, client libraries, and integration tools.

┌─────────────────────────────────────────────────────────┐
│                    User Interface                        │
│              verification.governance.so                  │
└────────────────┬────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────┐
│                   Attestor API                           │
│        Verifies platform identity + submits tx           │
└────────────────┬────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────┐
│            Solana Blockchain (Mainnet)                   │
│         Program: VrFyyRxPoyWxpABp...                    │
│  ┌──────────┐  ┌───────────┐  ┌──────────┐            │
│  │  Space   │─→│ Identity  │─→│   Link   │            │
│  │ Account  │  │  Account  │  │ Account  │            │
│  └──────────┘  └───────────┘  └──────────┘            │
└─────────────────────────────────────────────────────────┘

On-Chain Program

Program Information

  • Program ID: VrFyyRxPoyWxpABpBXU4YUCCF9p8giDSJUv2oXfDr5q

  • Network: Solana Mainnet Beta

  • Framework: Anchor v0.29+

  • Language: Rust

  • Upgradeable: Yes (admin controlled)

Account Structure

Space Account

The root account for each DAO/community.

Seeds: ["space", dao_id]

Size: 144 bytes (8 discriminator + 136 data)

Rent: ~0.0015 SOL (one-time)

Identity Account

One per verified user per platform.

Seeds: ["identity", space_pubkey, platform_seed, id_hash]

Size: 128 bytes (8 discriminator + 120 data)

Rent: ~0.0012 SOL (one-time)

Link Account

One per wallet linked to an identity.

Seeds: ["link", identity_pubkey, wallet_hash]

Size: 88 bytes (8 discriminator + 80 data)

Rent: ~0.0008 SOL (one-time, reclaimable on unlink)

Cryptographic Design

Hash Function: SHA-256

All hashing uses SHA-256 for:

  • Collision resistance

  • One-way property (can't reverse)

  • Industry standard security

Identity Hash

Example:

Wallet Hash

Example:

Salt Generation

Each Space has a unique 32-byte random salt:

Purpose:

  • Prevents rainbow table attacks

  • Makes hashes unique per DAO

  • Can't correlate identities across different DAOs

Instructions

1. initialize_space

Authority: DAO admin

Purpose: Create a new Space account for a DAO

Accounts:

  • space_acct [writable, init] - PDA to create

  • authority [signer] - Becomes space authority

  • payer [signer, writable] - Pays rent

  • system_program - System program

Cost: ~0.0015 SOL (rent) + transaction fee

2. set_space_attestor

Authority: Space authority

Purpose: Update authorized attestor

Accounts:

  • space_acct [writable] - Space to update

  • authority [signer] - Must match space.authority

Cost: Transaction fee only

3. set_space_frozen

Authority: Space authority

Purpose: Emergency freeze/unfreeze

When frozen: No new verifications or links can be created.

4. attest_identity

Authority: Attestor

Purpose: Create or update identity verification

Accounts:

  • space_acct - Space reference

  • attestor [signer] - Must match space.attestor

  • identity [writable, init_if_needed] - Identity PDA

  • payer [signer, writable] - Pays rent if creating

  • system_program

Validation:

  • Attestor must match space.attestor

  • platform_seed must match platform enum

  • Space must not be frozen

Cost: ~0.0012 SOL (if creating new) + transaction fee

5. revoke_identity

Authority: Attestor

Purpose: Revoke verification (doesn't delete links)

Sets verified = false, verified_at = 0, expires_at = 0

Authority: Attestor

Purpose: Link a wallet to an identity

Accounts:

  • space_acct - Space reference

  • attestor [signer] - Must match space.attestor

  • identity - Must be verified and not expired

  • wallet - Wallet to link (UncheckedAccount)

  • link [writable, init_if_needed] - Link PDA

  • payer [signer, writable] - Pays rent

  • system_program

Validation:

  • Attestor authorized

  • Identity exists and verified

  • Not expired (if expiration set)

  • wallet_hash matches SHA256(salt || "wallet" || wallet.key())

  • Space not frozen

Cost: ~0.0008 SOL (if creating new) + transaction fee

Authority: User's wallet

Purpose: User self-links wallet (identity must already be verified)

Difference from link_wallet:

  • wallet must be a Signer (user signs transaction)

  • No attestor signature required

  • Identity must already be verified by attestor

Use case: User wants to link additional wallets after initial verification

Authority: Attestor

Purpose: Unlink a wallet and close the Link account

Accounts:

  • link [writable] - Closed after unlinking

  • recipient [writable] - Receives rent refund

Effect: Link account deleted, rent returned to recipient

Rent Recovered: ~0.0008 SOL

9. admin_close_any

Authority: Admin (hardcoded pubkey)

Purpose: Emergency account closure

Admin pubkey: GScbAQoP73BsUZDXSpe8yLCteUx7MJn1qzWATZapTbWt

Used only for emergency recovery or cleanup.

Events

All state changes emit events for indexing:

Security Model

Trust Assumptions

  1. Attestor Honesty: The attestor correctly verifies platform identities

  2. Platform OAuth: Discord/Telegram OAuth is secure

  3. Wallet Signatures: Users control their private keys

  4. RPC Nodes: Report accurate blockchain state

Attack Vectors & Mitigations

Fake Verifications

Attack: Malicious attestor creates fake verifications

Mitigation:

  • Only one authorized attestor per Space

  • DAO controls who the attestor is

  • Can revoke attestor if compromised

Rainbow Table

Attack: Pre-compute hashes to identify users

Mitigation:

  • Unique random salt per Space

  • Makes pre-computation infeasible

  • Can't correlate across different DAOs

Hash Collision

Attack: Find two inputs with same hash

Mitigation:

  • SHA-256 collision resistance (2^128 operations)

  • Computationally infeasible

Front-running

Attack: Observe pending transaction and submit own first

Mitigation:

  • Idempotent operations (init_if_needed)

  • No financial incentive to front-run

  • PDA derivation ensures uniqueness

Social Engineering

Attack: Trick user into linking wrong wallet

Mitigation:

  • User signs explicit consent message

  • Consent message shows wallet address

  • UI displays clear warnings

Privacy Analysis

What's Private (not on-chain):

  • Actual Discord/Telegram user IDs

  • Actual wallet addresses (in account data)

  • Platform credentials

  • Email addresses

What's Public (on-chain):

  • Hashed identities

  • Hashed wallets

  • Verification timestamps

  • Link existence

Metadata Leakage:

  • Transaction signatures reveal wallet addresses

  • Timing analysis could correlate verifications

  • Number of links per identity is visible

Recommendation: Users who require full anonymity should use separate wallets for verification vs. transactions.

Performance Characteristics

Transaction Costs

Operation
Rent
Transaction Fee
Total

Initialize Space

~0.0015 SOL

~0.000005 SOL

~0.0015 SOL

Attest Identity (new)

~0.0012 SOL

~0.000005 SOL

~0.0012 SOL

Link Wallet (new)

~0.0008 SOL

~0.000005 SOL

~0.0008 SOL

Unlink Wallet

Refund ~0.0008 SOL

~0.000005 SOL

Net: -0.0008 SOL

Total for full verification: ~0.002 SOL (≈ $0.20 at $100/SOL)

RPC Calls

Typical verification check:

  1. getAccountInfo(space) - Get salt

  2. getAccountInfo(identity) - Check verification

  3. getProgramAccounts(links) - Get linked wallets

Total: 3 RPC calls per check

Scalability

Per Space:

  • Unlimited identities

  • Unlimited links per identity

  • No account limits

Network:

  • Solana TPS: ~2,000-3,000 currently

  • Verification tx: ~0.1% of block space

  • Can handle millions of verifications per day

Upgrade Path

Current Version: 2

Version in all accounts: version: u8

Allows:

  • Protocol upgrades without data migration

  • Backwards compatibility

  • Feature flags

Planned Upgrades

V3 (Future):

  • Multi-attestor support

  • Delegated attestation

  • Batch operations

  • Compressed account state

Integration Points

Client Libraries

JavaScript/TypeScript:

Python (planned):

Rust (planned):

RPC Endpoints

Mainnet:

  • https://api.mainnet-beta.solana.com (rate limited)

  • https://mainnet.helius-rpc.com (recommended)

Devnet:

  • https://api.devnet.solana.com

Indexers

Currently being indexed by:

  • Helius

  • TheGraph (planned)

  • Custom indexer (verification.governance.so)

Monitoring

Key Metrics

Health Checks

Deployment

Mainnet Deployment

Program ID: VrFyyRxPoyWxpABpBXU4YUCCF9p8giDSJUv2oXfDr5q

Deployed: February 2026

Upgrade Authority: Grape DAO multisig

Testnet

Devnet Program ID: Contact team for devnet deployment

Future Improvements

Planned Features

  1. Batch Verification: Verify multiple identities in one tx

  2. Delegation: Attestor can delegate to sub-attestors

  3. Self-Verification: Optional self-sovereign mode

  4. Zero-Knowledge: ZK proofs for private verification

  5. Cross-Chain: Verify Solana identities on other chains

Research Areas

  • Decentralized attestor network

  • Machine learning for fraud detection

  • Anonymous credentials

  • Verifiable credentials standard compliance


For implementation questions, see the Developer Guide

Last updated