VotingBooth::_distributeRewards reward distribution error
distributes rewards to the for voters if the proposal,but in the _distributeRewards function, there is an error in the calculation where totalVotes is incorrectly used as the divisor for totalRewards. This includes individuals who voted against the proposal in the reward calculation, resulting in an inaccurate distribution of ETH amount to those who voted in favor. As a consequence, the allocated ETH amount to supporters is incorrectly calculated and ends up being less than intended, with the excess amount erroneously remaining in the VotingBooth contract.
The amount of ETH received by voters supporting the proposal is miscalculated, resulting in less than the deserved amount,The unallocated portion of ETH will be incorrectly left in the VotingBooth contract.
Foundry
Modify it to divide totalRewards by s_votersFor.length.
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.