The donate function lacks a check
for msg.value, allowing users to obtain an NFT by sending a transaction with zero
ether.
Add this code
to tests , but as there is a bug in the constructor of the GivingThanks
contract , fix it before running tests .
Without a check for msg.value
, users can call the function donate
with zero ether and still receive
an NFT.
Manual code review.
To address this vulnerability, you should add a check for msg.value in the donate function.
Likelyhood: Low, anyone can mint an NFT with 0 amount. No reason to do it. Impact: Informational/Very Low, NFT are minted to a false donator. An NFT with 0 in the amount section would be useless. Since that's a bad design and not expected, I'll consider it Low but in a real contest, it could be informational because there is no real impact.
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.