The rewardPerVoter
was miscalculated twice, instead of dividing by totalVotesFor
, it was divided by totalVotes
, this caused the reward shared amongst voters to be lesser than required and it also permanently locked the remaining funds in the contract.
The rewardPerVoter
was miscalculated, instead of dividing by totalVotesFor
, it was divided by totalVotes
, this causes the reward shared amongst voters to be lesser than required thereby permanently locking the remaining funds in the contract, the same thing happens in the last instance, it shortchanged the last voter and locked the remaining funds, permanently in the contract.
Permanently Lock funds in the protocol, and also sends less rewards to voters
Below is the proof of concept the last assert will fail because funds is still locked in the protocol, even after rewards have been shared
forge test --match-test testVotePassesWithOneVoteAgaint
Foundry and Manual Analysis
Replace totalVotes
with totalVotesFor
in both occurrence
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.