Sometimes wrong calculation of rewards to voters and ethers remain on smart contract forever after voting is closed
The calculation of the rewards is made in a wrong way, when we have at least one against voter and the result of the voting is for. In the calculation is used the number of total voters to divide the rewards, but it should be used the number of total voters for.
The votersFor gain less ethers than the one they should take. Also some ethers remain locked on the smart contract after the voting is closed.
foundry test
Test with one vote against and two votes for
When we calculate the rewards for the VotersFor we should divide the amount of ethers with the number of VotersFor and not the TotalVotes.
On VotingBooth:::_distributeRewards() should be made the following changes
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.