The ixWrapperProvideLiquidity method on the MarketThree class provides liquidity to the CLMM pool using base assets. It wraps the base into SY, strips SY into PT and YT, adds liquidity with the PT, and returns YT and LP tokens to the depositor in a single atomic operation.
Usage
This is an async method because it needs to construct the SY minting accounts and YT deposit accounts from the market’s configuration.
Required Parameters
Optional Parameters
Returns
Returns a Promise<PreparedInstruction> with the following structure:
The setupIxs array contains instructions to create the necessary associated token accounts (ATAs) for SY, YT, and PT tokens. The ixs array contains the flavor pre-instructions, the provide liquidity instruction, and the flavor post-instructions. If lpPosition was not provided, signers will contain the generated LP position keypair.