3

The docs mention both 'Token Account' and an 'Associated Token Account'.

Are 'Token Account' and 'Associated Token Account' the same thing, or different?

What is the relationship between these two?

2 Answers 2

4

Thanks to Jordan Sexton for helping me out with this on the phone.

An 'Associated Token Account' refers to the address:

Addresses
  Pubkeys (on the curve)
  PDA (off the curve)
    ATA (PDA for storing tokens of a particular mint in a wallet)
    Any other PDA (for example, some data used by an on-chain program)

A 'Token Account' refers to the byte format

Byte format (ie, what's inside the account at an address)

Account contents
  Not token accounts
  Token accounts
    SPL Token
    SPL Token 22
    Any other token program

An 'associated token account' is a token account (byte format) that lives at an associated token account address (address).

-1

Token Account: A Token Account is a regular Solana account that holds a specific type of token. It is similar to a regular Solana account but is specifically designed to hold tokens. Each token on the Solana blockchain has its own associated Token Account.

Associated Token Account: An Associated Token Account is a special type of account that is associated with a particular wallet or address. It is created using a program called the Token Program, which is responsible for managing token-related operations on the Solana blockchain. Associated Token Accounts are automatically created when a user interacts with a token for the first time. They are linked to the user's main wallet or address and are used to hold and manage specific tokens associated with that wallet.

A wallet address can have 1 associated token account for 1 token and multiple token accounts for that token.

When a user transfers a token from 1 wallet to another, it uses associated token accounts, since it is uniquely identified for each token per wallet.

Example usage of Token Account: If a user tries to stake a token from the wallet, the smart contract creates a token account for the staked token to lock in the token.

2
  • this isn't quite correct - each 'token' actually has a Mint account that stores things like mint authority. Both token accounts and associated token accounts store per-user token information, like balances.
    – Proph3t
    Sep 21, 2023 at 14:08
  • how does Mint account comes into play when we are discussing Token & associated token account? Sep 25, 2023 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.