Skip to content

[BUIDL Audition Platform] (SC): Build Judge Management System with Weight Assignment #103

@CollinsC1O

Description

@CollinsC1O

Issue Description:

You are to implement the judge management system. We want to have regular judges and also have a room to accommodate celebrities who ever get interested to take up being part of judging an audition so this is where we handle the VIP treatment. Judges are the experts who carry the most weight in our voting system. They determine which audition participant (artist) gets to win in an audition. The contract owner assigns judges manually and sets their voting weights based on expertise.
Here's how it works - regular judges might get 20 weight way much more super bigger than the staker's voting weight, but celebrity judges, let's say Eminem, NF, Wizkid, Davido for example, just a celebrity Judge, could get 60 or higher weight because their opinion carries more value, this figures are just a speculation, you should implement what works better. Judges don't stake anything - they're handpicked by the owner. who is also the season and audition creator.
We need weight limits to prevent any single judge from having too much power. Think of it as checks and balances for our expert system.

So here is the thing; the judges would evaluate the artist and score them, giving the winner's based on the artist (audition participants) performance and also be able to input in the voting too (also vote). so if a participant is evaluated by the judges as the first winner and also voted by the judges this gives them a double win and make it more transparent, and makes it clear on why they emerge winners considering that with voting every voter gives a reason for their votes and this is in addition with stakers votes.

📌 Requirements

  • Owner-Only Judge Assignment: Only contract owner can assign judges and set weights. if a regular judge then the get assigned the regular judges weight too but if a celebrity judge the get assigned their appropriate weight too.
  • Celebrity Judge Support: Higher weight limits for expert/celebrity judges. And ensure that the owner can also assign a celebrity judge amidst the audition
  • Weight Limit System: Maximum weight caps to prevent excessive concentration
  • Judge Payment Integration: Judges get paid from registration fee pool. Ensure that only the owner can pay a judge and also check that the judge has participated in an audition judgement in a specific audition in a season.
  • Dynamic Weight Adjustment: Owner can adjust judge weights before voting starts (as it concerns voting) and also if you give a good look at the current artist evaluation implementation you did see how the are evaluated by a judge.
  • Judge Status Management: Activate/deactivate judges as needed for each audition in a season.
  • Weight Distribution Tracking: Monitor total judge weight distribution
  • Judge Profile Storage: Store judge info, expertise level, celebrity status
  • Batch Judge Operations: Efficiently manage multiple judges
  • Judge Payment Calculation: Fair compensation based on participation in judging an audition participant

🔍 Implementation Approach

struct JudgeProfile {
    address: ContractAddress,
    weight: u256,                   
    is_celebrity: bool,              // Celebrity judges get higher limits
    expertise_level: u8,             // 1-5 scale
    assigned_timestamp: u64,
    is_active: bool,
    payment_amount: u256             // Fixed payment per audition
}

struct WeightLimits {
    max_regular_judge_weight: u256,  // e.g., 50
    max_celebrity_weight: u256,      // e.g., 200
    max_total_judge_percentage: u8   // e.g., 80% of total voting power
}

// Judge assignment pseudo-code
fn assign_judge(
    judge_address: ContractAddress,
    weight: u256,
    is_celebrity: bool,
    payment_amount: u256
) {
    // Only owner access
    assert(get_caller_address() == self.owner.read());
    
    // 1. Validate weight within limits
    // 2. Check total weight distribution
    // 3. Store judge profile
    // 4. Update weight tracking
    // 5. Emit judge assignment event
}

🎯 Testing Requirements

  • Provide an integration test to test owner-only access control
  • Provide integration test to test weight limit enforcement
  • Test celebrity vs regular judge limits
  • Test judge payment calculation
  • Test weight distribution tracking
  • Test judge activation/deactivation
  • Test batch judge operations

🚀 Expected Outcome

Flexible judge management system that maintains expertise-based voting while preventing power concentration.

Metadata

Metadata

Assignees

Labels

onlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions