Skip to main content

Overview

The ZKScore Achievement Registry is a sophisticated smart contract that manages on-chain achievements across the ZKScore ecosystem. It handles achievement creation, claiming, progress tracking, and verification, enabling gamified reputation building and milestone recognition.
The Achievement Registry is deployed on multiple networks. Always check the latest deployment addresses in the Deployment section before interacting with the contract.

Contract Architecture

Core Components

The Achievement Registry consists of several key components:
  1. Achievement Management: Creation and configuration of achievements
  2. Progress Tracking: Real-time progress monitoring for each user
  3. Claiming System: Secure achievement claiming with verification
  4. Reward Distribution: Automated reward distribution upon claiming
  5. Badge System: NFT badge minting for earned achievements

Achievement Categories

1. DeFi Achievements

Decentralized finance milestones:
  • Liquidity Provider (LP tokens > $10k)
  • Lending Master (lending volume > $100k)
  • Yield Farmer (3+ protocols)
  • DeFi Pioneer (early adopter)
  • Protocol Veteran (1 year+ active)

2. NFT Achievements

NFT ecosystem achievements:
  • NFT Collector (10+ unique NFTs)
  • Blue Chip Holder (rare NFT owner)
  • Active Trader (50+ trades)
  • Creator Support (support 5+ creators)
  • Community Builder (active participation)

3. Social Achievements

Social platform milestones:
  • Profile Complete (100% completion)
  • Content Creator (10+ posts)
  • Community Leader (100+ followers)
  • Engagement Champion (high interaction)
  • Network Builder (connections)

4. Trading Achievements

Trading performance milestones:
  • Day Trader (20+ trades/month)
  • Profitable Trader (positive ROI)
  • Diamond Hands (long-term holder)
  • Risk Manager (diversified portfolio)
  • Market Maker (liquidity provision)

5. Governance Achievements

Governance participation:
  • Active Voter (voted in 10+ proposals)
  • Proposal Creator (created proposal)
  • Delegate (received delegation)
  • Governance Expert (high participation)
  • Community Advocate (forum activity)

6. Gaming Achievements

Gaming milestones:
  • Game Explorer (played 5+ games)
  • High Scorer (top leaderboard)
  • Tournament Winner (won tournament)
  • Asset Collector (rare in-game items)
  • Gaming Veteran (active player)

7. Identity Achievements

Identity verification milestones:
  • Verified Identity (KYC completed)
  • Multi-Chain User (3+ chains)
  • ENS Holder (owns ENS)
  • Early Adopter (early user)
  • Community Member (active 6+ months)

8. Trust Achievements

Trust layer milestones:
  • Trusted Member (5+ attestations)
  • Attestation Giver (issued attestations)
  • Reputation Builder (high trust score)
  • Verified Credential (verified credentials)
  • Trust Network (trust connections)

Contract Addresses

Mainnet Deployments

Testnet Deployments

Achievement Structure

Achievement Data Model

Rarity Levels

Requirement Types

Contract Interface

Core Functions

Events

Progress Tracking

Progress Structure

Automatic Progress Updates

Progress is automatically updated when:
  1. User performs qualifying on-chain action
  2. Score thresholds are met
  3. Time-based milestones are reached
  4. Activity counters increment
  5. Category scores update

Manual Progress Verification

For certain achievements, manual verification is required:

Claiming System

Claim Process

  1. Check Eligibility: Verify user meets requirements
  2. Generate Proof: Create verification proof (if needed)
  3. Submit Claim: Call claimAchievement() with proof
  4. Verification: Contract verifies requirements
  5. Mint Badge: NFT badge minted to user
  6. Distribute Rewards: Points and score boost applied
  7. Emit Events: Claim event emitted

Claim Verification

Reward System

Points Distribution

Score Boost

NFT Badges

Each claimed achievement mints a unique NFT badge:

Gas Optimization

Efficient Storage

Batch Operations

Gas Estimates

Access Control

Roles

Permission Matrix

Integration Examples

Basic Achievement Query

Claim Achievement

Security Considerations

Claim Verification

All claims are verified before processing:

Double-Claim Prevention

Best Practices

For Developers

  1. Verify Progress: Always check progress before claiming
  2. Handle Errors: Implement comprehensive error handling
  3. Monitor Events: Listen for achievement events
  4. Cache Data: Cache achievement metadata locally
  5. Batch Queries: Use batch functions for multiple queries

For Users

  1. Track Progress: Monitor achievement progress regularly
  2. Claim Promptly: Claim achievements when eligible
  3. Verify Requirements: Understand requirements before attempting
  4. Check Gas: Ensure sufficient gas for claiming
  5. Secure Wallet: Keep wallet secure as badges are valuable