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

stuck eth

Summary

rewards are divided by total voters, but only distributed to 'For' voters, leaving eth unclaimable in the contract

Vulnerability Details

a specific amount of eth is deposited at construction. that eth is either returned to the creator, or divided and sent to the 'For' voters if it passes. However, line 192 divides the deposited eth by all voters, but line 194-209 send that eth only to 'For' voters. unless the vote is unanimously 'For' there will be eth left stuck in the contract.

Impact

stuck eth

Tools Used

reading the repo on github

Recommendations

divide by totalVotesFor instead of totalVotes.

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.