Blockchain & Contracts

AnyLayer uses a multi-contract architecture currently deployed on Sepolia Testnet. Each contract serves a specific purpose in the decentralized identity and reputation ecosystem.

Note: All contracts are currently deployed on Sepolia Testnet (Chain ID: 11155111) only. Mainnet and multi-chain deployments are planned for future phases.


1. IdentitySBT Contract

Purpose: Manages AnyLayer identity NFTs with a unique TRADEABLE → SOULBOUND lifecycle.

What it does:

  • Mints identity NFTs with .zks names (e.g., alice.zks)

  • Handles identity activation that converts NFTs from tradeable to soulbound (non-transferable)

  • Manages primary identity designation for users with multiple identities

  • Stores identity metadata including home chain, expiration, and activation status

  • Enforces name uniqueness and handles name-to-address resolution

Contract Address: 0x8962C6eDb0d1dFca82E38524478ae1Fd0DD8f900


2. ScoreRegistry

Purpose: On-chain storage for trust scores with privacy-preserving commitments.

What it does:

  • Stores current trust scores for each identity (0-9000 range)

  • Maintains score update timestamps for decay calculations

  • Generates cryptographic commitments (hashes) for privacy-preserving verification

  • Allows public verification of scores without revealing exact values

  • Enforces minimum update intervals to prevent spam

  • Syncs with off-chain scoring engine daily

Contract Address: 0xE1FbAeBa26DEC646570E2DE2a5edd5603664D10E


3. ScoreCalculator

Purpose: Calculates trust scores based on on-chain activities with protocol and token multipliers.

What it does:

  • Calculates scores from wallet age, transaction volume, and activity diversity

  • Applies protocol-specific multipliers (e.g., higher weights for blue-chip DeFi)

  • Applies token-specific multipliers based on liquidity and type

  • Tracks activity types: swapping, liquidity provision, staking, governance, NFT trading

  • Enforces volume tiers for score scaling

  • Integrates with ProtocolRegistry and TokenRegistry for dynamic scoring

Contract Address: 0x1b60ec1BaE2FE7faE7d5acDd6e5726c0C9Da0D51


4. AchievementRegistry

Purpose: Manages achievement definitions, granting, and on-chain verification.

What it does:

  • Creates and stores achievement definitions (name, description, rarity, score reward)

  • Grants achievements to users with on-chain verification

  • Tracks achievement supply (unlimited or capped)

  • Categorizes achievements: Platform, Protocol, Developer, Community, Milestone, Special

  • Assigns rarity levels: Common, Uncommon, Rare, Epic, Legendary

  • Supports automated and manual achievement claims

  • Integrates with identity system for eligibility checks

Contract Address: 0x800A9a6D11a5d3DDd46f4b3D4B0B0CC8Efe4806c


5. AttestationHub

Purpose: Stores attestations (third-party verifications) with schema support.

What it does:

  • Creates attestations from approved attesters

  • Stores attestation data with cryptographic payload hashes

  • Supports expiration timestamps for time-limited attestations

  • Enables attestation revocation by attester or subject

  • Organizes attestations by schema (e.g., "achievement", "kyc", "skill")

  • Implements rate limiting to prevent spam

  • Provides emergency pause mechanism for security

Attestations are stored for future integrations but don't contribute to the trust score system.


6. TrustRegistry

Purpose: Central registry managing attesters, scoring modules, and identity-owner mappings.

What it does:

  • Maintains allowlist of approved attesters

  • Registers and activates scoring modules with versioning

  • Maps identity token IDs to owner addresses for fast lookups

  • Implements timelock for critical operations (24-hour delay)

  • Manages operator roles for administrative functions

  • Provides attester and module enumeration

  • Serves as the foundation for the trust layer architecture


7. ZKVerifier

Purpose: Verifies zero-knowledge proofs for privacy-preserving score verification.

What it does:

  • Verifies ZK proofs for different proof types:

    • SCORE_EXACT: Prove exact score value

    • SCORE_RANGE: Prove score is within a range

    • SCORE_THRESHOLD: Prove score is above/below a threshold

    • IDENTITY_PROOF: Prove identity ownership

    • TRUST_THRESHOLD: Prove trust score above threshold

    • TRUST_MEMBERSHIP: Prove membership in trust tier

  • Stores verification keys for each proof type

  • Tracks verified proofs to prevent replay attacks

  • Enforces proof validity periods (default 1 hour)

  • Enables users to prove reputation without revealing exact scores

Contract Address: 0xdaDc8e42ad4adDd04E31eAc7AA9DbdF7bB1F1C7e


8. ProtocolRegistry

Purpose: Registry of whitelisted DeFi protocols with scoring parameters.

What it does:

  • Registers supported protocols (DEX, Lending, Staking, NFT, Governance, Bridge, etc.)

  • Assigns risk levels: Very Low (blue chip), Low, Medium, High, Very High

  • Configures score multipliers per protocol (in basis points, 10000 = 1x)

  • Stores protocol metadata: name, description, website, tags

  • Enables/disables protocols for scoring

  • Supports multi-chain protocol deployments

Contract Address: 0x9C9fA7C2B1A9e5Cb6B7F5dEaC0a4c7F8bC1e89dA


9. TokenRegistry

Purpose: Registry of supported tokens with scoring parameters and liquidity tiers.

What it does:

  • Registers tokens with metadata: symbol, name, decimals

  • Categorizes tokens: Stablecoin, Blue Chip, DeFi, Governance, Meme, NFT, Derivative

  • Assigns liquidity tiers (Tier 1: >$1B, Tier 2: $100M-$1B, etc.)

  • Configures score multipliers per token

  • Marks stablecoins for special handling

  • Integrates with CoinGecko for price/liquidity data

  • Supports multi-chain token deployments

Contract Address: 0xbB3E5F6C9a2C7dF8E1bA4c5D6e7F8a9B0c1d2e3F


10. Blockchain Network

Current Deployment: Sepolia Testnet (Chain ID: 11155111)

All AnyLayer smart contracts are currently deployed on the Ethereum Sepolia testnet. This allows for testing and development before mainnet launch.

Sepolia Testnet Details:

Future Plans: Multi-chain deployment to Ethereum Mainnet, Base, Polygon, Arbitrum, Optimism, and other L1/L2 networks is planned for post-launch phases.

Last updated