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

Missing Validation for Constructor Parameters `feeAddress`

Vulnerability Details

The constructor does not implement any validation checks for the input parameters, particularly for _feeAddress. This oversight could lead to scenarios where an invalid or unintended address (such as the zero address) is set as the feeAddress, potentially leading to loss of funds or malfunctioning of the contract.

constructor(uint256 _entranceFee, address _feeAddress, uint256 _raffleDuration) ERC721("Puppy Raffle", "PR") {
entranceFee = _entranceFee;
feeAddress = _feeAddress;
raffleDuration = _raffleDuration;
// ...
}

Impact

  • Risk of Losing Funds: Setting the zero address or an incorrect address as feeAddress means that any funds sent to this address may be lost or irretrievable.

Recommendations

  • Implement Input Validation: Add checks in the constructor to validate the input parameters. Ensure that the _feeAddress is not the zero address and that other inputs are within expected ranges or conditions.

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!