There is no adequate input checks on function addTreat()
.
The contract uses zero check to identify whether a treat exists or not. Therefore, inputting zero cost treat should be prevented. The function addTreat()
should have an additional check to make sure _rate
is a non-zero value.
This function also does not prevent an empty string on _name
and metadataURI
.
It is possible to have a zero cost treat. Although it is not possible to mint this zero cost treat.
Manual review.
Consider adding checks on function addTreat()
The cost of the treat is set only by the owner (in the constructor, in addTreat and in setTreatCost). That means the cost of the treat will always be greater than zero.
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.