The constructor of the contract does not have validations in place to check for a zero address or zero values for the _entranceFee
and _raffleDuration
parameters. This lack of validation could lead to undesired behavior of the contract when instantiated with such values.
In the provided code snippet, the constructor takes three arguments: _entranceFee
, _feeAddress
, and _raffleDuration
. However, there are no checks to ensure that _feeAddress
is not a zero address, or that _entranceFee
and _raffleDuration
are not zero values.
If _feeAddress
is set to the zero address, any funds directed towards the feeAddress
within the contract could be irretrievably lost.
If _entranceFee
or _raffleDuration
is set to zero, it might alter the intended logic and flow of the contract, potentially making the raffle free to enter or instant to conclude, respectively.
Manual code review.
Implement input validation checks in the constructor to ensure that _feeAddress
is not a zero address, and _entranceFee
and _raffleDuration
are not zero values.
It could be beneficial to have a require statement checking these conditions:
These checks will help in maintaining the integrity and expected behavior of the contract when it is deployed.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.