Every transaction on any blockchain requires transaction fees to be paid to miners and validators. Besides transaction fees, Solana also has a concept of "rent". Rent payments are added automatically along with transaction fees, so you see them as a single value when sending.
Rent (Storage Cost):
Imagine you want to store some information (like a document) on a decentralized cloud. Solana is like that cloud. "Rent" is the cost you pay to keep your data (like a token account or program) stored on the Solana blockchain.
Why Rent? It's a way to ensure that only actively used data stays on the blockchain. If everyone kept everything there forever, it would become huge and slow. Rent encourages people to clean up unused data.
How it Works: When an address is first receiving a certain asset, the sender pays an extra small amount of SOL upfront to pay for its rent. This payment makes the account "rent-exempt".
Rent-Exempt: as long as an address maintains a minimum SOL balance, it is considered rent-exempt. Any transactions that would reduce the SOL balance to a value under that minimum will fail. The exception is when the transaction reduces the SOL balance to exactly zero. In this case the address is deactivated and the data associated with it like the transaction history is removed from the Solana network.
Transaction Fees (Network Cost):
When you do something on the Solana blockchain (like sending tokens or closing an account), it's called a "transaction." Transaction fees are what you pay to get your transaction processed and included in the blockchain.
Why Fees? They compensate the "validators" (the computers that run the Solana network) for their work in processing transactions and keeping the network secure. Fees also help prevent spam.
How it Works:
- Every transaction has a small fee associated with it.
- The fee is paid in SOL, even if you're sending other tokens.
- Fees can vary slightly depending on the complexity of the transaction. Defi operations generally cost more than simple transfers.
Token accounts
Sending tokens to an account which is not activated account for the token you are sending, requires you to first create this account with a balance of 0.002 SOL (this is completed at the time of the transaction, so still only a single step for the user), this 0.002 SOL is added to the overall transaction fee when the user is sending
More about Solana fees can be found here: https://solana.com/docs/core/fees