Bonding Curve Progress
Core Formula
- From the
poolState.quoteReserve
state in a DBC pool. - From the
nextSqrtPrice
in the swap CPI logs. - Directly from
EvtSwap2
swap CPI logs.
1. Get Quote Reserve from Pool State
2. Get Quote Reserve from Next Sqrt Price
Using theget_quote_token_from_sqrt_price
function
getQuoteReserveFromNextSqrtPrice
function in the DBC TypeScript SDK as it is the typescript version of the above function.
3. Directly from EvtSwap2
swap CPI logs
Example of an EvtSwap2
swap CPI logs:
Total Fees
Base Fees
Base Fees includes either a Flat Fee or a Fee Scheduler or Rate Limiter.BaseFeeMode
can only be enums 0, 1, or 2.
0 = Linear Fee Scheduler
1 = Exponential Fee Scheduler
2 = Rate LimiterFlat Fee
You can fetch the flat fee directly from thecliffFeeNumerator
in the baseFee
object if firstFactor
, secondFactor
, and thirdFactor
are all 0.
The Fee Scheduler and Rate Limiter depends on the
poolState.activationType
.- If the
poolState.activationType == 0
, thennumberOfPeriod
andperiodFrequency
is calculated inSLOT == 400ms
- If the
poolState.activationType == 1
, thennumberOfPeriod
andperiodFrequency
is calculated inSECONDS == 1000ms
Fee Scheduler
-
For Fee Scheduler, it contains
numberOfPeriod
,periodFrequency
, andreductionFactor
which are paired with thefirstFactor
,secondFactor
, andthirdFactor
respectively. -
baseFeeMode
can only be 0 or 1.
You can refer to the math formula for the Fee Scheduler here
Rate Limiter
-
For Rate Limiter, it contains
feeIncrementBps
,maxLimiterDuration
, andreferenceAmount
which are paired with thefirstFactor
,secondFactor
, andthirdFactor
respectively. -
baseFeeMode
can only be 2.
You can refer to the math formula for the Rate Limiter here
Dynamic Fees (Variable Fee)
You can refer to the Dynamic Fee calculation herePlotting Charts
Using Transfer logs from Swap transactions is not the correct way of getting the token price as we have Anti-Sniper Suite features that can cause huge fee deductions from
TokenAmountIn
OR TokenAmountOut
. Plotting the token chart price from these will lead to a very ugly chart.EvtSwap2
CPI logs from the Swap transaction.
EvtSwap
is an older version of the swap CPI logs and might be deprecated in the future. Use EvtSwap2
instead.Trading Volume
Track from Swap CPI logs:Liquidity
In the bonding curve, the liquidity is fetched from the virtual quote reserve of the bonding curve pool.Locked Vesting
Migration
- You can check whether the DBC pool has migrated via the
isMigrated
flag from the DBC pool state. - You can also check the MigrationProgress from the DBC pool state via the
MigrationProgress
parameter.
Meteora’s DBC Migration Keepers
- We run a total of 2 DBC Migration Keepers to migrate the DBC pools. These migration keepers each have their individual threshold requirements of >= 750 USD worth of
quoteReserve
to migrate the pool providedquoteReserve >= migrationQuoteThreshold
. - You can check out the migration keepers here.
- If you would like to clear our tokens that are stuck (such that their
quoteReserve
is less than 750 USD worth ofquoteToken
), you can use the Manual Migrator to manually migrate the pool.
How to Identify Launchpads Using DBC
You can ping us on Discord to get a list of all launchpads configuration so that you can index them on your trading terminal.Open a ticket on discord to get access to the list.
Referral Account
- For trading terminals, we have a feature that enables trading terminals to earn referral fees from all swaps that happens on our Meteora DBC program as long as they were swapped through your trading terminal.
- For referral fees, simply add your referral token account within the swap instruction & you will receive 20% of the protocol fees for all swaps.