2

I am trying to close an account with a balance of 890880 lamport (getMinimumBalanceForRentExemption api result) for rent, and I send a transaction to transfer the 885880 amount via system transfer. However, I get an error message "insufficient funds for rent".

How can I reduce the balance to zero? The account owner is system program. Is a balance of 890880 not enough?

3 Answers 3

4

for closing the account account, you need to "reduce" the lamports at account to 0. While lamports at account can be of whatever amount it cannot be in range of >0,<rentExempt. The minimal amount of lamports of rent exempt in the account is defined differently for account type, depending on the space needed for allocation.

Un your case I wonder you refer to create account with 890880 while trying to transfer out only 885880. The rest of the difference on the numbers is about to be left in the account and is fewer to minimal required rent exempt value.

2

Which wallets paying the fee? If the same wallet is paying the fee subtract 5000 lamports, and if youre paying the fee from a separate wallet dont subtract the 5000.

0

Even with a lot of people saying that just by zeroing your account it gets closed in my case the accounts stay open. I was only able to close the accounts and retrieve the rent back by using websites like https://soldustvacuum.app/ or https://sol-incinerator.com/, from there I was able to close all accounts that I had left open.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.