The donate
function does not follow the Checks-Effects-Interactions (CEI) pattern. All external interactions, such as using the call
function to send ether, should be done after mutating the blockchain state. Additionally, emitting events would be a good addition to help the front end.
bug below
Solution
Following the CEI pattern to prevent reentrancy attacks and emitting events for better frontend interaction
Not following the CEI pattern can lead to reentrancy attacks, which could compromise the security of the contract. Ensuring all interactions are done last minimizes this risk.
Foundry Test
Follow the CEI pattern to ensure external interactions are handled safely.
Emit event logs when the blockchain state changes to aid frontend development and user interaction tracking.
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.