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.
createWrapperProvideLiquidityBaseInstruction
Provides liquidity to a CLMM market using base assets with an external PT purchase to reach the optimal ratio. This instruction mints SY from the base asset and buys additional PT from the market to achieve the correct SY/PT balance for the specified tick range, then deposits the liquidity.Usage
Accounts
| Name | Type | Signer | Writable | Description |
|---|---|---|---|---|
depositor | PublicKey | Yes | Yes | Wallet providing liquidity |
market | PublicKey | No | Yes | The CLMM market account |
ticks | PublicKey | No | Yes | The market tick array account |
tokenPtEscrow | PublicKey | No | Yes | Market PT escrow account |
tokenSyEscrow | PublicKey | No | Yes | Market SY escrow account |
tokenSyDepositor | PublicKey | No | Yes | Depositor’s SY token account |
tokenPtDepositor | PublicKey | No | Yes | Depositor’s PT token account |
tokenFeeTreasurySy | PublicKey | No | Yes | SY fee treasury account |
tokenFeeTreasuryPt | PublicKey | No | Yes | PT fee treasury account |
mintPt | PublicKey | No | No | PT mint address |
tokenProgram | PublicKey | No | No | SPL Token program |
marketAddressLookupTable | PublicKey | No | No | Market address lookup table |
syProgram | PublicKey | No | No | SY program |
exponentCoreProgram | PublicKey | No | No | Exponent core program |
lpPosition | PublicKey | No | Yes | LP position account |
systemProgram | PublicKey | No | No | System program |
rent | PublicKey | No | No | Rent sysvar |
eventAuthority | PublicKey | No | No | Event authority PDA |
program | PublicKey | No | No | CLMM program ID |
Args
| Name | Type | Description |
|---|---|---|
| lowerTickKey | u32 | The lower tick boundary for the liquidity position |
| upperTickKey | u32 | The upper tick boundary for the liquidity position |
| minLpOut | u64 | The minimum amount of LP tokens to receive |
| mintSyAccountsUntil | u8 | The number of CPI remaining accounts used for SY minting |
| externalPtToBuy | u64 | The amount of additional PT to purchase from the market |
| externalSyConstraint | u64 | The maximum amount of SY to use for the PT purchase |
Returns
TransactionInstruction — a transaction instruction ready to be added to a transaction.