The contribute function fails to track individual contributions, which prevents contributors from claiming refunds if the funding goal is not met. While the amount_raised is updated, contributors’ specific deposits are not recorded, making it impossible to process refunds accurately.
Missing Contribution Update: The function initializes contribution.amount but does not increment it when a contributor donates multiple times.
Refunds Depend on Contribution Tracking: Since refunds are based on individual contributions, failing to track them renders refunds impossible or inaccurate.
Potential Fund Mismanagement: Users may not be able to reclaim their rightful funds if the campaign fails to meet its goal.
Broken Refund Logic: if the campaign fails, contributors cannot get their money back, since their exact contributions are lost.
Risk of Fund Mismanagement: the system cannot correctly determine how much each contributor should be refunded.
Legal & Trust Issues: crowdfunding platforms rely on trust; incorrect refund behavior could lead to legal liability or user distrust.
This test case demonstrates that a contributor's multiple contributions are not tracked correctly, leading to incorrect refund amounts.
Proper Contribution Tracking for Refunds
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.