Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

The reward is distributed to all voters, not just for ```for``` voters

Summary

The reward is distributed to all voters, not just for for voters

Vulnerability Details

The reward is calculated as follows: rewardPerVoter = totalRewards / totalVotes. It violates the notes: otherwise the proposal passed so distribute rewards to the For voters.

Impact

The reward is distributed wrongly. The against voters will get rewards too.

Tools Used

Manual

Recommendations

It should be:

uint256 rewardPerVoter = totalRewards / totalVotesFor;
Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

VotingBooth._distributeRewards(): Incorrect computation of rewardPerVoter

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.