Rent Basics

Solana's hidden rent cost: where token accounts come from

Cover image for Solana's hidden rent cost: where token accounts come from

Swaps, airdrop claims, NFT mints and memecoin buys each open a Solana token account that locks 0.00203928 SOL. Where the accounts come from and why they stay.

By Updated 7 min read1568 words

Key takeaways

  • The roughly 0.002 SOL charged when buying a new token on Solana is a refundable rent deposit of 0.00203928 SOL on a new token account, not a network fee.
  • A Solana swap into a token the wallet has never held creates an associated token account; swapping back out empties that account but does not close it.
  • Minting a standard Metaplex NFT funds four accounts, the mint, token account, metadata and master edition, which together cost roughly 0.02 SOL before the mint price.
  • Trading many different memecoins is the fastest way to accumulate empty Solana token accounts, because every new mint needs its own account.
  • Solana never closes empty token accounts automatically, so the rent deposits stay locked until the wallet owner closes each account.

The short answer#

Most everyday Solana activity creates token accounts, and each one locks 0.00203928 SOL as a rent deposit that wallets tend to display as if it were a fee. Buying a new token, claiming an airdrop, minting an NFT and trading memecoins all open accounts in your name. The accounts remain after the tokens are gone, so the deposits pile up until you close them. At $150 per SOL, for illustration, each account is about 31 cents, which is why nobody notices until there are a few hundred.

Is the 0.002 SOL on a swap really a network fee?#

No. The roughly 0.002 SOL is a rent deposit on a new token account, and the true network fee is far smaller. A Solana transaction pays a base fee of 5,000 lamports per signature (0.000005 SOL) plus an optional priority fee. The deposit for a new SPL token account is 2,039,280 lamports, about 400 times the base fee. Wallet popups add everything into one "SOL leaving your wallet" figure, so the deposit looks like a cost.

The difference matters because the two behave differently:

Network feeRent deposit
Typical size0.000005 SOL plus priority fee0.00203928 SOL per token account
ChargedOn every transactionOnly when a new account is created
Goes toValidators, with part of the base fee burnedThe new account itself, which you own
RefundableNoYes, when the account is closed

How the fee side works is covered in Solana transaction fees explained. The rest of this post is about where the accounts come from.

What happens to your wallet during a swap?#

A swap into a token you have never held creates a token account that outlives the trade, and swapping back out leaves it empty rather than closed. Here is the sequence when you buy a new token with SOL on Jupiter:

  1. Jupiter's transaction checks whether your wallet has an associated token account (ATA) for the output token. An associated token account is the token account at the address derived from your wallet and that token's mint.
  2. If the ATA does not exist, the transaction creates it and your wallet funds it with 0.00203928 SOL.
  3. Your SOL is wrapped into a temporary wSOL account, because DEX programs work with SPL tokens and not with native SOL.
  4. The swap runs through one or more pools, and the output tokens land in the new ATA.
  5. The temporary wSOL account is closed at the end of the same transaction, and its rent returns to you immediately.

Step 5 shows that the mechanism for getting rent back is built into every swap. It is applied to the temporary wSOL account and never to the output token's account, because that account has to stay open to hold what you just bought. When you sell later, the balance goes to zero and the account stays. When a multi-step swap flow is interrupted, a wSOL account can be left behind too, which I cover in what wrapped SOL is.

Who pays for the token account in an airdrop?#

In an airdrop the token account is paid for either by the sender or by you, depending on whether the tokens are pushed or claimed.

  • Pushed airdrops. The project sends tokens directly to a list of wallets. The sender's transaction creates each recipient's ATA and the sender pays the deposit. The cost side of this is in how to airdrop tokens on Solana. For the recipient it amounts to a small gift: once you sell or move the tokens, the 0.00203928 SOL in that account is yours to reclaim.
  • Claimed airdrops. You visit a claim page and sign a transaction. That transaction typically creates your ATA, so the deposit comes out of your wallet.
  • Unsolicited tokens. Spam tokens arrive the same way as pushed airdrops. The spammer paid the deposit. If the token is worthless or suspicious, do not try to sell it through the link it advertises. Burning the balance and closing the account removes it from your wallet and sends the spammer's deposit to you.

Airdrop farming multiplies this effect. Wallets that interact with many protocols in search of eligibility collect a token account from almost every one of them: receipt tokens, points tokens, LP tokens, reward tokens.

How many accounts does an NFT mint create?#

A standard Metaplex NFT mint creates four accounts, all funded by the minter, and costs roughly 0.02 SOL in deposits and fees before any mint price. Metaplex is the program suite that defines the NFT standard on Solana.

AccountPurposeApproximate cost
MintDefines the token with a supply of one0.0014616 SOL
Token accountHolds the NFT in your wallet0.00203928 SOL
MetadataName, symbol, URI, creatorsabout 0.0151 SOL, including a 0.01 SOL Metaplex fee
Master editionProves the supply is fixed at oneabout 0.0028 SOL

Programmable NFTs (pNFTs) add a token record account on top. If you sell or transfer the NFT, the metadata and edition accounts travel with it, and only your now-empty token account remains with you. If you keep an NFT you no longer want, burning it through the Metaplex program closes the token account, metadata and master edition, and usually returns between 0.006 and 0.01 SOL. The Metaplex creation fee is not refunded. The NFT Burner shows the exact amount for each item before you sign and charges 5% of the SOL reclaimed.

Compressed NFTs work differently. A compressed NFT is an entry in a shared Merkle tree, not a set of accounts in your wallet, so it locks no rent for you and returns nothing when burned.

Why do memecoin traders end up with hundreds of accounts?#

Memecoin trading creates accounts faster than any other activity because every new token needs its own account, and the whole style of trading is to touch many tokens briefly. Launchpad tokens in the pump.fun mould, tokens on Raydium pools, tokens bought through Telegram bots: each first purchase opens an ATA. Buy thirty new tokens in a week and you have paid about 0.061 SOL in deposits, none of it labelled as such.

Selling does not always empty the account either. Two patterns are common:

  • Dust. Selling "100%" through some interfaces leaves a fraction of a token behind because of rounding or a transfer fee. The account is then not empty, and the SPL Token program will not close it.
  • Dead tokens. When the liquidity is gone there is nothing to sell into, and the balance stays in the account indefinitely.

For dust that still has a route, Sell Dust for SOL swaps each small balance through Jupiter and closes the account in the same transaction; the fee is 1% of the SOL received plus 5% of the rent reclaimed. Dead balances can only be burned, which is permanent, so check the value first.

Why does nobody tell you about the deposit?#

Nobody mentions the deposit because it is no one's revenue and each instance is tiny. The swap interface does not receive it, the wallet does not receive it, and the network does not spend it; it sits in an account you own. Wallets show a single net SOL change. Hiding zero-balance tokens is a sensible default for a portfolio view, and it also hides the evidence.

The scale works against noticing as well. One account is 0.00203928 SOL. Nobody audits a wallet over that. The amounts only become interesting in aggregate:

  • 60 first-time token buys: about 0.122 SOL
  • 15 claimed airdrops: about 0.031 SOL
  • 10 NFTs minted and later sold: about 0.020 SOL left in empty token accounts

That illustrative wallet has about 0.173 SOL sitting in accounts it no longer uses, roughly $26 at $150 per SOL. The original version of this post put a dollar figure in the headline; I have removed it because the SOL price moves and the lamport amounts do not. For a proper estimate of your own wallet, see how much SOL you can recover from token accounts.

How do you get the deposits back?#

You get the deposits back by closing the empty accounts, because Solana never does it for you. Closing requires the owner's signature, so no program can tidy your wallet on your behalf. The options:

  1. Close accounts one at a time from a wallet that offers the option in a token's menu, which suits a handful of accounts.
  2. Use spl-token close or spl-token gc from the SPL Token CLI, which costs only network fees.
  3. Use the SOLTidy Token Account Closer, which scans the SPL Token program and Token-2022, preselects empty accounts, packs up to 8 closes into each transaction, and charges 5% of the rent recovered. Pasting an address gives a read-only preview before you connect anything.

Do not close accounts for tokens you are still actively trading; the next buy pays the deposit again. And before closing anything through any site, read is it safe to close Solana token accounts: the closing is safe, but fake cleanup sites exist.

Bottom line#

The 0.002 SOL that shows up on swaps, claims and mints is a refundable deposit on an account you own, and the real Solana network fee is a small fraction of it. Accounts accumulate with the number of different tokens and NFTs you touch, which makes memecoin traders, airdrop hunters and NFT minters the wallets with the most SOL stranded. Nothing closes those accounts for you. Once you know where they come from, recovering the deposits takes a few minutes every few months. It is the chore that led me to build SOLTidy in the first place, as I describe on the about page.

Questions & answers

Why did my Solana swap cost 0.002 SOL more than expected?

Because the swap created a new token account. When you buy a token your wallet has never held, the swap transaction first creates an associated token account for it, and that account must hold a rent-exempt deposit of 0.00203928 SOL. The actual network fee was far smaller: 5,000 lamports per signature plus any priority fee. The deposit is refundable when the account is closed.

Do I pay the 0.002 SOL again every time I buy the same token?

No. The deposit is paid once, when the token account is created. As long as that account exists, later purchases of the same token only pay network fees, even if the balance dropped to zero in between. You pay the deposit again only if the account was closed and has to be recreated, and in that case you already received the earlier deposit back.

Why does Solana not close empty token accounts automatically?

The SPL Token program has no way of knowing whether you will receive that token again, and closing an account requires the owner's signature. An empty account is a valid state: it keeps your address for that token ready to receive. So the account, and the 0.00203928 SOL inside it, stays until you sign a CloseAccount instruction yourself.

Who pays for the token account when I receive an airdrop?

It depends on how the airdrop is delivered. When a project pushes tokens directly to wallets, the sender normally pays to create each recipient's token account. When you claim through a website, the claim transaction you sign usually creates the account and you pay the 0.00203928 SOL deposit. In both cases the account belongs to you, so you receive the deposit when you close it.

How much SOL does minting an NFT lock up on Solana?

A standard Metaplex NFT needs a mint account (0.0014616 SOL), a token account (0.00203928 SOL), a master edition (about 0.0028 SOL) and a metadata account (about 0.0151 SOL, which includes a 0.01 SOL Metaplex creation fee). That is roughly 0.02 SOL paid by the minter on top of any mint price. Compressed NFTs avoid these accounts and hold no rent.

Does trading the same few tokens create more token accounts?

No. A wallet has one associated token account per token mint, however many times you trade that token. Swapping between SOL and USDC a thousand times uses the same USDC account throughout. Accounts accumulate with the number of different tokens you touch, which is why memecoin traders and airdrop hunters end up with hundreds while large SOL and stablecoin traders have very few.