Rewards are divided by the total number of votes, instead of the number for votes.
rewardPerVoter
is set to totalRewards / totalVotes
. When totalVotesFor
is less than totalVotes
, ie. when voting is not unanimous, then rewardPerVoter
will be lower than expected causing funds to be left in the contract.
Voters would be underpaid.
Funds would be lost, as they are left in the contract without option to remove them.
forge test
Failing spec for confirmation:
Change totalVotes
to totalVotesFor
in both reward calculations, lines 192 and 207.
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.