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

If the proposal passed, the reward for users voting in favor is less than expected.

Summary

If the proposal passed, the reward for users voting in favor is less than expected.

Vulnerability Details

Reward calculation does not match expectations.

Impact

According to the comments, rewards are distributed to the 'For' voters because the proposal passed. However, when calculating rewardPerVoter, it is divided by totalVotes, resulting in users who voted in favor receiving less reward than expected.

Tools Used

Recommendations

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.