Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing zero address validation on Change fees

Summary

Vulnerability Details

changeFeeAddress function in the PuppyRaffle contract does not check if the newFeeAddress provided is a zero address (0x0)

Impact

This could lead to unexpected behavior, as any fees sent to the feeAddress would be effectively burned and lost forever.

Tools Used

Manual

Recommendations

To fix this issue, you should add a check at the beginning of the changeFeeAddress function to ensure that newFeeAddress is not the zero address. Here's an example of how you might do this:

function changeFeeAddress(address newFeeAddress) public {
require(newFeeAddress != address(0), "New fee address cannot be the zero address");
feeAddress = newFeeAddress;
}

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Zero address checks

Support

FAQs

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

Give us feedback!