In contribute function, althoug SOL have been transfered from contributer to fund but status re-amount contributed SOL of individual using contribution.amount is not updated. So it cause refund always return 0 for users
Likelihood:
If you use contribute() function and when deadline is reached you can not refund any SOL
Impact:
All contributed SOL will be trapped in fund. User can not refund. It's cause high risk logic business of fund
Alice call contribute with 10 SOL.
fund.amount_raised add 10 SOL. fund account receive 10 SOL lamports.
contribution.amount of Alice is 0.
When Deadline reached, Alice call refund.
refund function read contribution.amount (0) and refund Alice 0 SOL.
Alice lost 10 SOL.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.