The function fails to update the individual contributor's contribution amount, creating a discrepancy in contribution tracking.
The function transfers funds and updates the total fund amount
Individual contributor's contribution.amount
is not incremented
Breaks the expected behavior of tracking per-contributor contributions
Inability to accurately track individual contributor's specific contributions
Potential accounting inconsistencies when a user contributes multiple times and an incorrect refund occurs due to the current implementation.
Foundry Tests: By writing a test where user creates 2 contributions to a fund and request a refund.
Manual Code Review: Identified the mising update in the contribute
function.
Add contribution.amount += amount;
to track individual contributions at the end of contribute
.
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.