The refund
function allows contributors to claim refunds based solely on the deadline being reached, without checking if the funding goal was unmet.
The current implementation only checks if the deadline has passed but doesn't verify if the campaign failed to meet its goal (amount_raised < goal
). This allows unnecessary refunds even for successful campaigns.
Contributors could improperly withdraw funds from successful campaigns, reducing the creator's available funds and breaking campaign success incentives.
Manual code review
Modify the refund condition to include goal verification:
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.