The refund funtion allows attacks throug improper state managment
The contribution amount is reset after the refund but before the transfer completes
An attacker can repeatedly drain funds from the contract
Proof Of Concept:
Manual review
Implement checks-effects-interactions pattern
The reentrancy risk on Solana is highly eliminated. The `try_borrow_mut_lamports` ensures that only one reference to an account exists at a time. Also, once the fund’s lamports are borrowed mutably, no other transaction can modify them until the borrow is released. This means the function will reset the `amount` before the next call.
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.