impact: medium
likelihood : low
The setTreatCost
function in the SpookySwap
contract does not validate that the new cost of a treat is non-zero.
This could allow the owner to unintentionally set a treat's cost to zero, which would make the treat unpurchasable due to the existing cost requirement in the trickOrTreat
function.
Although this does not lead to free minting, it effectively locks the treat, making it impossible for users to acquire. And ultimatly ending the protocol to earn money with this specific NFT.
Setting a treat’s cost to zero does not allow free minting due to the trickOrTreat function’s cost requirement, but it does have the following implications:
Unintended Locking of Treats: Users cannot acquire a treat with a zero cost, effectively removing it from availability. (possibly driving up the price of the NFT due to scarcity)
Mannual review
add an extra check:
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.