When the quorum has been reached, the proposal has passed and the funds are being distributed, the rewardPerVoter
is divided by the total amount of voters instead of the voters instead of the amount of the 'for' voters thus leaving some ETH inside the contract after distribution in case not everyone voted 'for'.
There are no functions to withdraw ETH from the contract and variables cannot be re-initialized so the remaining ETH will stay permanently locked inside the contract and all it takes is 1 vote 'against'. As a poc you can add this test to VotingBoothTest.t.sol
and verify that the test fails:
The 'for' voters don't get as much reward as they should get, and the creator is losing funds as well as they will be locked inside the contract permanently
VSCodium, foundry and manual check
Divide the totalRewards
by totalVotesFor
instead of totalVotes
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.