Network
Launch Date
Consensus
Note
Sepolia
Oct 2021
PoW
Like-for-like representation of Ethereum
Görli
Jan 2019
PoA
Proof-of-Authority
Kiln
Mar 2022
PoS
Post-Merge (for ETH2), shadow fork of the mainnet
Kintsugi
Dec 2021
PoS
DEPRECATED, use Kiln; post-Merge (for ETH2)
Ropsten
Nov 2016
PoW
DEPRECATED, use Sepolia; the Merge to happen on Jun 8, 2022
Rinkeby
Apr 2017
PoA
DEPRECATED, use Görli and Görli Faucet
Kovan
Mar 2017
PoA
DEPRECATED, use Sepolia or Görli
List of active and deprecated Ethereum testnets, including Kintsugi.
Features
Optimistic rollup 
ZK-rollup 
Proof
Uses fraud proofs to prove transaction validity. 
Uses validity (zero-knowledge) proofs to prove transaction validity. 
Capital efficiency
Requires waiting through a 1-week delay (dispute period) before withdrawing funds. 
Users can withdraw funds immediately because validity proofs provide incontrovertible evidence of the authenticity of off-chain transactions. 
Data compression
Publishes full transaction data as calldata to Ethereum Mainnet, which increases rollup costs. 
Doesn't need to publish transaction data on Ethereum because ZK-SNARKs and ZK-STARKs already guarantee the accuracy of the rollup state. 
EVM compatibility
Uses a simulation of the Ethereum Virtual Machine (EVM), which allows it to run arbitrary logic and support smart contracts. 
Doesn't widely support EVM computation, although a few EVM-compatible ZK-rollups have appeared. 
Rollup costs
Reduces costs since it publishes minimal data on Ethereum and doesn't have to post proofs for transactions, except in special circumstances. 
Faces higher overhead from costs involved in generating and verifying proofs for every transaction block. ZK proofs require specialized, expensive hardware to create and have high on-chain verification costs. 
Trust assumptions
Doesn't require a trusted setup. 
Requires a trusted setup to work. 
Liveness requirements
Verifiers are needed to keep tabs on the actual rollup state and the one referenced in the state root to detect fraud. 
Users don't need someone to watch the L2 chain to detect fraud. 
Security properties 
Relies on cryptoeconomic incentives to assure users of rollup security. 
Relies on cryptographic guarantees for security. 
Start building
on Alchemy.
Sign up for free
Start building on Optimism.
Sign up for free
Start building on Arbitrum.
Sign up for free
Start building on Ethereum.
Sign up for free
Start building on Polygon.
Sign up for free
Start building on Starknet.
Sign up for free
Start building on Flow.
Sign up for free
kiln faucet
Get free Kiln ETH.
Start building today
Goerli faucet
Get free Goerli ETH.
Start building today
SEPOLIA FAUCET
Get free Sepolia ETH.
Start Building Today
mumbai faucet
Get free Mumbai Matic.
Start building today
rinkeby faucet
Get free Rinkeby
ETH.
Start building today
Start building on Ethereum.
Get started for free
Start building on Ethereum.
Get started for free
Start building on Flow.
Get started for free
Start building on Polygon.
Get started for free
Start building on Starknet.
Get started for free
Start building on Optimism.
Get started for free
Start building on Solana.
Get started for free
Start building on Solana.
Sign up for beta access
Start building on Solana.
Join the waitlist
Arbitrum logo
Start building on Arbitrum.
Get started for free
Build with Alchemy's
Gas Manager & Bundler APIs
Learn
Solidity at
Alchemy
University
Get started today
Build with Alchemy's
Gas Manager & Bundler APIs
curl 
https://release.solana.com/v1.10.32/solana-install-init-x86_64-pc-windows-msvc.exe 
--output 
C:\solana-install-tmp\solana-install-init.exe 
--create-dirs
Solana
SOLANA ASSOCIATED TOKEN ACCOUNT

What is an Solana Associated Token Account on Solana?

Learn What an Associated Token Account Is, How it Works, and How to Create One
Last Updated:
January 26, 2023
Table of Contents
Table of Contents
Table of Contents

{{get-started-solana}}

The Solana Account Model organizes and stores all on-chain data, and Associated Token Accounts (ATAs) are one of the key pieces of that model. This article will explain what an ATA is, how it works, and how to create an Associated Token Account for yourself.

What is an Associated Token Account?

An Associated Token Account is created via the Solana Associated Token Account Program, which holds information about a specific token, its balance, and its owner. It is a variant of a Program Derived Address.

Here’s what each term means:

  • Associated Token Account - an account that is associated with a token (think of Solana Token Program)
  • Program Derived Address - an address that has been “derived” (created) from a Solana Program, namely, the Associated Token Account Program

How do Associated Token Accounts and transfers between them work? 

Transfers between Associated Token Accounts occur directly between the accounts, and indirectly through their wallet addresses.

Token accounts are the equivalent of an ERC-20 token on Ethereum, but with a foundational difference: Ethereum smart contracts own its state and code, and a token account on Solana contains only its code and “exports” its state (e.g. token balance) into an Associated Token Account, which is created for each owner of that token.

Let’s quickly examine USDC for an overview of what we’ve learned so far:

  • USDC on Solana is a token account
  • A token account is created by the System Program but initialized as Token mint by the SPL Token Program
  • Once the USDC token has been initiated, users can start making transfers
  • Users with USDC tokens have Associated Token Accounts that are created through the Associated Token Account Program (ATP)
  • The exchange of USDC between two people happens between the users’ ATAs

Associated Token Account on Solana

USDC transfers directly occur between the users’ ATAs and indirectly between their wallet addresses on Solana nodes. These transfers must be between users, whose ATAs have been created with the same token mint seed.

What is the Associated Token Account Program?

Being part of the Solana Program Library, the Associated Token Account Program is the parent program for every ATA, that maps a user’s wallet to the ATAs that he has authority over. Additionally, the ATA Program ensures that if a user wants to send a token to another user, the recipient will get it, even if he does not have an ATA for the corresponding token. The program will automatically create an ATA account in this case while the smart contract is executed on an RPC node.

The source code for the Associated Token Account Program is written in Rust and can be checked on GitHub.

Here’s how an ATA is created under the hood on TypeScript:

Source code for creating the Associated Account Program on Solana

How does the Associated Token Account Program work?

Here's what is happening in the ATA program:

1. Get IDs for Constants

First, we get the `TOKEN_PROGRAM_ID` and `SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID` constants. A program ID is a fancier name for the program’s address.

2. Get the findAssociatedTokenAddress Function

Then, we proceed with the `findAssociatedTokenAddress` function, which returns publicKey, which will be the address of the newly created ATA.

3. Invoke the findProgramAddress Method

In the body of the function, the `findProgramAddress` method is invoked and two arguments are passed to it:

  • An Array of Seeds
  • SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID

Since ATA is a form of a Program Derived Address (PDA), the account can be created by passing arguments to the program. The creation of a PDA involves passing seeds as arguments and in this case, they are:

  1. wallet_address - the address of the account, which will own the funds in the ATA (authority)
  2. token_program_id - the program ID of the SPL Token Program
  3. token_mint_address - the address of the Token account that will be stored in the ATA

3b. The SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID

This is the program ID of the Associated Token Account Program.

How to Create an Associated Token Account

Creating an Associated Token Account is as simple as calling create-token using the spl-token-cli on Solana. Creating an ATA also assumes that the token with which it will be “associated” already exists.

Creating an associated token account on Solana

The code invokes the `create-account` command, which accepts `<TOKEN_MINT_ADDRESS>` as an argument.

To create an Associated Token Account, you must follow these four steps:

  1. Transfer SOL - the System Program initializes the ATA and makes it rent-exempt
  2. Create Free Space - the System Program assigns free space for the ATA.
  3. Transfer Ownership - he System Program transfers ownership of the account to the SPL Associated Token Account Program
  4. Initialize the Account - the process summarizes the account initialization and sets the token address, the newly created ATA address, and its owner

What's the difference between owners and authorities?

Owner is the type of Solana program that controls the ATA, while authority is the account (wallet), that sends a transaction to the owner program, which then changes the data in the ATA on behalf of the authority.

What is the cost of an Associated Token Account?

By default, Associated Token Accounts must be marked as rent-exempt upon their creation, so the minimum amount that an account must hold should be at least 0.00203928 SOL. The System Program transfers this SOL to the ATA, which is deducted from the account that initiating the transaction. 

Other than that initial fee, any further interaction will cost no more than an ordinary transaction on Solana.

How to Check an Associated Token Account

You can check an Associated Token Account through clients like Phantom that automatically derive all the ATAs that a user’s wallet has authority over. Additionally, since the blockchain is public, you can also access this information with the help of an explorer like Solscan.io.

Paste the address of the wallet that you’d like to check and its ATAs will be visualized under Token Accounts:

Solscan.io interface to check ATAs of a wallet.

Can you link an Associated Token Account to an existing account?

Linking an Associated Token Account to an existing account is done by default behind the scenes. Due to the way an ATA is created, a program or a client can easily see the seeds of every account. They could be regarded as ‘links’ to:

  • the wallet that has authority over the ATA.
  • the address of the Token account (i.e. the token type that the ATA holds).

Build Your Solana Dapp with Alchemy

Learning about the Associated Token Account is one of the first steps to becoming a fully-fledged Solana developer. You can use our user-friendly Solana API to get a head start on building your first dApp once you've mastered Solana nodes and selected an RPC provider.

ALCHEMY SUPERNODE - ETHEREUM NODE API

Scale to any size, without any errors

Alchemy Supernode finally makes it possible to scale blockchain applications without all the headaches. Plus, our legendary support will guide you every step of the way.

Get started for free
Supernode footer
Solana
SOLANA ASSOCIATED TOKEN ACCOUNT

What is an Associated Token Account on Solana?

Learn What an Associated Token Account Is, How it Works, and How to Create One
Last Updated:
January 26, 2023
Last Updated:
August 24, 2022
Don't miss an update
Sign up for our newsletter to get alpha, key insights, and killer resources.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Table of Contents

Talk to an Expert

Learn how Alchemy's blockchain developer tools can help your business succeed in web3!
Valid number
Thank you! An Alchemy expert will be in touch with you shortly!
Oops! Something went wrong while submitting the form.

{{get-started-solana}}

Table of Contents

The Solana Account Model organizes and stores all on-chain data, and Associated Token Accounts (ATAs) are one of the key pieces of that model. This article will explain what an ATA is, how it works, and how to create an Associated Token Account for yourself.

What is an Associated Token Account?

An Associated Token Account is created via the Solana Associated Token Account Program, which holds information about a specific token, its balance, and its owner. It is a variant of a Program Derived Address.

Here’s what each term means:

  • Associated Token Account - an account that is associated with a token (think of Solana Token Program)
  • Program Derived Address - an address that has been “derived” (created) from a Solana Program, namely, the Associated Token Account Program

How do Associated Token Accounts and transfers between them work? 

Transfers between Associated Token Accounts occur directly between the accounts, and indirectly through their wallet addresses.

Token accounts are the equivalent of an ERC-20 token on Ethereum, but with a foundational difference: Ethereum smart contracts own its state and code, and a token account on Solana contains only its code and “exports” its state (e.g. token balance) into an Associated Token Account, which is created for each owner of that token.

Let’s quickly examine USDC for an overview of what we’ve learned so far:

  • USDC on Solana is a token account
  • A token account is created by the System Program but initialized as Token mint by the SPL Token Program
  • Once the USDC token has been initiated, users can start making transfers
  • Users with USDC tokens have Associated Token Accounts that are created through the Associated Token Account Program (ATP)
  • The exchange of USDC between two people happens between the users’ ATAs

Associated Token Account on Solana

USDC transfers directly occur between the users’ ATAs and indirectly between their wallet addresses on Solana nodes. These transfers must be between users, whose ATAs have been created with the same token mint seed.

What is the Associated Token Account Program?

Being part of the Solana Program Library, the Associated Token Account Program is the parent program for every ATA, that maps a user’s wallet to the ATAs that he has authority over. Additionally, the ATA Program ensures that if a user wants to send a token to another user, the recipient will get it, even if he does not have an ATA for the corresponding token. The program will automatically create an ATA account in this case while the smart contract is executed on an RPC node.

The source code for the Associated Token Account Program is written in Rust and can be checked on GitHub.

Here’s how an ATA is created under the hood on TypeScript:

Source code for creating the Associated Account Program on Solana

How does the Associated Token Account Program work?

Here's what is happening in the ATA program:

1. Get IDs for Constants

First, we get the `TOKEN_PROGRAM_ID` and `SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID` constants. A program ID is a fancier name for the program’s address.

2. Get the findAssociatedTokenAddress Function

Then, we proceed with the `findAssociatedTokenAddress` function, which returns publicKey, which will be the address of the newly created ATA.

3. Invoke the findProgramAddress Method

In the body of the function, the `findProgramAddress` method is invoked and two arguments are passed to it:

  • An Array of Seeds
  • SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID

Since ATA is a form of a Program Derived Address (PDA), the account can be created by passing arguments to the program. The creation of a PDA involves passing seeds as arguments and in this case, they are:

  1. wallet_address - the address of the account, which will own the funds in the ATA (authority)
  2. token_program_id - the program ID of the SPL Token Program
  3. token_mint_address - the address of the Token account that will be stored in the ATA

3b. The SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID

This is the program ID of the Associated Token Account Program.

How to Create an Associated Token Account

Creating an Associated Token Account is as simple as calling create-token using the spl-token-cli on Solana. Creating an ATA also assumes that the token with which it will be “associated” already exists.

Creating an associated token account on Solana

The code invokes the `create-account` command, which accepts `<TOKEN_MINT_ADDRESS>` as an argument.

To create an Associated Token Account, you must follow these four steps:

  1. Transfer SOL - the System Program initializes the ATA and makes it rent-exempt
  2. Create Free Space - the System Program assigns free space for the ATA.
  3. Transfer Ownership - he System Program transfers ownership of the account to the SPL Associated Token Account Program
  4. Initialize the Account - the process summarizes the account initialization and sets the token address, the newly created ATA address, and its owner

What's the difference between owners and authorities?

Owner is the type of Solana program that controls the ATA, while authority is the account (wallet), that sends a transaction to the owner program, which then changes the data in the ATA on behalf of the authority.

What is the cost of an Associated Token Account?

By default, Associated Token Accounts must be marked as rent-exempt upon their creation, so the minimum amount that an account must hold should be at least 0.00203928 SOL. The System Program transfers this SOL to the ATA, which is deducted from the account that initiating the transaction. 

Other than that initial fee, any further interaction will cost no more than an ordinary transaction on Solana.

How to Check an Associated Token Account

You can check an Associated Token Account through clients like Phantom that automatically derive all the ATAs that a user’s wallet has authority over. Additionally, since the blockchain is public, you can also access this information with the help of an explorer like Solscan.io.

Paste the address of the wallet that you’d like to check and its ATAs will be visualized under Token Accounts:

Solscan.io interface to check ATAs of a wallet.

Can you link an Associated Token Account to an existing account?

Linking an Associated Token Account to an existing account is done by default behind the scenes. Due to the way an ATA is created, a program or a client can easily see the seeds of every account. They could be regarded as ‘links’ to:

  • the wallet that has authority over the ATA.
  • the address of the Token account (i.e. the token type that the ATA holds).

Build Your Solana Dapp with Alchemy

Learning about the Associated Token Account is one of the first steps to becoming a fully-fledged Solana developer. You can use our user-friendly Solana API to get a head start on building your first dApp once you've mastered Solana nodes and selected an RPC provider.

The Solana Account Model organizes and stores all on-chain data, and Associated Token Accounts (ATAs) are one of the key pieces of that model. This article will explain what an ATA is, how it works, and how to create an Associated Token Account for yourself.

What is an Associated Token Account?

An Associated Token Account is created via the Solana Associated Token Account Program, which holds information about a specific token, its balance, and its owner. It is a variant of a Program Derived Address.

Here’s what each term means:

  • Associated Token Account - an account that is associated with a token (think of Solana Token Program)
  • Program Derived Address - an address that has been “derived” (created) from a Solana Program, namely, the Associated Token Account Program

How do Associated Token Accounts and transfers between them work? 

Transfers between Associated Token Accounts occur directly between the accounts, and indirectly through their wallet addresses.

Token accounts are the equivalent of an ERC-20 token on Ethereum, but with a foundational difference: Ethereum smart contracts own its state and code, and a token account on Solana contains only its code and “exports” its state (e.g. token balance) into an Associated Token Account, which is created for each owner of that token.

Let’s quickly examine USDC for an overview of what we’ve learned so far:

  • USDC on Solana is a token account
  • A token account is created by the System Program but initialized as Token mint by the SPL Token Program
  • Once the USDC token has been initiated, users can start making transfers
  • Users with USDC tokens have Associated Token Accounts that are created through the Associated Token Account Program (ATP)
  • The exchange of USDC between two people happens between the users’ ATAs

Associated Token Account on Solana

USDC transfers directly occur between the users’ ATAs and indirectly between their wallet addresses on Solana nodes. These transfers must be between users, whose ATAs have been created with the same token mint seed.

What is the Associated Token Account Program?

Being part of the Solana Program Library, the Associated Token Account Program is the parent program for every ATA, that maps a user’s wallet to the ATAs that he has authority over. Additionally, the ATA Program ensures that if a user wants to send a token to another user, the recipient will get it, even if he does not have an ATA for the corresponding token. The program will automatically create an ATA account in this case while the smart contract is executed on an RPC node.

The source code for the Associated Token Account Program is written in Rust and can be checked on GitHub.

Here’s how an ATA is created under the hood on TypeScript:

Source code for creating the Associated Account Program on Solana

How does the Associated Token Account Program work?

Here's what is happening in the ATA program:

1. Get IDs for Constants

First, we get the `TOKEN_PROGRAM_ID` and `SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID` constants. A program ID is a fancier name for the program’s address.

2. Get the findAssociatedTokenAddress Function

Then, we proceed with the `findAssociatedTokenAddress` function, which returns publicKey, which will be the address of the newly created ATA.

3. Invoke the findProgramAddress Method

In the body of the function, the `findProgramAddress` method is invoked and two arguments are passed to it:

  • An Array of Seeds
  • SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID

Since ATA is a form of a Program Derived Address (PDA), the account can be created by passing arguments to the program. The creation of a PDA involves passing seeds as arguments and in this case, they are:

  1. wallet_address - the address of the account, which will own the funds in the ATA (authority)
  2. token_program_id - the program ID of the SPL Token Program
  3. token_mint_address - the address of the Token account that will be stored in the ATA

3b. The SPL_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID

This is the program ID of the Associated Token Account Program.

How to Create an Associated Token Account

Creating an Associated Token Account is as simple as calling create-token using the spl-token-cli on Solana. Creating an ATA also assumes that the token with which it will be “associated” already exists.

Creating an associated token account on Solana

The code invokes the `create-account` command, which accepts `<TOKEN_MINT_ADDRESS>` as an argument.

To create an Associated Token Account, you must follow these four steps:

  1. Transfer SOL - the System Program initializes the ATA and makes it rent-exempt
  2. Create Free Space - the System Program assigns free space for the ATA.
  3. Transfer Ownership - he System Program transfers ownership of the account to the SPL Associated Token Account Program
  4. Initialize the Account - the process summarizes the account initialization and sets the token address, the newly created ATA address, and its owner

What's the difference between owners and authorities?

Owner is the type of Solana program that controls the ATA, while authority is the account (wallet), that sends a transaction to the owner program, which then changes the data in the ATA on behalf of the authority.

What is the cost of an Associated Token Account?

By default, Associated Token Accounts must be marked as rent-exempt upon their creation, so the minimum amount that an account must hold should be at least 0.00203928 SOL. The System Program transfers this SOL to the ATA, which is deducted from the account that initiating the transaction. 

Other than that initial fee, any further interaction will cost no more than an ordinary transaction on Solana.

How to Check an Associated Token Account

You can check an Associated Token Account through clients like Phantom that automatically derive all the ATAs that a user’s wallet has authority over. Additionally, since the blockchain is public, you can also access this information with the help of an explorer like Solscan.io.

Paste the address of the wallet that you’d like to check and its ATAs will be visualized under Token Accounts:

Solscan.io interface to check ATAs of a wallet.

Can you link an Associated Token Account to an existing account?

Linking an Associated Token Account to an existing account is done by default behind the scenes. Due to the way an ATA is created, a program or a client can easily see the seeds of every account. They could be regarded as ‘links’ to:

  • the wallet that has authority over the ATA.
  • the address of the Token account (i.e. the token type that the ATA holds).

Build Your Solana Dapp with Alchemy

Learning about the Associated Token Account is one of the first steps to becoming a fully-fledged Solana developer. You can use our user-friendly Solana API to get a head start on building your first dApp once you've mastered Solana nodes and selected an RPC provider.

{{get-started-solana}}

Contact Us

Talk to an expert at Alchemy to answer all of your product questions.
Valid number
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Build blockchain magic with Alchemy

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get started for free