Skip to main content

Documentation Index

Fetch the complete documentation index at: https://core.anylayer.org/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This example demonstrates integrating ZKScore with DAO governance to track voting participation, reward active governance, and build governance reputation.

DAO Governance Integration

class DAOGovernanceIntegration {
  constructor(daoContract, zkScoreContracts) {
    this.dao = daoContract;
    this.zkScore = zkScoreContracts;
  }
  
  async trackVote(voter, proposalId, support) {
    // Record vote
    await this.dao.castVote(proposalId, support);
    
    // Update governance score
    await this.zkScore.scoreCalculator.updateCategoryScore(voter, 4, 50);
    
    // Track achievements
    const voteCount = await this.dao.getUserVoteCount(voter);
    if (voteCount >= 10) {
      await this.zkScore.achievementRegistry.claimAchievement(300, '0x'); // Active Voter
    }
  }
}

Best Practices

  1. Vote Tracking: Record all governance participation
  2. Proposal Creation: Reward proposal creators
  3. Delegation: Track delegation activities
  4. Long-term Participation: Reward sustained engagement