Zero-Knowledge Decentralized Identity (DID) & Soulbound Reputation Protocol on Stellar (Soroban)
Self-Sovereigndid:stellar:Identity, Noir ZK Credentials, and Compliance-First Merkle ASP Sets
stellar-zkident is a privacy-preserving decentralized identity (DID) and on-chain reputation protocol built natively on Soroban, Stellar's smart contract engine.
It establishes an identity layer for the Stellar ecosystem: allowing users to anchor self-sovereign DIDs (did:stellar:<address>), prove real-world credentials (Age, KYC level, Residency, Employment, ASP Set Membership) via Noir Zero-Knowledge Proofs, and earn non-transferable Soulbound Reputation NFTs β all while maintaining complete data privacy and regulatory compliance.
- πͺͺ
did:stellar:Method Specification: On-chain DID registry anchoring W3C-compliant DID documents directly to Stellar account keys without external blockchain bridges. - π Noir ZK Credential Proofs: Users generate ZK proofs locally using Noir circuits. Prove age
$\ge 18$ , KYC tier$\ge \text{Silver}$ , or country residency without revealing birthdates, personal names, or exact locations. - π Soulbound Reputation Tokens (SBTs): Non-transferable on-chain reputation score minted per DID. Transfers are strictly blocked at the contract level.
- βοΈ Association Set Provider (ASP) Merkle Sets: Compliance-first ZK architecture allowing regulatory approved entities (ASPs) to maintain Merkle roots of verified users on-chain. Users prove Merkle membership without revealing their specific index.
- π Soroban Composability Primitive: Any external DeFi protocol or DAO contract on Soroban can call
has_credential(address, type)oris_active(address)in a single line of Rust.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT SIDE β
β β
β User Private Data (Birthdate, KYC Level, Merkle Path) β
β β β
β βΌ β
β [Noir Circuits] (age_proof, kyc_tier_proof, membership_proof) β
β β β
β βΌ β
β UltraPlonk ZK Proof Generation (Barretenberg) β
βββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SOROBAN CONTRACT LAYER β
β β
β credential_verifier βββββββΊ did_registry β
β β (did:stellar:<address> status check) β
β β β
β βββββββββββββββββββΊ asp_registry β
β β (Verify Merkle root for compliance) β
β β β
β βββββββββββββββββββΊ reputation_nft β
β (Mint/Update Soulbound Score) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Each DID is uniquely generated from a Stellar public address:
Proves user birth year
Registers a new DID document. Owner authentication required (owner.require_auth()).
Composable query returning true if an address has an active DID record.
verify_credential_proof(env: Env, subject: Address, credential_type: CredentialType, _proof: Bytes, _public_inputs: Vec<BytesN<32>>, issuer: Address, expires_at: u64) -> bool
Verifies ZK proof, checks trusted issuer status, validates DID registration, and records credential on-chain.
Single-line composable helper callable by any external Soroban smart contract to check user credential status.
git clone https://github.com/stellar-zklab/stellar-zkident.git
cd stellar-zkident
# Run unit tests across all 4 contracts
cargo test --all --features testutils
# Compile release WASM binaries
cargo build --release --target wasm32v1-nonestellar-zkident is an open-source identity primitive for Stellar. We welcome contributions from developers, security auditors, and identity protocols!
- Explore Issues: Check out open tasks tagged
good-first-issueorhelp-wanted. - Fork & Branch: Create a feature branch (
git checkout -b feat/your-feature). - Test Your Changes: Ensure all unit tests pass (
cargo test --all --features testutils). - Submit a Pull Request: Open a PR with a clear summary of your changes.
Licensed under Apache License 2.0. See LICENSE.