TypeScript Code Examples
Memecoin Pools are a subset of Dynamic AMM Pools. A Memecoin Pool is a Dynamic AMM Pool that has a fee scheduler, with liquidity permanently locked at pool creation.
Memecoin Pools can be integrated with platforms such as memecoin launchpads to support liquidity and trading for the token after it has graduated from the launchpad.
To create a new Memecoin Pool or for integration purposes, you can use the Dynamic AMM TypeScript SDK with the code example highlighted below.
Getting Started
Dynamic AMM SDK: https://github.com/mercurial-finance/mercurial-dynamic-amm-sdk
Dynamic AMM Program ID: Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB
Dynamic AMM API endpoints: https://amm-v2.meteora.ag/swagger-ui/
Devnet: https://devnet.meteora.ag/
1. Install dependencies and initialize AmmImpl instance
1.1 Install dependencies
1.2 Initialize AmmImpl instance
2. Fee Schedule Setup: Choose a suitable Pool and Fee Config
Choose a suitable Pool and Fee Config by following the instructions here.
What fee parameters to choose depends on your project's needs. You will need to look at the pool config list and choose a suitable
pool_config_key
with your preferred fee parameters.If you want to create an Alpha Vault along with your new pool, you also need to find a
pool_config_key
that is mapped to avault_config_key
that meets your requirements.If none of the
pool_config_key
in the list meet your requirements, please reach out to Meteora for a custom pool config key.
3. Create a Memecoin Pool
After you have selected your preferred pool_config_key
, reference this example: https://github.com/MeteoraAg/dynamic-amm-sdk/blob/main/ts-client/src/examples/create_pool_and_lock_liquidity.ts
Using the example, update it with your pool config key selected and other parameters in order to create a Memecoin Pool - which is a Dynamic AMM Pool with a fee scheduler and with liquidity (LP tokens) locked to the user's own lock escrow account.
How to assign which wallets can claim fees from the permanently-locked liquidity
Please refer to the section under let allocations = [
In the config file, you can 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%.
Last updated