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

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);
}