The Distributor.sol
contract doesn't check for zero amount while transferring rewards, which can end up blocking the operation.
In Distributor.sol
contract, the function distribute()
is used to distribute token to winners according to the percentages: here
Then function _distribute()
is called: here
At L146-L147,amount
after calculated will be transferred to winners[i]
but doesn't check for zero amount before transferring.amount
will returns 0
if totalAmount * percentages[i] < BASIS_POINTS
.
This is a bit concerning as some ERC20 implementations revert on zero value transfers (see https://github.com/d-xo/weird-erc20#revert-on-zero-value-transfers).
So the current implementation may cause a denial of service, as a zero amount transfer in this token will block the whole action and revert the transaction.
The function Distributor.sol#distribute()
doesn't check for zero amount while transferring rewards, which can end up blocking the operation.
Manual review
Check for zero amount before executing the transfer.
Eg:
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.