When it comes to distributing rewards to voters the code doesn't work as intended
rewardPerVoter
is calculated by uint256 rewardPerVoter = totalRewards / totalVotes;
and rewardPerVoter = Math.mulDiv(totalRewards, 1, totalVotes, Math.Rounding.Ceil);
where instead of calculating for totalVotes
it should be calculating for totalVotesFor
Leads to funds being stuck in the protocol
manual review
Replace totalVotes
with totalVotesFor
in the calculations
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.