The donate()
function sends Ether to a specified charity address using a low-level call
. If the recipient contract (the charity) has a fallback function that initiates a recursive call back to donate()
, it could repeatedly drain the contract's Ether before the function completes.
A reentrancy attack could result in the theft of Ether from the contract if the logic of donate()
can be recursively executed before the state is updated.
manual
Use the Checks-Effects-Interactions Pattern
Add the ReentrancyGuard
Modifier
Impact: High, one charity can reenter the donate function with the same ETH provided and mint several NFT. Likelyhood: Low, any malicious charity can do it but Admin is trusted and should verify the charity contract before "verifying" it.
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.