Sparkn

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

No Winner Address(0) Check

Summary

No Address(0) check for Winners in the array

Vulnerability Details

winners array length is checked. However, the individual addresses are not checked for 0x00 address. This may cause loss of funds by sending tokens to Address(0)

Impact

Loss of Funds. Irrecoverable

Tools Used

Manual Review

Recommendations

Put a address(0) check inside the loop which is used to send tokens to the winner addresses. In Distributor.sol

for (uint256 i; i < winnersLength; ) {
if(winners[i]==address(0)){
revert Distributor__NoZeroAddress()();
}
//remaining logic
}

Support

FAQs

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

Give us feedback!