Rounding Error leading to loss of winner's token
In _distribute() (https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L116) there is chance of rounding error when the BASIS_POINTS is greater than (totalAmount * percentages[i]) (BASIS_POINTS > (totalAmount * percentages[i])) leading to amount variable becoming 0 . (https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L146).
Due to rounding error the amount transferred to winner will be zero rather than being the actual amount causing a loss to user .
Rounding Error leading to loss of winner's token and the token would be transferred to 'STADIUM_ADDRESS' address causing permanent loss of tokens.
Manual review
Should check the amount variable that it is greater than zero or not before transferring it (amount>0).
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.