Create: Dynamic AMM Pool
Last updated
Last updated
Get an overview about Dynamic AMM Pools .
Below we provide the steps to use Bun to configure and run sample scripts to conveniently set up a permissionless Dynamic AMM Pool (with fixed fee %) on your own.
Note: For a Dynamic AMM Pool with a fee scheduler and liquidity permanently locked at pool creation (a.k.a Memecoin Pool v1), visit .
Clone repo:
Config list to reference:
Readme:
Dynamic AMM Program ID: Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB
Dynamic AMM API endpoints:
Devnet:
Install Bun: You'll also need to run the scripts. Install it via . Then install the dependencies by running the command bun install
The following code examples can be used to initialize and seed a Dynamic AMM liquidity pool on Meteora.
Run the script with the config file which is set with your preferred parameters
To create a Dynamic AMM Pool with an existing token (without minting a new token).
Run this script with the config file which is set with your preferred parameters:
bun run src/create_pool.ts --config <./config/create_dynamic_amm_pool.json>
Replace <./config/create_dynamic_amm_pool.json>
with the path to your config file, after you have selected the type of config from the list and set your config parameters.
To mint a new token and create a Dynamic AMM Pool for this token.
Run this script with the config file which is set with your preferred parameters:
bun run src/create_pool.ts --config ./config/create_dynamic_amm_pool_with_new_token.json
You have the option to lock liquidity in the Dynamic AMM Pool you created.
Run this script with the config file which is set with your preferred parameters:
bun run src/lock_liquidity.ts --config ./config/lock_liquidity.json
Allocating fees from locked liquidity: In the config file, you can also specify different wallet addresses to receive fees from the locked liquidity, and the % to allocate to each wallet. Multiple wallets are possible, but their allocations must add up to 100%.
To view pool on the UI, access the link below
For Dynamic AMM pool: https://app.meteora.ag/pools/<POOL_ADDRESS>
CustomizablePermissionless Dynamic AMM: After pool activation point (trading starts)
There are various config files that can be found in the config
directory. It contains all the configurations required to run the scripts.
We also need to provide the keypair for the payer wallet in keypair.json
file.
rpcUrl
: Solana RPC URL to get data and send transactions.
keypairFilePath
: Keypair file path to send transactions.
dryRun
: Set to true to send transactions.
computeUnitPriceMicroLamports
: CU price in micro lamports unit. For example: 100000.
createBaseToken
: Configuration to create base token.
baseMint
: Base token address if the createBaseToken
field is not set.
quoteSymbol
: Quote token symbol, only SOL
or USDC
is supported.
quoteMint
: Quote token mint, in case the user wants to create a DLMM launch pool with a token other than SOL or USDC.
dynamicAmm
: Dynamic AMM pool configuration.
createBaseToken
and baseMint
cannot be used together.
dynamicAmm
and dlmm
cannot be used together.
mintBaseTokenAmount
: Base token amount to be minted.
baseAmount
: Base token amount.
quoteAmount
: Quote token amount.
tradeFeeNumerator
: Trade fee numerator, with fee denominator is set to 100_000.
activationType
: To activate pool trading based on slot
or timestamp
.
activationPoint
: To activate pool trading at a point, either slot valut or timestamp value based on activationType
.
hasAlphaVault
: Whether alpha vault is enabled or not for this pool.
First, run the localnet
Then run the test: bun test
Clone repo:
Select an example config from the list to reference and change the parameters inside according to your needs: