Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

Use this file to discover all available pages before exploring further.

Track DAMM v2 releases here.
cp-amm 0.2.0
Compounding Liquidity
Mainnet deployment for Release 0.2.0 is planned for March 13, 2026, at 11:00 AM UTC+8 (Friday).
Breaking release. If you build swap instructions manually, run DLMM swap quotes, or index certain DLMM events, please plan an upgrade before mainnet deployment.

Release summary

ComponentVersionPR
Program0.2.0damm-v2 #187
TypeScript SDK1.3.7damm-v2-sdk #101

What We Shipped

  • Compounding Liquidity

What To Do

IntegratorsWhat ChangedWhat To Do
Swap Routers
  • Swap quote computation
  • For concentrated pools, update your quote logic to exclude partnerFee from fee calculations
  • For compounding pools, update your quote logic to use the constant-product formula x * y = k. Compute quotes using token_a_amount, token_b_amount, and liquidity from pool state.
Trading Terminals
  • EvtSwap2 event parsing
  • Tracking of pool reserves amounts for compounding pools
  • swap_result.partner_fee is removed. Total trading fee is now split into claiming_fee and compounding_fee. Update event deserialization accordingly.
  • Read token_a_amount and token_b_amount directly from pool state (not derived from liquidity math).
Partners
  • Swap quote computation
  • Pool liquidity derivation
  • Bump your SDK version to @meteora-ag/cp-amm-sdk@1.3.6.rc.1 to start testing.

Program: cp-amm 0.2.0

Program ID (mainnet and devnet): cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGGProgram PR #187

Added

  • Pool now will track reserves balances (token_a_amount, token_b_amount) if pool.layout_version == 1. For pool layout_version 0, operator can call the new endpoint fix_pool_layout_version to pump pool version.
  • Add a new collect_fee_mode (Compounding), in the new collect fee mode, fee will be collected in quote token, and a percentage of fee (configurable) will be added in reserves for compounding. In the new collect fee mode, the pool doesn’t have concentrated price range, instead following constant-product formula token_a_amount * token_b_amount = constant.
  • Endpoints create_config, initialize_customizable_pool and initialize_pool_with_dynamic_config will allow user to create pool with collect_fee_mode == Compounding, and config for compounding_fee_bps.

Changed

  • Related to event EvtSwap2, in swap_result field, partner_fee will be replaced by compounding_fee, now total_trading_fee will be calculated as swap_result.claiming_fee + swap_result.compounding_fee

Removed

  • Removed partner field from Pool struct
  • Removed unused partner_fee feature and the claim_partner_fee endpoint

Breaking Changes

  • Quote function will be changed by the new fee mode

TypeScript SDK: @meteora-ag/cp-amm-sdk 1.3.7

SDK PR #101

Added

  • Added new CollectFeeMode.Compounding mode — a constant-product (x * y = k) liquidity mode where a configurable percentage of trading fees are compounded back into pool liquidity (as token B), with the remaining fees available for claiming. Pools with compounding mode do not use price ranges.
  • Added LiquidityHandler interface and two implementations: CompoundingLiquidityHandler and ConcentratedLiquidityHandler, with a getLiquidityHandler factory function that dispatches based on collectFeeMode.
  • Added compoundingFeeBps field to PoolFeesParams for configuring the compounding fee split.
  • Added collectFeeMode parameter to getLiquidityDelta, getDepositQuote, getWithdrawQuote, and preparePoolCreationParams.
  • Added tokenAAmount, tokenBAmount, and liquidity parameters to getDepositQuote and getWithdrawQuote for compounding liquidity calculations.

Changed

  • Rewrote swapQuote.ts to use LiquidityHandler abstraction, supporting both concentrated and compounding liquidity modes.
  • Fee structure: tradingFee split into claimingFee + compoundingFee in SwapResult2, FeeOnAmountResult, and SplitFees types.
  • Renamed PoolVersion enum to LayoutVersion.
  • PoolFeesParams.padding changed from number[] to number.
  • splitFees and getFeeOnAmount no longer accept hasPartner parameter.
  • getQuote totalFee now computed as claimingFee + compoundingFee + protocolFee + referralFee.
  • getQuote2 return type: tradingFee and partnerFee replaced with claimingFee and compoundingFee.
  • collectFeeMode comment updated: 0: BothToken, 1: OnlyB, 2: Compounding.
  • Liquidity delta and amount functions (getLiquidityDeltaFromAmountA, getLiquidityDeltaFromAmountB, getAmountAFromLiquidityDelta, getAmountBFromLiquidityDelta) now accept collectFeeMode and dispatch to the appropriate handler.

Removed

  • Removed claimPartnerFee endpoint and ClaimPartnerFeeParams type.
  • Removed partnerFee from fee result types (FeeOnAmountResult, SplitFees, SwapResult2).
  • Removed hasPartner helper function.
  • Removed FEE_PADDING constant.