The _distribute
function does not correctly account for/ is not compatible with fee on transfer tokens.
In the distribute function, there is a for loop that goes through an array and distributes tokens based on the percentage of the pot they are allocated.
The problem here is that when transferring tokens to the winners, if the token given out has a fee on transfer, not all winners will receive their payout or their payout will be lower than it should. Such tokens that have a fee on transfer are STA and PAXG. Additionally USDC and USDT are subject to potential fees on transfer in the future.
Loss of funds when using fee on transfer tokens
manual review
add logic to support fee on transfer
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.