ACCOUNT_STORAGE_OVERHEAD = 128 bytes, LAMPORTS_PER_BYTE_YEAR = 3480, and EXEMPTION_THRESHOLD = 2 years. Multiply them and you get the per-byte rent of 6960 lamports.Solana charges a small ongoing fee for storing data on-chain — but accounts that hold a high enough balance are "rent-exempt" and never pay. In practice every account is created at the rent-exempt threshold; rent collection on under-funded accounts is rare in modern usage.
The formula is (data_size + 128) × 3,480 × 2 lamports — that is, the account size plus 128 bytes of overhead, times the lamports-per-byte-year constant, times the 2-year exemption threshold. Constants are protocol parameters set in solana-sdk.
Yes. Closing an account returns all its lamports to a designated recipient. Rent-exempt deposits are recoverable in full — they're not consumed, just locked while the account exists.
Even a 0-byte data account incurs the 128-byte overhead Solana adds for account metadata (owner, lamports, etc.). That overhead is what the empty-account rent reserves cover.