Library note

How an associated token account address is derived

People send tokens to a wallet address and then wait. The SPL Token program expects a token account. The associated address is the usual way to find it.

Two blank envelopes placed side by side on gray stone

The address is a rule, not a nickname

An associated token account is a token account whose address is derived. The seeds are the owner's wallet address, the token program id, and the mint address. The associated token program is what derives that address. Change any one of the three and you are describing a different account.

Two people can hold the same mint and still have different token accounts. That is the ordinary case. The mint is shared. The token account is not. At the Saturday workshop we put two envelopes on the table, same size, different place, so the room remembers the distinction without a diagram full of arrows.

What the sender actually needs

A transfer instruction names a source token account, a destination token account, and the owner of the source. It does not take a bare wallet and invent the rest. If the receiver has never had an account for that mint, the associated token account may not exist yet. Someone has to create it, and that creation costs the rent-exemption lamports.

When a reader says the tokens never arrived, we ask three addresses: the source token account, the destination they typed, and the associated address derived from the receiver's wallet and the mint. Quite often the destination was the wallet itself. The tokens did not vanish. They were sent to an account the token program does not treat as a balance holder for that mint.

Check the derivation, then the fields

Derivation tells you where the account should be. It does not tell you the amount, the state, or the delegate. After the address matches, you still read the token account fields. A derived address can point at a frozen account. It can point at an account whose close authority is not the wallet you expected.

In the workshop we treat a matching address as the start of the reading, the way a call number gets you to the right shelf and not to the sentence you need. The sentence is the field list.

Back to library notes · Reserve a desk