The refund function has multiple logical flaws, including not updating amount_raised and allowing multiple refunds.
fund.amount_raised isn’t decreased during a refund.
No check prevents refunding more than contributed (since amount isn’t validated against available funds).
A contributor could call refund repeatedly if contribution.amount isn’t properly managed.
Fund state becomes inconsistent (showing more raised than available).
Contributors could drain the fund beyond their contributions.
Manual Code Review
Revise refund:
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.