The function sends Ether to the user before updating internal state, violating the checks-effects-interactions pattern. This enables classic reentrancy attacks.
A malicious contract could use a fallback function to re-enter the claim and drain funds multiple times.
Complete contract drain via reentrancy.
Manual audit
Foundry fallback-based reentrancy simulation
Use ReentrancyGuard
and correct ordering:
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.