Rounding errors in Solidity will lead to the precision loss in the winning amounts calculations
The amount of tokens to be transfered to the winners is calculated using the division in the _distribute function. uint256 amount = totalAmount * percentages[i] / BASIS_POINTS. Therefore, part of the tokens will be unwithdrawable.
If totalAmount * percentages[i] is less than BASIS_POINTS, the entire totalAmount * percentages[i] will be lost for the winner. Additionally, if totalAmount * percentages[i] cannot be divided without a remainder, the remainder will be lost for the winner.
VS Code
Verify in amount is not zero or if the division does not have a reminder to avoid precision loss.
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.