in-solana by Supanode

Transaction results in an account with insufficient funds for rent

The transaction would leave an account with a balance below the minimum required for rent exemption. Solana requires every account to hold enough lamports to cover its storage cost.

Common causes

  1. Creating an account with too little SOL. The minimum balance depends on the account’s data size. A zero-data account needs ~0.00089 SOL; a token account needs ~0.00204 SOL.
  2. Transferring too much SOL out. The transfer would leave the sender below rent-exempt minimum for their account data size.
  3. Not accounting for data size. Program-owned accounts with data fields require more lamports than a basic wallet.

How to fix

  1. Query the required minimum with getMinimumBalanceForRentExemption, passing the account’s data size in bytes.
  2. Ensure the account will have at least that amount after the transaction.
  3. For transfers, subtract the rent-exempt minimum from the maximum transferable amount.
import { createSolanaRpc } from "@solana/kit";

const rpc = createSolanaRpc("https://api.mainnet-beta.solana.com");

// For a basic account (0 bytes of data)
const minBalance = await rpc
  .getMinimumBalanceForRentExemption(0n)
  .send();

console.log(`Minimum: ${minBalance} lamports (${Number(minBalance) / 1e9} SOL)`);

FAQ

What is rent exemption? All Solana accounts must hold a minimum balance to be stored on-chain without paying per-epoch rent. This minimum depends on the account’s data size. As of 2026, the formula is approximately 0.00089 SOL + 0.00000696 SOL per byte.

Can I close an account and recover the rent? Yes. Closing a program-owned account returns the lamports to a specified recipient. SPL Token accounts can be closed with the closeAccount instruction.

Does this apply to wallet accounts? Yes. A wallet (system account with 0 bytes of data) needs ~0.00089 SOL minimum. You cannot transfer your entire balance — you must leave the rent-exempt amount or close the account entirely.

Error text variants

  • Transaction results in an account with insufficient funds for rent
  • InsufficientFundsForRent

Updated: