Why is there SOL in a token account?

I’m new to Solana, and I’m trying to understand why there is SOL in a USDC token account. Here is the token account.


It appears that the 0.002 SOL in the token account arrived along with the 5 USDC transferred to this account in this transaction.


Could someone please explain why this SOL was transferred along with the USDC, why it’s sitting in the token account, and how the amount is calculated?


This is to ensure the token account is rent-exempt (you can check this on Solana docs, but basically it is the minimum SOL amount of an account to avoid being removed from the Solana network). This 0.002 SOL transfer is default in the create-associated-token-account instruction.

Thanks @khant. So if I had first created a USDC token account in the receiving wallet, I would have been charged the 0.002 SOL to create that account, but then there would have been no 0.002 fee for the transfer. Is that right?

Yes, that’s it. The transfer of 0.002 Sol is to ensure your account has transaction power and is recognized on the system as a valid account