Skip to main content
To create a new liquidity pool on Saros AMM, you first need to configure the tokens for the pair and find their Associated Token Accounts (ATAs). This guide will walk you through these initial setup steps.

1. Configure Token Details

First, create a constants.ts file to store the details of the tokens you want to create a pool for. This makes it easy to reuse token information across your project. For this example, we’ll configure PYUSD and WSOL on the devnet.
constants.ts

2. Find Associated Token Accounts (ATAs)

Next, we need to find the ATAs for these tokens for a specific wallet. Create a new file named get-ata.ts and add the following script. This script uses the @solana/spl-token library to find the ATAs for our configured tokens.
get-ata.ts
The loadWalletFromCLI() function is a placeholder for your own wallet loading logic. You can use any method you prefer to provide a keypair, such as importing from a JSON file or using Keypair.generate() for a new wallet.

3. Run the Script

Now, compile your TypeScript files and run the script to get the ATAs.
You should see an output similar to this:

4. Update Token Configuration

Finally, update your constants.ts file with the ATAs you just retrieved. This will be useful when you interact with the pool.
constants.ts
Now you have all the necessary information to proceed with creating a pool.