A critical vulnerability exists in the crowdfunding contract's contribution tracking mechanism. The current implementation fails to accurately record and accumulate individual user contributions, potentially leading to significant financial discrepancies and compromising the integrity of the fundraising platform.
The vulnerable code segment reveals a fundamental flaw in contribution tracking:
Key technical issues include:
The logic in contribute
checks if the contributor has an existing contribution but does not increment their amount.
Contributions are initialized with zero amount
No mechanism to accumulate multiple contributions from the same user
Individual contribution tracking is fundamentally broken
Fund's total amount is updated, but user-specific contributions are not tracked
Repeated contributions will not increase the recorded contribution amount
Refund will be 0 for contributors
Users cannot verify their total contributions
Incorrect tracking of contributions can lead to disputes between contributors and fund creators.
Contributors who donate multiple times will not have their total contribution accurately recorded.
Correctly initialize and update contribution amounts
Manual code review
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.