Voting
Participate in governance by casting votes on active proposals.
How Voting Works
Your vote is weighted by your reputation-weighted voting power, not just token holdings:
votingPower = √(tokenBalance) × (1 + fairscore/50)This means:
- A 10,000 token holder with FairScore 78 has ~256 votes
- A 100,000 token holder with FairScore 30 has ~1,095 votes
- The whale has 10× more tokens but only ~4× more votes
Vote Types
| Vote | Value | Effect |
|---|---|---|
| For | 0 | Support the proposal |
| Against | 1 | Oppose the proposal |
| Abstain | 2 | Count toward quorum but not outcome |
Cast a Vote via SDK
import { CredDAOClient, VoteType } from '@creddao/sdk';
const client = new CredDAOClient({ provider, programId });
// Get active proposals
const proposals = await client.getActiveProposals();
// View proposal details
const proposal = proposals[0];
console.log('Title:', proposal.title);
console.log('Voting ends:', new Date(proposal.votingEnd.toNumber() * 1000));
console.log('Current votes:');
console.log(' For:', proposal.forVotes.toNumber());
console.log(' Against:', proposal.againstVotes.toNumber());
// Cast your vote
const result = await client.castVote({
proposalAddress: proposal.publicKey,
vote: VoteType.For,
});
console.log('Vote cast!', result.signature);
console.log('Your voting power:', result.votingPower);Vote via Frontend
Navigate to Proposals
Go to the Proposals page to see all active proposals.
Review Proposal Details
Click on a proposal to see:
- Full description and rationale
- Current vote tally
- Time remaining
- Your voting power
Cast Your Vote
Select For, Against, or Abstain, then confirm the transaction.
Track Results
Watch the live vote tally update after your vote is confirmed.
Check Your Voting Power
Before voting, understand your influence:
const profile = await client.getMemberProfile(wallet.publicKey);
// Get your token balance
const tokenBalance = await connection.getTokenAccountBalance(tokenAccount);
const balance = tokenBalance.value.amount;
// Calculate voting power
const power = client.calculateVotingPower(
Number(balance),
profile.fairscore.toNumber()
);
console.log('Quadratic base:', power.quadraticBase);
console.log('Reputation multiplier:', power.reputationMultiplier.toFixed(2));
console.log('Total voting power:', power.totalPower.toFixed(2));Voting Requirements
Note:
You must meet these requirements to vote:
| Requirement | Description |
|---|---|
| Active Days | 30+ days of account activity |
| Token Balance | Any positive balance |
| Voting Period | Vote must be cast before voting ends |
| No Duplicate | Cannot vote twice on the same proposal |
Quorum Requirements
Proposals require a minimum participation to pass:
// Check quorum status
const proposal = await client.getProposal(proposalAddress);
const totalVotes = proposal.forVotes + proposal.againstVotes + proposal.abstainVotes;
const quorumMet = totalVotes >= proposal.quorumRequired;
console.log('Quorum:', `${totalVotes}/${proposal.quorumRequired}`);
console.log('Quorum met:', quorumMet);Voting Strategies
Strategic Voting
Consider these factors when voting:
- Your FairScore snapshot - Recorded at vote time
- Delegation status - If delegating, your delegate votes for you
- Time remaining - Late votes may miss if voting ends early
Abstain Strategy
Use abstain votes to:
- Count toward quorum without affecting outcome
- Signal presence without strong opinion
- Maintain voting record for FairScore
View Your Vote History
const voteRecords = await client.getVoteRecords(wallet.publicKey);
voteRecords.forEach((record) => {
console.log({
proposal: record.proposal.toBase58(),
vote: ['For', 'Against', 'Abstain'][record.vote],
power: record.votingPower.toNumber(),
timestamp: new Date(record.timestamp.toNumber() * 1000),
});
});Troubleshooting
ProposalVotingActive error
The voting period has ended. You can no longer vote on this proposal.
InsufficientActiveDays error
Your account is too new. Continue participating in the DAO to reach the 30-day minimum.
Transaction fails with no error
Common causes:
- Already voted on this proposal
- Voting period ended
- Insufficient SOL for fees
- Network congestion