Incorrect (or confusing) balance history

I’m examining the account AqR6BBUFG3NhC4bSAU31zhHNZ1JdSzPwM43PKSSG878N in Solscan:

and looking and some of the transactions, and in particular the pre and post balances. I see two discrepancies:

  1. The very last transaction to take place was this one:


And at the end, this account has a balance of 0.00035.

Yet… the current balance is 0. So… where did the 0.00035 go? And if it went somewhere, is there a transaction representing that transfer?

  1. The following two transactions are listed one right after the other:


At the end of the first one, the balance was 0.00031092, but at the beginning of the second transaction, the balance was 0.000303603.

In other words, between these two transactions 0.000007317 was lost. Where did this amount go? Is this tracked anywhere,

Aside from using Solscan, I manually explored all these transactions using the Solana JSON RPC API, and the ending balances seem to be reported correctly in the explorer. But I still cannot find where these balance discrepancies come from.

1 Like

Hi @musicslayer, welcome to the forum!

I would love to find the answer to this. I’ve just recently discovered the same thing with an account of mine. Very small amounts of SOL were depleted from the account, with no transaction representing the deduction.

My guess is that this is because the account is getting charged rent, and I’m also guessing, according to the transaction history, that charging rent is not a transaction, which would seem to make some sense.

If we put enough SOL into the account, it will be rent exempt and shouldn’t get charged rent, assuming the problem here is indeed rent. Sometime I’ll do a test on a local test validator of putting more SOL into the account and seeing if that prevents the passive loss of SOL.

Hello @musicslayer
Have you gotten a solution?

Hi all,
So I found out the cause - it’s basically what zicklag suspects.

The response in discord was that these discrepancies were caused by rent payments that happened at the block-level and are not tied to a specific transaction. This caused a discrepancy because I only was seeing the rents that were included in transactions.

As far as querying for these block-level rent payments, there is no API in the Solana JSON RPC API to get them all for a certain account. The only way is to just walk “getBlock” for every block looking for any rent payments tied to the account.

Interestingly, Bitquery has an api for searching for rent payments (or blockRewards), but there is a catch - The account selector doesn’t work:

The error claims the account selector should take an int instead of a String.
I’m not sure what int I would put there? Perhaps this is just a bug?

So close!

You can search for rent with other selectors, such as the date, but I’d guess you’d still have to manually search through a large amount of data to find rent payments for a specific account.

1 Like

For anyone following along:

1 Like

Awesome @musicslayer, thanks for finding that and posting here!

That’s good to know. :slight_smile: