The contribute
function does not store the actual contributed amount in the contributor’s Contribution account. This causes the refund logic to malfunction later on, as it relies on this recorded amount.
When users call the contribute
function, their lamports are correctly transferred to the fund. However, the amount is not recorded in their corresponding Contribution account.
As a result, when refund is called later, the amount retrieved from ctx.accounts.contribution.amount
is zero:
Refunds will silently fail because the contract believes the user contributed nothing. This could cause loss of funds for users and undermine the integrity of the protocol.
Manual review
Update the contribute
function to correctly track the amount contributed per user:
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.