The contribute function fails to update the contributor's recorded contribution amount after transferring SOL. As a result, refund requests later rely on an uninitialized or zero amount, leading to potential financial loss for contributors.
Affected Code:
Attack Vector: When users contribute SOL, their individual contribution amounts are never recorded. The Contribution
account remains at its initialized value of 0.
Root Cause: Failure to update contribution.amount
after processing transfers.
All contributors will receive 0 SOL when requesting refunds
Permanent loss of contributed funds for users
Complete failure of core refund functionality
High severity due to direct financial loss to users
Manual code review
Anchor framework context analysis
Immediately update the contribute function to record the contribution amount.
Use safe arithmetic methods (e.g., checked_add
) to update the contribution.amount
field after the SOL transfer.
Update the contribution amount after successful transfers.
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.