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

rewardPerVoter is miscalulated

Summary

// otherwise the proposal passed so distribute rewards to the `For` voters

When reaching quorum and the proposal passes, the reward amount is calculated on the number of totalVotes instead of the number of forVoters.

Vulnerability Details

The miscalculation leads to part of the reward being stuck in the contract.

Impact

Eth stuck in contract.

Tools Used

Manual review.

Recommendations

rewardPerVoter should take into account the totalVotesFor and be careful with rounding issues.

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.