The donate
function is designed to allow users to donate Ether to a verified charity and receive an ERC721 (NFT) token as a form of acknowledgment or receipt for their donation. Here is possible to send 0 ETH and mint an NFT token.
In the donate
function, there is no validation for the amount of msg.value
sent by the donator. As a result, it is possible to send 0 ETH and still mint an NFT token.
An unscrupulous donator could exploit the lack of validation for the donation amount, enabling them to mint an unlimited number of NFT tokens without contributing any actual value in Ether. This can undermine the integrity of the donation system and the incentives for genuine donations.
manual review
Please reconsider the protocol to prevent donations of 0 ETH.
Programisticly to prevent this, it's essential to add a validation 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.