Description: The calculation of the VotingPool::rewardPerVoter is done incorrectly. As per the documentation the rewards are to be distributed to the For voters.
But when calculating the rewardPerVoter in Line: 192, it divides the rewards by totalVotes and not by totalForVotes.
Further down the code in Line: 2 the rewards are distributed to the voters who voted For the proposal.
Impact: This results in significant amounts of the rewards being stuck in the contract forever and doesn't go to the users who voted For the proposal.
Proof of Concept:
Proposal is created with 5 allowed voters
Voters 1 and 2 vote For the proposal
Voter 3 votes Against the proposal.
Quorum is reached and rewards are calculated incorrectly
Instead of Voters 1 and 2 getting half of the rewards each, they only get 1/3rd each. While the other 1/3rd is stuck in the contract forever.
Recommended Mitigation:
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.