Credence is an on-chain economic identity protocol built on the Stellar network.
It enables individuals and organizations to establish credibility by staking USDC as a programmable reputation bond.
Unlike social or NFT-based identity systems, Credence ties reputation to capital commitment. Trust becomes economically backed, publicly verifiable, and enforceable through smart contracts.
The protocol introduces Trust-as-a-Service infrastructure for the Stellar ecosystem.
Existing Web3 identity systems suffer from structural weaknesses:
- Social reputation without economic accountability
- NFT-based identity without capital commitment
- Easily forgeable credibility signals
- No slashing or enforcement mechanisms
- No programmable trust layer on Stellar
There is no standardized mechanism where credibility is tied to staked capital and enforceable on-chain.
Credence introduces a programmable reputation bond model:
- Users lock USDC into a smart contract
- The bond represents economic commitment
- Reputation score increases with bond size and duration
- Misconduct can trigger slashing
- Third-party attestations enhance credibility
The protocol provides a quantifiable, enforceable trust metric backed by capital.
flowchart TD
A[User Wallet] --> B[Credence Smart Contract]
C[Verifier / DAO] --> B
B --> D[Stellar Network]
D --> E[Horizon Listener]
E --> F[(PostgreSQL Database)]
F --> G[Reputation Engine]
G --> H[Public API]
H --> I[External Platforms]
Responsibilities:
- Lock USDC bonds
- Track bond duration
- Maintain slashing rules
- Emit trust events
- Store core identity metadata
- Allow optional attestations
Contract Data Model (Conceptual)
struct IdentityBond {
identity: Address,
bonded_amount: i128,
bond_start: u64,
bond_duration: u64,
slashed_amount: i128,
active: bool,
}
struct Attestation {
verifier: Address,
identity: Address,
timestamp: u64,
weight: u32,
}Core Contract Methods
create_bond()increase_bond()withdraw_bond()slash_bond()add_attestation()revoke_attestation()get_identity_state()
sequenceDiagram
participant User
participant SmartContract
participant Stellar
participant Backend
User->>SmartContract: create_bond()
SmartContract->>Stellar: Lock USDC
Stellar-->>Backend: Emit bond event
Backend->>Database: Record identity state
sequenceDiagram
participant Verifier
participant SmartContract
participant Governance
participant Stellar
Verifier->>SmartContract: request_slash()
Governance->>SmartContract: approve_slash()
SmartContract->>Stellar: Reduce bonded amount
Slashing requires:
- Governance approval
- Multi-signature verification
- Evidence submission reference
Reputation Score = f(bond_amount, bond_duration, slashing_history, attestations)
Example:
- Base score from bonded USDC
- Time-weight multiplier
- Negative penalty for slashes
- Attestation weight multiplier
The score is computed off-chain but anchored to on-chain bond data.
- JWT authentication
- Role-based access
- Rate limiting
- API key validation
Responsibilities:
- Fetch on-chain bond data
- Calculate trust score
- Apply time-weight logic
- Process attestation weights
- Maintain score history
- Monitor bond creation
- Detect slashing events
- Track withdrawals
- Sync identity state to database
- Handle dispute submissions
- Manage slashing votes
- Maintain arbitration logs
- Multi-sig coordination
- Retrieve trust score
- Retrieve bond status
- Retrieve attestation count
- Provide verification proof package
erDiagram
IDENTITIES ||--|| BONDS : owns
IDENTITIES ||--o{ ATTESTATIONS : receives
IDENTITIES ||--o{ SLASH_EVENTS : records
IDENTITIES ||--o{ SCORE_HISTORY : tracks
Bond Types:
- Fixed duration bond
- Rolling bond
- Tiered bond (identity levels)
Withdrawal Rules:
- Lock-up period enforcement
- Cooldown window
- Optional early exit penalty
Blockchain:
- Stellar Network
- Soroban Smart Contracts
- Stellar SDK
Backend:
- Go (reference) / TypeScript + Express (this repo)
- PostgreSQL
- Redis (caching and rate limits)
- gRPC (internal services)
Infrastructure:
- Docker
- Kubernetes
- AWS or GCP
Monitoring:
- Prometheus
- Grafana
- Smart contract audit required
- Overflow-safe arithmetic
- Governance-based slashing control
- Multi-signature administrative actions
- Idempotent transaction handling
- Replay attack prevention
- Encrypted evidence storage
- Bond Creation Fee: Percentage of bonded amount
- Slashing Arbitration Fee: Applied during dispute resolution
- API Subscription: Access to trust score endpoints
- Enterprise Tier: Enhanced analytics, bulk identity verification, custom attestation integrations
- Phase 1: Basic bond staking, public trust score API, manual governance slashing
- Phase 2: Weighted attestation system, automated risk scoring, developer SDK integration
- Phase 3: Cross-platform trust portability, DAO governance module, cross-chain compatibility
Credence is not a social identity system. It is a programmable economic accountability protocol.
Target users:
- DAO contributors
- API providers
- Marketplace sellers
- Grant applicants
- Revenue-token issuers
- Web3 infrastructure platforms
This monorepo contains:
| Repository | Description |
|---|---|
| credence-frontend | Web UI for bonding and trust scores |
| credence-backend | API, reputation engine, Horizon sync |
| credence-contracts | Soroban smart contracts (bonds, slashing) |
See each directory’s README for local setup and project details.
Credence introduces an economically backed trust layer for the Stellar ecosystem.
By combining:
- USDC staking
- Soroban smart contracts
- Programmable slashing
- Time-weighted scoring
- Attestation support
The protocol enables a structured and enforceable identity model where credibility is capitalized and verifiable on-chain.