current location:Home >> Blockchain knowledge >> how much to claim sol on closing accounts?

how much to claim sol on closing accounts?

admin Blockchain knowledge 848

When closing a Solana (SOL) account, you can claim back the rent-exempt balance that was initially deposited to keep the account active. Here's what you need to know:

1. Rent-Exempt Balance (Minimum SOL Required)

how much to claim sol on closing accounts?

Solana accounts require a small amount of SOL to remain active (to prevent spam).

The rent-exempt amount depends on the size of the account data:

For a basic wallet account (no data): 0.00203928 SOL (as of recent updates).

For accounts with data: The rent is calculated as:

text
Rent = (Account Size in Bytes) * (Rent per Byte-Year) / (Seconds per Year)

2. How Much You Can Claim Back

  • When closing an account, you get back the full rent-exempt balance.

  • Example:

    • If you created a wallet with 0.00203928 SOL as rent, you can reclaim 0.00203928 SOL when closing it.

    • If the account had data (e.g., an SPL token account), the reclaimable amount will be higher.

3. How to Close an Account & Claim SOL

You can close an account using:

Solana CLI (solana close-account <ADDRESS>)

JavaScript (web3.js):

javascript
const transaction = new Transaction().add(
  SystemProgram.closeAccount({
    fromPubkey: accountPubkey,
    toPubkey: destinationPubkey, // Where to send the reclaimed SOL
    programId: SystemProgram.programId,
  }));await sendAndConfirmTransaction(connection, transaction, [signer]);
  • Wallets/SDKs (e.g., Phantom, Solflare, Backpack).

4. Important Notes

  • Account must be empty (zero SOL balance or no data) before closing.

  • SPL Token Accounts must have a zero balance before closing.

  • Smart Contract Accounts may have additional rules.

Current Rent-Exempt Minimum (2024)

Account TypeApprox. Rent-Exempt SOL
Basic Wallet0.00203928 SOL
SPL Token Account~0.00203928 SOL + data costs
Program AccountVaries (higher)

If you have any questions or uncertainties, please join the official Telegram group: https://t.me/GToken_EN

GTokenTool

GTokenTool is the most comprehensive one click coin issuance tool, supporting multiple public chains such as TON, SOL, BSC, etc. Function: Create tokensmarket value managementbatch airdropstoken pre-sales IDO、 Lockpledge mining, etc. Provide a visual interface that allows users to quickly create, deploy, and manage their own cryptocurrencies without writing code.

Similar recommendations