A decentralized reputation scoreboard system built on Solana
ReputeDAO is a blockchain-based reputation management system that allows communities to track and reward member contributions through peer voting. Built with Anchor framework on Solana, it provides token-gated voting, leaderboard system, role-based permissions, and comprehensive reputation tracking.
- π€ User Profiles - Create unique username-based profiles(Similar to Domain names)
- π° Token Staking - Stake SPL tokens to gain voting rights
- π³οΈ Peer Voting - Upvote/downvote community members with cooldown protection
- π Reputation Tracking - Comprehensive scoring and leaderboard system
- π Role Progression - Unlock privileges as reputation grows
- π Admin Controls - Reset capabilities and system management
- π‘οΈ Token-Gated Access - Minimum stake requirements prevent spam
- β° Cooldown System - Role-based voting frequency limits
- π« Anti-Abuse - Self-vote prevention and sybil resistance
- π Admin Authority - Secure administrative functions
| Role | Reputation | Voting Power | Cooldown | Permissions |
|---|---|---|---|---|
| Member | 0-50 | 1x | 24h | Upvote only |
| Bronze | 51-100 | 1x | 24h | Can downvote |
| Contributor | 101-200 | 2x | 18h | Enhanced voting |
| Guardian | 201-400 | 2x | 12h | Moderator privileges |
| Leader | 400+ | 3x | No cooldown | Maximum influence |
-
Clone the repository
git clone https://github.com/AlphaR2/ReputeDao.git cd repute-dao -
Install dependencies
npm install
-
Build the program
anchor build
-
Run tests
anchor test
-
Configure Solana CLI
solana config set --url https://api.devnet.solana.com solana-keygen new # If you don't have a keypair
-
Deploy to Devnet
anchor deploy --provider.cluster devnet
-
Initialize the DAO
# Update the program ID in Anchor.toml and lib.rs anchor test --skip-local-validator
// Set up the DAO with admin, token mint, and voting parameters
pub fn init_dao(
ctx: Context<InitializeDaoProgram>,
admin: Pubkey, // Admin wallet address
minimum_stake: u64, // Minimum tokens required to vote
token_mint: Pubkey, // SPL token mint for governance
vote_power: u8, // Vote weight multiplier (1-20)
) -> Result<()>// Create the token treasury for staking
pub fn initialize_treasury(ctx: Context<InitializeTreasury>) -> Result<()>// Users create profiles with unique usernames
pub fn create_profile(
ctx: Context<CreateProfile>,
username: String, // Unique username (3-31 chars)
) -> Result<()>// Stake tokens to gain voting rights
pub fn stake_tokens(
ctx: Context<Stake>,
amount: u64, // Amount to stake (must meet minimum)
) -> Result<()>// Upvote valuable community members
pub fn upvote(
ctx: Context<Vote>,
target_username: String, // Username to upvote
) -> Result<()>
// Downvote (requires Bronze+ role)
pub fn downvote(
ctx: Context<Vote>,
target_username: String, // Username to downvote
) -> Result<()>// Withdraw staked tokens (reduces voting power)
pub fn unstake_tokens(
ctx: Context<Unstake>,
amount: u64, // Amount to unstake
) -> Result<()>// Reset user reputation (admin only)
pub fn reset_user_reputation(ctx: Context<ResetUserReputation>) -> Result<()>- Config - DAO settings (admin, token mint, vote power, etc.)
- Treasury - Token vault state (total staked, staker count)
- UserProfile - Individual reputation data and stats
- UsernameRegistry - Unique username management
- VoteCooldown - Prevents spam voting
- VoteRecord - Tracks individual votes for transparency
The project includes comprehensive tests covering all functionality:
# Run all tests with detailed logging
anchor test
# Run tests without rebuilding
anchor test --skip-build- β DAO initialization and configuration
- β Treasury setup with token accounts
- β User profile creation and validation
- β Token staking and unstaking operations
- β Voting system with role permissions
- β Anti-abuse mechanisms (cooldowns, self-vote prevention)
- β Admin functions and authorization
- β Error handling and edge cases
- Minimum Stake - Required tokens to participate
- Vote Power - Reputation points multiplier (1-20)
- Role Thresholds - Reputation levels for role progression
- Cooldown Periods - Time between votes per role