Skip to main content

Overview

Implement reputation-weighted voting where governance power is influenced by both token holdings and ZKScore reputation.

Implementation

async function calculateVotingPower(voter, proposalId) {
  const tokenVotes = await dao.getVotes(voter);
  const score = await zkScore.getScore(voter);
  
  // Governance score contributes up to 50% bonus
  const reputationBonus = (score.breakdown.governance / 1000) * 0.5;
  
  return tokenVotes * (1 + reputationBonus);
}