A rogue verified charity may perform griefing attack after you make a donation
Sending ETH to a charity causes an interaction with the charity contract, which may result in the donation being sent in an infinite loop.
This attack has a negative impact on the functioning of the GivingThanks contract, even though it does not provide a direct profit to the charity (attacker). Depending on the ETH balance of the participant donating to the charity, this could result in a block gas limit attack causing a denial of service.
Add the following contract to GivingThanks.t.sol file:
And run the following test in the GivingThanksTest test contract:
Modify access to GivingThanks.donate() with a reentry protection modifier. For example, you can use the nonReentrant OpenZeppelin modifier.
Charity contracts are validated by the admin, it is safe at this step since admin is trusted.
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.