Sparkn

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

Winners don't get rewards if any of the winners is blacklisted by token


Summary

Vulnerability Details

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;
}
}

The vulnerability involves a scenario where winners do not receive rewards if any of the winners are blacklisted by a token. The code snippet provided iterates through a list of winners and calculates the amount of rewards they should receive based on percentages. However, it does not appear to account for the possibility that some winners might be blacklisted by the token contract. This means that even if a winner is eligible to receive rewards according to the distribution logic, they might not receive any rewards if they are blacklisted.

Impact

Severity: Medium

Impact: HIGH
LikelyHood: Low

The exclusion of legitimate winners from receiving rewards if any of the winners are blacklisted by the token contract, potentially leading to financial losses and compromised fairness.

Tools Used

Recommendations

Support

FAQs

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