createWrapperProvideLiquidityClassicInstruction
Provides liquidity to a CLMM market using both base assets and PT tokens. This instruction mints SY from the supplied base asset and combines it with user-supplied PT tokens to deposit liquidity into the specified tick range. This is useful when the caller already holds PT and wants to pair it with freshly minted SY.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 |
tokenProgram | PublicKey | No | No | SPL Token program |
marketAddressLookupTable | PublicKey | No | No | Market address lookup table |
syProgram | PublicKey | No | No | SY 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 |
|---|---|---|
| lowerTick | u32 | The lower tick boundary for the liquidity position |
| upperTick | u32 | The upper tick boundary for the liquidity position |
| amountBase | u64 | The amount of base asset to provide |
| amountPt | u64 | The amount of PT tokens to provide |
| minLpOut | u64 | The minimum amount of LP tokens to receive |
| mintSyAccountsUntil | u8 | The number of CPI remaining accounts used for SY minting |
Returns
TransactionInstruction — a transaction instruction ready to be added to a transaction.