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

Zero withdraw fees address

Summary

It would be really scary if owner update the feeAddress to a zero feeAddress by mistake. So it should not be possible.

Vulnerability Details

changeFeeAddress has zero address issue
function changeFeeAddress(address newFeeAddress) external onlyOwner {
// here 👈, This function must have a require check to protect owner against zero feeAddress update.
feeAddress = newFeeAddress;
emit FeeAddressChanged(newFeeAddress);
}

Impact

Owner or Fee recipient can loose his/her all Raffle Fees. Already it sounds horrible.

Tools Used

Manual review

Recommendations

changeFeeAddress with protection against zero `feeAddress` updation
function changeFeeAddress(address newFeeAddress) external onlyOwner {
require(newFeeAddress != address(0), "PuppyRaffle: Must be a valid non zero address"); // here 👈 🖐, I added a require check to stop owner against making disaster.
feeAddress = newFeeAddress;
emit FeeAddressChanged(newFeeAddress);
}
Updates

Lead Judging Commences

patrickalphac 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!