Set up the Exponent SDK and walk through the complete CLMM lifecycle — from buying and selling PT/YT, to providing liquidity, withdrawing, and reading market state.Documentation Index
Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Setup
Buy PT
Use
ixWrapperBuyPt to buy PT (Principal Tokens) using base assets. This wraps the base into SY and swaps SY for PT in a single atomic operation.Sell PT
Use
ixWrapperSellPt to sell PT back for base assets. This swaps PT for SY and redeems SY for base in one transaction.Buy YT
Use
ixWrapperBuyYt to buy YT (Yield Tokens) using base assets. This wraps base into SY, strips SY into PT and YT, and sells the excess PT back — all atomically.Sell YT
Use
ixWrapperSellYt to sell YT back for base assets. This buys PT with SY, merges PT and YT back into SY, and redeems SY for base.Provide Liquidity
Use
ixWrapperProvideLiquidity to provide liquidity from base assets within a specified APY range. This wraps base into SY, strips into PT and YT, adds PT liquidity, and returns YT and LP tokens.Withdraw Liquidity
Use
ixWithdrawLiquidityToBase to withdraw an LP position back to base assets. You need the LP position’s public key, which you can obtain from getUserLpPositions.The
lpPosition parameter is the public key of your LP position account. See the next step to learn how to retrieve it.Check LP Positions
Use
getUserLpPositions to retrieve all LP positions for a wallet in a specific market.Reading Market State
TheMarketThree instance exposes getter properties for reading onchain state:
Next Steps
Core Concepts
Understand APY-based ticks, fee decay, YT flash-swap routing, swap behavior, and the core accounts behind the CLMM.
Instructions
Explore the full set of high-level instruction builders for PT and YT trading, liquidity provision, and liquidity withdrawal.
Read Functions
Query quotes, LP positions, withdrawal previews, balances, and market state without sending transactions.
Account References
Inspect the main market account and related CLMM accounts, including financial state, emissions, and configuration fields.