Both withdraw (lib.rs:93-96) and refund (lib.rs:73-76) subtract lamports straight from the fund account's raw balance with checked_sub, with no floor at the rent-exempt minimum. Draining the Fund PDA below its rent-exemption threshold lets Solana purge the account at the next epoch.
Likelihood:
withdraw pays out exactly amount_raised, which equals the contributed lamports and excludes the rent the creator paid at init — so a normal full withdrawal can leave the account holding only its rent, and rounding/refund interactions can push it below the exempt minimum. Refund paths can similarly draw the balance down.
Impact:
If the fund account falls below rent-exemption, the runtime can reclaim it, destroying the Fund state (goal, amount_raised, deadline, creator) and any lamports still parked there. Outstanding contributors lose the on-chain record needed to refund, and the campaign is irrecoverable. Loss of funds and state.
Withdraw the full raised amount and inspect the residual balance versus the rent minimum.
Cap the withdrawable amount at balance minus the rent-exempt minimum.
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.