Scripts to create Meteora pools easily.
We need bun to run the scripts, install it via bun installation.
Then install the dependencies by running the command bun install
There are a various of config file that can be found at config
directory that we need to carefully take a look first. It contains all the configurations required to run the scripts.
Also we 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.createBaseToken
: Configuration to create base token.baseMint
: Base token address if thecreateBaseToken
field is not set.quoteSymbol
: Quote token symbol, onlySOL
orUSDC
is supported.baseDecimals
: Base token decimal.dynamicAmm
: Dynamic AMM pool configuration.dlmm
: DLMM pool configuration.alphaVault
: Fcfs or Prorata Alpha Vault configuration.
Some configuration constraints:
createBaseToken
andbaseMint
cannot be used together.dynamicAmm
anddlmm
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 base onslot
ortimestamp
.activationPoint
: To activate pool trading at a point, either slot valut or timestamp value base onactivationType
.hasAlphaVault
: Whether alpha vault is enabled or not for this pool.
binStep
: DLMM pool bin step.feeBps
: Fee bps for DLMM pool.initialPrice
: Initial pool price.activationType
: To activate pool trading base onslot
ortimestamp
.activationPoint
: To activate pool trading at a point, either slot valut or timestamp value base onactivationType
.priceRounding
: Should beup
ordown
.hasAlphaVault
: Whether alpha vault is enabled or not for this pool.
NOTICE: There is only one DLMM pool that can be created with the same base and quote tokens, using the instruction initializeCustomizablePermissionlessLbPair
. So if users are using that instruction to create a new DLMM pool with the same base and quote tokens, but with different parameters, then the transaction will be failed.
poolType
:dynamic
ordlmm
pool type.alphaVaultType
: Alpha Vault type, could befcfs
orprorata
depositingPoint
: Absolute value that, the slot or timestamp that allows deposit depend on the pool activation type.startVestingPoint
: Absolute value, the slot or timestamp that start vesting depend on the pool activation type.endVestingPoint
: Absolute value, the slot or timestamp that end vesting depend on the pool activation type.maxDepositCap
: Maximum deposit cap.individualDepositingCap
: Individual deposit cap.escrowFee
: Fee to create stake escrow account.whitelistMode
:permissionless
orpermission_with_merkle_proof
orpermission_with_authority
.
depositingPoint
: Absolute value that, the slot or timestamp that allows deposit depend on the pool activation type.startVestingPoint
: Absolute value, the slot or timestamp that start vesting depend on the pool activation type.endVestingPoint
: Absolute value, the slot or timestamp that end vesting depend on the pool activation type.maxBuyingCap
: Maximum buying cap.escrowFee
: Fee to create stake escrow account.whitelistMode
:permissionless
orpermission_with_merkle_proof
orpermission_with_authority
.
Run the script with config file specified in the CLI, some examples:
** Create dynamic AMM pool**
bun run src/create_pool.ts --config ./config/create_dynamic_amm_pool.json
** Create dynamic AMM pool with new token mint**
bun run src/create_pool.ts --config ./config/create_dynamic_amm_pool_with_new_token.json
** Create new DLMM pool**
bun run src/create_pool.ts --config ./config/create_dlmm_pool.json
** Create new DLMM pool with alpha vault**
bun run src/create_pool.ts --config ./config/create_dlmm_pool_with_fcfs_alpha_vault.json
Then run
bun run src/create_alpha_vault.ts --config ./config/create_dlmm_pool_with_fcfs_alpha_vault.json
** Lock liquidity for Dynamic AMM pool**
bun run src/lock_liquidity.ts --config ./config/lock_liquidity.json
NOTICE The seed liquidity scripts are still WIP, do not use them.
To view pool on the UI, access the links below
- For Dynamic AMM pool:
https://app.meteora.ag/pools/<POOL_ADDRESS>
- For DLMM pool:
https://app.meteora.ag/dlmm/<POOL_ADDRESS>