The refund
function resets the contributor’s contribution.amount
to 0
but does not reduce the fund’s amount_raised
by the refunded amount. This results in incorrect tracking of the total funds raised, making the protocol believe the fund has more SOL than it actually holds.
Incorrect Fund Accounting: The amount_raised
value becomes inflated, misleading contributors and creators about the fund’s progress.
Operational Risks: Creators might withdraw more funds than available, or contributors could be denied refunds due to insufficient SOL in the fund.
Subtract the refunded amount from fund.amount_raised
using checked_sub
to prevent underflow:
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.