Partner Functions
createConfig
Creates a new config key that will dictate the behavior of all pools created with this key. This is where you set the pool fees, migration options, the bonding curve shape, and more. Function- A transaction that can be signed and sent to the network.
Pool Fees
- Base fee must have a positive cliff fee numerator
- If using Fee Scheduler (Linear or Exponential):
- All parameters (firstFactor, secondFactor, thirdFactor) must be set if any are set
- Cliff fee numerator must be positive
- For Linear mode, final fee must not be negative
- Min and max fee numerators must be within valid range (MIN_FEE_NUMERATOR to MAX_FEE_NUMERATOR)
- Fee numerators must be less than FEE_DENOMINATOR
- If using Rate Limiter:
- Can only be used with QuoteToken collect fee mode
- All parameters must be set for non-zero rate limiter
- Max limiter duration must be within limits based on activation type
- Fee increment numerator must be less than FEE_DENOMINATOR
- Cliff fee numerator must be within valid range
- Min and max fee numerators must be within valid range
Fee Mode
- Collect fee mode must be either
QuoteToken
(0) orOutputToken
(1)
Migration and Token Type
- For migration to DAMM v1 (MigrationOption: 0), token type must be type SPL (TokenType: 0)
Activation Type
- Must be either Slot (0) or Timestamp (1)
Migration Fee
- Must be a valid option: FixedBps25 (0), FixedBps30 (1), FixedBps100 (2), FixedBps200 (3), FixedBps400 (4), FixedBps600 (5)
- Migration fee percentage must be between 0 and 50
- Creator fee percentage must be between 0 and 100
Token Decimals
- Must be between 6 and 9
LP Percentages
- The sum of partner LP, creator LP, partner locked LP, and creator locked LP percentages must equal 100(%)
Migration Quote Threshold
- Must be greater than 0
Price
- Square root start price must be within valid range (MIN_SQRT_PRICE to MAX_SQRT_PRICE)
Curve
- Must have at least one point and not exceed MAX_CURVE_POINT
- First curve point must have sqrt price greater than sqrt start price and positive liquidity
- Curve points must be in ascending order by sqrt price
- All points must have positive liquidity
- Last point’s sqrt price must not exceed MAX_SQRT_PRICE
Locked Vesting
- If the values are not all zeros (no Locked Vesting), then:
- Frequency must be greater than 0
- Total amount of tokens vested (cliffUnlockAmount + amountPerPeriod * numberOfPeriod) must be greater than 0
Token Supply
- If specified:
- Leftover receiver must be a valid non-default PublicKey
- Post-migration supply must not exceed pre-migration supply
- Pre-migration supply must be sufficient to cover minimum base supply with buffer
- Post-migration supply must be sufficient to cover minimum base supply without buffer
Token Update Authority
- Must be either CreatorUpdateAuthority (0), Immutable (1), PartnerUpdateAuthority (2), CreatorUpdateAndMintAuthority (3), PartnerUpdateAndMintAuthority (4)
createPartnerMetadata
Creates a new partner metadata account. This partner metadata will be tagged to a wallet address that holds the config keys. Function- A transaction that can be signed and sent to the network.
claimPartnerTradingFee
Claims the trading fee for the partner. A partner is thefeeClaimer
in the config key.
Function
- A transaction that can be signed and sent to the network.
- The feeClaimer of the pool must be the same as the feeClaimer in the
ClaimTradingFeeParam
params. - You can indicate maxBaseAmount or maxQuoteAmount to be 0 to not claim Base or Quote tokens respectively.
- If you indicated a
receiver
, the receiver is not required to sign the transaction, however, you must provide atempWSolAcc
if the receiver != creato and if the quote mint is SOL.
claimPartnerTradingFee2
Claims the trading fee for the partner. A partner is thefeeClaimer
in the config key.
Function
- A transaction that can be signed and sent to the network.
- The feeClaimer of the pool must be the same as the feeClaimer in the
ClaimTradingFee2Param
params. - You can indicate maxBaseAmount or maxQuoteAmount to be 0 to not claim Base or Quote tokens respectively.
- Can be used in case the partner is a squad multisig account.
partnerWithdrawMigrationFee
Withdraws the partner’s migration fee from the pool. Function- A transaction that can be signed and sent to the network.
- The sender of the pool must be the same as the partner (
feeClaimer
) in the config key.
partnerWithdrawSurplus
Withdraws the partner’s surplus from the pool. Function- A transaction that can be signed and sent to the network.
- The feeClaimer of the pool must be the same as the feeClaimer in the
PartnerWithdrawSurplusParam
params.
Build Curve Functions
buildCurve
Builds a new constant product curve. This function does the math for you to create a curve structure based on percentage of supply on migration and migration quote threshold. Function- A
ConfigParameters
object.
buildCurve
helps you to create a curve structure based on percentage of supply on migration and migration quote threshold.- If
dynamicFeeEnabled
is true, the dynamic fee will be enabled and capped at 20% of minimum base fee. lockedVestingParam.totalVestingDuration
andlockedVestingParam.cliffDurationFromMigrationTime
are calculated in terms of seconds.feeSchedulerParam.totalDuration
is calculated based on youractivationType
andactivationTime
.migratedPoolFee
is only configurable whenmigrationOption = MET_DAMM_V2 (1)
andmigrationFeeOption = Customizable (6)
.- Slot is 400ms, Timestamp is 1000ms.
buildCurveWithMarketCap
Builds a new constant product curve with customisable parameters based on market cap. This function does the math for you to create a curve structure based on initial market cap and migration market cap. Function- A
ConfigParameters
object.
buildCurveWithMarketCap
helps you to create a curve structure based on initial market cap and migration market cap.- If
dynamicFeeEnabled
is true, the dynamic fee will be enabled and capped at 20% of minimum base fee. lockedVestingParam.totalVestingDuration
andlockedVestingParam.cliffDurationFromMigrationTime
are calculated in terms of seconds.feeSchedulerParam.totalDuration
is calculated based on youractivationType
andactivationTime
.migratedPoolFee
is only configurable whenmigrationOption = MET_DAMM_V2 (1)
andmigrationFeeOption = Customizable (6)
.- Slot is 400ms, Timestamp is 1000ms.
buildCurveWithTwoSegments
Builds a new constant product curve with two segments. This function does the math for you to create a curve structure based on initial market cap, migration market cap and percentage of supply on migration. Function- A
ConfigParameters
object.
buildCurveWithTwoSegments
helps you to create a curve structure based on initial market cap, migration market cap and percentage of supply on migration.- If
dynamicFeeEnabled
is true, the dynamic fee will be enabled and capped at 20% of minimum base fee. lockedVestingParam.totalVestingDuration
andlockedVestingParam.cliffDurationFromMigrationTime
are calculated in terms of seconds.feeSchedulerParam.totalDuration
is calculated based on youractivationType
andactivationTime
.migratedPoolFee
is only configurable whenmigrationOption = MET_DAMM_V2 (1)
andmigrationFeeOption = Customizable (6)
.- Slot is 400ms, Timestamp is 1000ms.
buildCurveWithLiquidityWeights
Builds a super customizable constant product curve graph configuration based on different liquidity weights. This function does the math for you to create a curve structure based on initial market cap, migration market cap and liquidity weights. Function- A
ConfigParameters
object.
buildCurveWithLiquidityWeights
helps you to create a curve structure based on initial market cap, migration market cap and liquidity weights.- What does liquidity weights do?
- The
liquidityWeights
is an array of numbers that determines how liquidity is distributed across the curve’s price ranges. - The maximum number of liquidity weights[i] is
16
. - Each element in the array represents the liquidity weight for a specific curve segment (total
16
curve segments). - For each segment of the curve, the liquidity is scaled by liquidityWeights[i] (where
i
is the liquidityWeight index). - This means that as you move along the curve (from lower to higher price ranges), the liquidity in each curve segment can be controlled.
- The
- Effects of changing liquidity weights
All liquidityWeights[i] === 1
: All segments have the same liquidity. The curve is linear.liquidityWeights[i] < liquidityWeights[i+1]
: Lower liquidity at lower prices.- This means that the price will move more for a given trade at lower prices (less resistance), and price will move less for a given trade at higher prices (more resistance).
liquidityWeights[i] > liquidityWeights[i+1]
: Higher liquidity at lower prices.- This means that the price will move less for a given trade at lower prices (more resistance), and price will move more for a given trade at higher prices (less resistance).
- If
dynamicFeeEnabled
is true, the dynamic fee will be enabled and capped at 20% of minimum base fee. lockedVestingParam.totalVestingDuration
andlockedVestingParam.cliffDurationFromMigrationTime
are calculated in terms of seconds.feeSchedulerParam.totalDuration
is calculated based on youractivationType
andactivationTime
.migratedPoolFee
is only configurable whenmigrationOption = MET_DAMM_V2 (1)
andmigrationFeeOption = Customizable (6)
.- Slot is 400ms, Timestamp is 1000ms.
Pool Functions
createPool
Creates a new pool with the config key. Function- A transaction that requires signatures from the payer, the baseMint keypair, and the poolCreator before being submitted to the network.
- The payer must be the same as the payer in the
CreatePoolParam
params. - The poolCreator is required to sign when creating the pool.
- The baseMint token type must be the same as the config key’s token type.
createConfigAndPool
Creates a config key and a token pool in a single transaction. Function- A transaction that requires signatures from the payer, the baseMint keypair, and the config keypair before being submitted to the network.
- The payer must be the same as the payer in the
CreateConfigAndPoolParam
params. - The poolCreator is required to sign when creating the pool.
- The baseMint token type must be the same as the config key’s token type.
- You can use any of the build curve functions to create the curve configuration.
createConfigAndPoolWithFirstBuy
Creates a config key and a token pool and buys the token immediately in a single transaction. Function- The payer must be the same as the payer in the
CreateConfigAndPoolWithFirstBuyParam
params. - The
createConfigTx
requires the payer and config to sign the transaction. - The
createPoolTx
requires the payer, poolCreator, and baseMint to sign the transaction. - If the
firstBuyParam
is not provided, theswapBuyTx
will be undefined. - The
swapBuyTx
requires the buyer and payer to sign the transaction. - The
receiver
parameter is an optional account. If provided, the token will be sent to the receiver address.
createPoolWithFirstBuy
Creates a new pool with the config key and buys the token immediately. Function- The
poolCreator
is required to sign when creating the pool. - The
buyer
is required to sign when buying the token. - The
baseMint
token type must be the same as the config key’s token type. - The
minimumAmountOut
parameter protects against slippage. Set it to a value slightly lower than the expected output. - The
referralTokenAccount
parameter is an optional token account. If provided, the referral fee will be applied to the transaction. - The
receiver
parameter is an optional account. If provided, the token will be sent to the receiver address.
createPoolWithPartnerAndCreatorFirstBuy
Creates a new pool with the config key and buys the token immediately with partner and creator. Function- The
poolCreator
is required to sign when creating the pool. - The
partner
is required to sign when buying the token. - The
creator
is required to sign when buying the token. - The
baseMint
token type must be the same as the config key’s token type. - The
minimumAmountOut
parameter protects against slippage. Set it to a value slightly lower than the expected output. - The
referralTokenAccount
parameter is an optional token account. If provided, the referral fee will be applied to the transaction.
swap
Swaps between base and quote or quote and base on the Dynamic Bonding Curve. Function- A transaction that can be signed and sent to the network.
- The owner must have sufficient balance for the swap.
- For SOL swaps, the owner needs additional SOL for transaction fees (approximately 0.01 SOL).
- When swapping quote for base (buying tokens), set
swapBaseForQuote
tofalse
. - When swapping base for quote (selling tokens), set
swapBaseForQuote
totrue
. - The
minimumAmountOut
parameter protects against slippage. Set it to a value slightly lower than the expected output. - The
referralTokenAccount
parameter is an optional token account. If provided, the referral fee will be applied to the transaction. - If the transaction fails with “insufficient balance”, check that you have enough tokens plus fees for the transaction.
- The pool address can be derived using
deriveDbcPoolAddress
. - The
payer
parameter is optional. If not provided, the owner will be used as the payer to fund ATA creation.
swapQuote
Gets the exact swap out quotation in between quote and base swaps (only ExactIn). Function- The
swapMode
parameter determines the type of swap:SwapMode.ExactIn
: Swap exact input amountSwapMode.PartialFill
: Allow partial fillsSwapMode.ExactOut
: Swap for exact output amount
- The
amountIn
is the amount of tokens you want to swap, denominated in the smallest unit and token decimals. (e.g., lamports for SOL). - The
slippageBps
parameter protects against slippage. Set it to a value slightly lower than the expected output. - The
referralTokenAccount
parameter is an optional token account. If provided, the referral fee will be applied to the transaction.
swap2
Swaps between base and quote or quote and base on the Dynamic Bonding Curve with specific swap modes (ExactIn, ExactOut, PartialFill). Function- A transaction that can be signed and sent to the network.
- The
swapMode
parameter determines the type of swap:SwapMode.ExactIn
: Swap exact input amountSwapMode.PartialFill
: Allow partial fillsSwapMode.ExactOut
: Swap for exact output amount
- The
amountIn
is the amount of tokens you want to swap, denominated in the smallest unit and token decimals. (e.g., lamports for SOL). - The
minimumAmountOut
parameter protects against slippage. Set it to a value slightly lower than the expected output. - The
maximumAmountIn
parameter protects against slippage. Set it to a value slightly higher than the expected input. - The
referralTokenAccount
parameter is an optional token account. If provided, the referral fee will be applied to the transaction. - The
payer
parameter is optional. If not provided, the owner will be used as the payer to fund ATA creation.
swapQuote2
Gets the exact swap out quotation in between quote and base swaps with specific swap modes (ExactIn, ExactOut, PartialFill). Function- The
swapMode
parameter determines the type of swap:SwapMode.ExactIn
: Swap exact input amountSwapMode.PartialFill
: Allow partial fillsSwapMode.ExactOut
: Swap for exact output amount
- The
amountIn
is the amount of tokens you want to swap, denominated in the smallest unit and token decimals. (e.g., lamports for SOL). - The
slippageBps
parameter protects against slippage. Set it to a value slightly lower than the expected output. - The
referralTokenAccount
parameter is an optional token account. If provided, the referral fee will be applied to the transaction.
Migration Functions
Flow of migration
DAMM V1
createDammV1MigrationMetadata
createLocker
(if the token has locked vesting)migrateToDammV1
lockDammV1LpToken
(ifcreatorLockedLpPercentage
orpartnerLockedLpPercentage
is >0)claimDammV1LpToken
(ifcreatorLpPercentage
orpartnerLpPercentage
is >0)
DAMM V2
createDammV2MigrationMetadata
createLocker
(if the token has locked vesting)migrateToDammV2
createLocker
Creates a new locker account when migrating from Dynamic Bonding Curve to DAMM V1 or DAMM V2. This function is called whenlockedVestingParam
is enabled in the config key.
Function
- A transaction that can be signed and sent to the network.
- This function is called when
lockedVesting
is enabled in the config key.
withdrawLeftover
Withdraws leftover tokens from the Dynamic Bonding Curve pool. Function- A transaction that can be signed and sent to the network.
- This function is called when there are leftover tokens in the Dynamic Bonding Curve pool after migration.
- The leftover tokens will be sent to the
leftoverReceiver
that was specified in the config key.
createDammV1MigrationMetadata
Creates a new DAMM V1 migration metadata account. Function- A transaction that can be signed and sent to the network.
- This function must be called before
migrateToDammV1
.
migrateToDammV1
Migrates the Dynamic Bonding Curve pool to DAMM V1. Function- A transaction that can be signed and sent to the network.
- Ensure that when attempting to migrate the virtual pool, all these validation checks have already been met:
- The
MigrationFeeOption
must be a valid enum value with a valid base fee in basis points - The pool’s config account must have:
- pool_creator_authority matching the pool_authority key
- activation_duration set to 0
- partner_fee_numerator set to 0
- vault_config_key set to the default Pubkey (all zeros)
- The virtual pool’s migration progress must be in the LockedVesting state
- The pool must be “complete” based on the migration_quote_threshold (checked via is_curve_complete)
- The migration option must be valid and specifically set to MeteoraDamm
- The account relationships must be valid:
- virtual_pool must have matching base_vault and quote_vault
- virtual_pool must have a matching config
- migration_metadata must have a matching virtual_pool
- The
- You can get the dammConfig key from the README.md, or you can use
DAMM_V1_MIGRATION_FEE_ADDRESS[i]
to get the dammConfig key address.
lockDammV1LpToken
Locks a DAMM V1 LP token for a partner or creator. Function- A transaction that can be signed and sent to the network.
- This function is called when the
creatorLockedLpPercentage
orpartnerLockedLpPercentage
is > 0. - You can get the dammConfig key from the README.md, or you can use
DAMM_V1_MIGRATION_FEE_ADDRESS[i]
to get the dammConfig key address.
claimDammV1LpToken
Claims a DAMM V1 LP token for a partner or creator. Function- A transaction that can be signed and sent to the network.
- This function is called when the
creatorLpPercentage
orpartnerLpPercentage
is > 0. - You can get the dammConfig key from the README.md, or you can use
DAMM_V1_MIGRATION_FEE_ADDRESS[i]
to get the dammConfig key address.
createDammV2MigrationMetadata
Creates a new DAMM V2 migration metadata account. Function- A transaction that can be signed and sent to the network.
- This function must be called before
migrateToDammV2
.
migrateToDammV2
Migrates the Dynamic Bonding Curve pool to DAMM V2. Function- A transaction that can be signed and sent to the network.
- Ensure that when attempting to migrate the virtual pool, all these validation checks have already been met:
- The
MigrationFeeOption
must be a valid enum value with a valid base fee in basis points - The pool’s config account must have:
- pool_creator_authority matching the pool_authority key
- partner_fee_percent set to 0
- sqrt_min_price equal to MIN_SQRT_PRICE
- sqrt_max_price equal to MAX_SQRT_PRICE
- vault_config_key set to the default Pubkey (all zeros)
- The virtual pool’s migration progress must be in the LockedVesting state
- The pool must be “complete” based on the migration_quote_threshold (checked via is_curve_complete)
- The migration option must be valid and specifically set to DammV2
- The account relationships must be valid:
- virtual_pool must have matching base_vault and quote_vault
- virtual_pool must have a matching config
- migration_metadata must have a matching virtual_pool
- first_position_nft_mint must not equal second_position_nft_mint
- Exactly one remaining account must be provided (for the DAMM V2 config)
- The
- You can get the dammConfig key from the README.md, or you can use
DAMM_V2_MIGRATION_FEE_ADDRESS[i]
to get the dammConfig key address.
Creator Functions
createPoolMetadata
Creates a new pool metadata account. Function- A transaction that can be signed and sent to the network.
claimCreatorTradingFee
Claims a creator trading fee. If your pool’s config key hascreatorTradingFeePercentage
> 0, you can use this function to claim the trading fee for the pool creator.
Function
- A transaction that can be signed and sent to the network.
- The creator of the pool must be the same as the creator in the
ClaimCreatorTradingFeeParam
params. - You can indicate maxBaseAmount or maxQuoteAmount to be 0 to not claim Base or Quote tokens respectively.
- If you indicated a
receiver
, the receiver is not required to sign the transaction, however, you must provide atempWSolAcc
if the receiver != creator and if the quote mint is SOL.
claimCreatorTradingFee2
Claims a creator trading fee. If your pool’s config key hascreatorTradingFeePercentage
> 0, you can use this function to claim the trading fee for the pool creator.
Function
- A transaction that can be signed and sent to the network.
- The creator of the pool must be the same as the creator in the
ClaimCreatorTradingFee2Param
params. - You can indicate maxBaseAmount or maxQuoteAmount to be 0 to not claim Base or Quote tokens respectively.
- Can be used in case the creator is a squad multisig account.
creatorWithdrawSurplus
Withdraws surplus tokens from the pool. Function- A transaction that can be signed and sent to the network.
- The creator of the pool must be the same as the creator in the
CreatorWithdrawSurplusParam
params.
creatorWithdrawMigrationFee
Withdraws the creator’s migration fee from the pool. Function- A transaction that can be signed and sent to the network.
- The sender of the pool must be the same as the creator (
poolCreator
) in the virtual pool.
transferPoolCreator
Transfers the pool creator to a new wallet. Function- A transaction that can be signed and sent to the network.
- The creator of the pool must be the signer of the transaction.
State Functions
getPoolConfig
Gets all details about the config. Function- A
PoolConfig
object containing the config key details.
getPoolConfigs
Retrieves all configs. Function- An array of configs created by various users.
- Check return type here.
getPoolConfigsByOwner
Retrieves all configs owned by a specific wallet. Function- An array of configs owned by the specified wallet.
- Check return type here.
getPool
Gets the details of a specific pool. Function- A
VirtualPool
object containing the pool’s details, or null if not found.
getPools
Retrieves all pools. Function- An array of all virtual pools created through DBC.
- Check return type of VirtualPool here.
getPoolsByConfig
Retrieves all pools by config key address. Function- It give all
virtual pools
created with a specific config key. - Check return type of VirtualPool here.
getPoolsByCreator
Retrieves all pools by creator address. Function- It give all
virtual pools
created with a specific wallet address. - Check return type of VirtualPool here.
getPoolByBaseMint
Gets the pool by base mint. Function- A
VirtualPool
object containing the pool’s details, or null if not found. - Check return type of VirtualPool here.
getPoolMigrationQuoteThreshold
Gets the migration quote threshold for a specific pool. Function- A
BN
object representing the migration quote threshold.
getPoolCurveProgress
Gets the progress of the curve by comparing current quote reserve to migration threshold. Function- A number between 0 and 1 representing the curve progress.
getPoolMetadata
- Gets the metadata for a specific pool.
- Can only be used if metadata is set using createPoolMetadata function.
- An array of
VirtualPoolMetadata
objects containing the pool’s metadata.
getPartnerMetadata
Gets the metadata for a specific partner. Function- An array of
PartnerMetadata
objects containing the partner’s metadata.
getDammV1LockEscrow
Gets the lock escrow details for a DAMM V1 pool. Function- A
LockEscrow
object containing the lock escrow details.
getDammV1MigrationMetadata
Gets the DAMM V1 migration metadata for a specific pool. FunctionMeteoraDammMigrationMetadata
object containing the DAMM V1 migration metadata.
getPoolFeeMetrics
Gets the fee metrics for a specific pool. Function- An object containing current and total fee metrics for the pool.
getPoolsFeesByConfig
Gets all fees for pools linked to a specific config key. Function- An array of objects containing quote fee metrics for each pool.
getPoolsFeesByCreator
Gets all fees for pools linked to a specific creator. Function- An array of objects containing quote fee metrics for each pool.
Helper Functions
deriveDbcPoolAddress
Derives the address of a Dynamic Bonding Curve pool. Function- The address of the Dynamic Bonding Curve pool.
deriveDammV1PoolAddress
Derives the address of a DAMM V1 pool. Function- The address of the DAMM V1 pool.
deriveDammV2PoolAddress
Derives the address of a DAMM V2 pool. Function- The address of the DAMM V2 pool.
deriveDbcTokenVaultAddress
Derives the address of a DBC token vault. Function- The address of the DBC token vault.
Calculation Functions
getFeeSchedulerParams
Gets the fee scheduler parameters for a specific pool config. Function- A
BaseFee
object containing the calculated fee scheduler parameters.
- The
totalDuration
is the total duration of the fee scheduler. It must be calculated based on youractivationType
. If you useActivationType.Slot
, thetotalDuration
is denominated in terms of 400ms (slot). If you useActivationType.Timestamp
, thetotalDuration
is denominated in terms of 1000ms (timestamp). startingFeeBps
must always be greater than or equal toendingFeeBps
.totalDuration
must always be greater than or equal tonumberOfPeriod
.
getRateLimiterParams
Gets the fee scheduler parameters for a specific pool config. Function- A
BaseFee
object containing the calculated rate limiter parameters.
- The
maxLimiterDuration
is the max duration of the rate limiter. It must be calculated based on youractivationType
. If you useActivationType.Slot
, themaxLimiterDuration
is denominated in terms of 400ms (slot). If you useActivationType.Timestamp
, themaxLimiterDuration
is denominated in terms of 1000ms (timestamp). referenceAmount
must always be greater than 0. This parameter takes into account the quoteMint decimals. For example, if you useTokenDecimal.NINE
, thereferenceAmount
must be 1 (1 SOL).maxLimiterDuration
must always be greater than 0.tokenQuoteDecimal
must always be greater than 0.activationType
must always be greater than 0.baseFeeBps
must always be greater than 0.
getDynamicFeeParams
Gets the dynamic fee parameters for a specific pool. Calculated the fee based on the minimum base fee (capped at 20% of base fee). Please note that the maxPriceChangeBps must be less than or equal to 1500 (15%). Function- A
DynamicFeeParams
object containing the calculated dynamic fee parameters.
getLockedVestingParams
Gets the locked vesting parameters for a specific pool. Function- A
LockedVestingParams
object containing the calculated locked vesting parameters.
- The
totalVestingDuration
is the total duration of the vesting. It must be calculated in terms of seconds => 1000ms (timestamp).
getQuoteReserveFromNextSqrtPrice
Gets the quote reserve from the next sqrt price instead of getting from the pool state. Function- A
BN
object containing the calculated quote reserve.
- The
nextSqrtPrice
is the next sqrt price that you can fetch from swap cpi logs. - The
config
is the pool config that the token pool used to launch.