An error in the formula for calculating the reward leads to the loss of funds on the contract.
The formula for calculating awards uses the total number totalVotes instead of totalVotesFor
The formula for calculating awards uses the total number totalVotes instead of totalVotesFor,
rewardPerVoter = totalRewards / totalVotes
and rewardPerVoter = Math.mulDiv(totalRewards, 1, totalVotes, Math.Rounding.Ceil)
but only those who votedFor are awarded
_sendEth(s_votersFor[i], rewardPerVoter)
So contract will have a frozen balance = totalRewards - rewardPerVoter * s_votersFor.length
Contract's balance
Forge tests
change the formula for rewardPerVoter, i.e.
rewardPerVoter = totalRewards / totalVotesFor
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.