The Fund account is a data-bearing PDA that must always stay rent-exempt; any manual lamport withdrawal from it should leave at least the rent-exempt minimum so the runtime does not reclaim the account.
Both refund and withdraw debit lamports directly from the fund with only a checked_sub, which prevents u64 underflow but does not stop the balance from dropping below the rent-exempt minimum. Combined with the stale amount_raised from L-1, a debit can leave the account below rent.
Likelihood:
When amount_raised exceeds the contributed lamports still in the account (because refunds never decrement it, see L-1), the debit is computed against the full balance, including the rent reserve.
When the amount removed leaves the account below the rent-exempt minimum, nothing rejects the transfer.
Impact:
The Fund data account can be left below rent-exemption and become eligible for runtime garbage collection, destroying the campaign state.
The creator can also claw back part of their own rent deposit. The reachable value is bounded by the rent reserve (about 0.038 SOL) and needs a contrived sub-rent contribute-then-refund sequence, which is why this is Low.
Conceptual sequence (becomes reachable once H-2 is fixed so refunds actually move lamports):
Assert that the fund stays at or above the rent-exempt minimum after every manual debit, which prevents the data account from being purged and stops withdrawals from dipping into rent. A cleaner structural fix is to keep contributed SOL in a dedicated SystemAccount vault PDA separate from the data account, so transfers never touch the data account's rent at all.
Add a WouldBreakRent variant to ErrorCode.
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.