How Program Rankings Work
Popularity
Popularity is determined by the number of unique wallet addresses that have voted for a program.
If a wallet votes multiple times, it still counts as one unique vote.
Global Definitions
-
Total Unique Voters (Global):
The total number of unique addresses that have voted across all programs. -
Program Popularity:
The number of unique addresses that voted for a specific program. -
Program Votes:
The total number of votes received, including duplicates from the same address.
Sorting Modes
By Popularity, Then by Votes
This is the default sorting mode.
Items = Items
.OrderByDescending(x => x.Count) // First by unique voters
.ThenByDescending(x => x.Votes) // Then by total votes
.ToObservableCollection();
Example: If 3 programs each have 21 unique voters, they are ranked by their total number of votes.
By Total Votes Only
Programs are sorted by total number of votes, regardless of how many unique wallets voted.
By Popularity Only
Programs are sorted only by unique voters, regardless of how many times each wallet voted.
Rule Violation Checks
Programs that violate these rules are flagged in red.
Rule 1: One Wallet Controls Over 50% of the Votes
public string GetMajorityVoter()
{
if (Logs == null || Logs.Count == 0)
return string.Empty;
int totalVotes = Logs.Sum(log => log.Votes);
if (totalVotes == 0)
return string.Empty;
var voterGroups = Logs
.GroupBy(log => log.Voter)
.Select(group => new
{
Voter = group.Key,
VoteCount = group.Sum(g => g.Votes)
});
var majority = voterGroups
.FirstOrDefault(v => v.VoteCount > totalVotes / 2);
return majority?.Voter;
}
If the function returns a wallet address, it means one address holds the majority of votes → the program is flagged.
Rule 2: Below Average Unique Voter Count
var averageVotes = Items.Sum(x => x.Count) / Items.Count();
Items.ForEach(i => i.IsBelowAverage = i.Count < averageVotes);
Programs with fewer unique voters than the average across all programs are marked as below average and visually highlighted.