Repository navigation
Conversation
Match createConfig2, transfer-fee quotes, and compounding migration on the existing SDK layout. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Sep 27, 2026
Closed
dannxbt
added this pull request to stack #118
September 27, 2026 11:42
bangyro
reviewed
Sep 28, 2026
bangyro
previously approved these changes
Sep 28, 2026
quoteSwap2 accepted either shape and, when currentPoint was omitted, quoted a fee scheduler at the cliff fee. swapQuote2 now quotes the live accounts, and getQuoteFrom* quotes the pool initialize_pool would write. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Fractional migration percentages, floored vesting periods, and Q64 fee decay now follow the program. Quotes stay inside the u64 and u128 bounds and use the program's liquidity errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Locked vesting periods floor the same way liquidity vesting does. Exponential ending fees and pow follow the program's Q64 integer math. Co-authored-by: Cursor <cursoragent@cursor.com>
Prettier also accepts the locked vesting frequency test, which was failing CI. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DBC SDK 1.6.0
Syncs the SDK with dynamic bonding curve 0.2.2.
Added
client.partner.createConfig2. PasstransferFeeParametersfor a base-mint transfer fee, ornullwhen there is none.0basis points is valid only withTransferFeeWithheldAuthority.PartnerandMigratedTransferFeeAuthorityOption.Immutable.TransferFeeWithheldAuthorityandMigratedTransferFeeAuthorityOption.includedTransferFeeAmountInandexcludedTransferFeeAmountOut.getSwapQuoteTransferFeesfetches the quote mint and the current epoch.getQuoteFromInputAmountandgetQuoteFromOutputAmountquote abuildCurveresult (ConfigParameters) before a pool exists.client.pool.swapQuote2quotes an existing pool and requirescurrentPoint.Changed
createConfigAndPoolandcreateConfigAndPoolWithFirstBuyalways usecreateConfig2. OmittingtransferFeeParametersis the same asnull.MigrationFeeOption.Customizable, andMigratedCollectFeeMode.Compounding. The base fee is Token-2022 only and at most 10%.MigratedCollectFeeMode.CompoundingallowscompoundingFeeBpsof0.ceil(migrationQuoteThreshold * (100 - migrationFee.feePercentage) / 100), then convert that quote amount into the migration base.buildCurveWithLiquidityWeightsandbuildCurveWithCustomSqrtPricesuse constant product forCompounding, and concentrated liquidity forQuoteTokenandOutputToken.buildCurveWithTwoSegmentsandbuildCurveWithMidPricekeep a fractionalpercentageSupplyOnMigrationwhen sizing the migration base.floor(totalDuration / numberOfPeriods).reductionFactorwith the program's Q64 decay so the last period stays at or above the requested ending fee.u64::MAX.Liquidity in bonding curve is insufficient.cp_amm.sofixture to cp_amm 0.2.5.calculateFeeSchedulerEndingBaseFeeBpsuses the program's integer conversion,numerator * 10_000 / FEE_DENOMINATOR.Deprecated
client.partner.createConfigin favour ofcreateConfig2.createConfigandcreateConfigWithTransferHookreject a quote mint with a non-zero transfer fee or a live transfer fee config authority.Breaking
quoteMintandcurrentEpoch.SwapQuoteConfigis removed.getQuoteFrom*takesConfigParametersand does not accept a decodedPoolConfig.getMigratedPoolFeeParamsthrows forMigrationFeeOption.CustomizablewhenmigratedPoolFee.poolFeeBpsis not set.swap,swap2,claimPartnerTradingFee, andclaimCreatorTradingFeereject transfer-hook pools. Useswap2WithTransferHook,claimPartnerTradingFee2, andclaimCreatorTradingFee2. Standard pool creation rejects a transfer-hook config, and transfer-hook pool creation rejects a standard config.Devnet
Transfer fee on the quote mint
Transfer fee on the base mint