If percentage is set to 0 for a winner, there will be a transfer of 0 amount, causing the transaction to revert with some tokens.
If percentage is set to 0 for a winner, there will be a transfer of 0 amount. Some tokens can revert if the amount being transferred is 0. Therefore, it's important to check whether the percentage being transferred is more than 0.
More info - https://github.com/d-xo/weird-erc20#revert-on-zero-value-transfers
There could be some situations where winners of 0 percentage could have a use case, such as honorable mentions, and the organizer would want to do this without having the transaction reverting.
Manual analysis
Instead of trying to transfer the funds to each address, store in a state variable how many funds each address can withdraw and then create a withdraw
function, where each participant can withdraw the funds their own. Push over pull.
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.