Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low
Valid

One Blacklisted Winner Halts All Payouts

Summary

If the contest is over and one winner is blacklisted by the token contract that is being used as a reward, the _distribute function will fail. This means all other winners will also be unable to receive their tokens.

Vulnerability Details

The _distribute function has a loop that reverts if it encounters a blacklisted winner, affecting all.

uint256 winnersLength = winners.length; // cache length
for (uint256 i; i < winnersLength;) {
uint256 amount = totalAmount * percentages[i] / BASIS_POINTS;
erc20.safeTransfer(winners[i], amount);
unchecked {
++i;
}

Impact

All the non blacklisted users can't receive their prize because of one single user. the funds get stuck.

Tools Used

Manual review

Recommendations

Check every user to see if any of them are blacklisted by the token being awarded.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.