getPtAndSyOnWithdrawLiquidity() method calculates the amounts of PT (Principal Token) and SY (Standardized Yield) that will be received when removing liquidity from a position.
Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
position | LpPositionCLMM | Yes | The LP position to withdraw liquidity from |
liquidityToRemove | bigint | No | Amount of liquidity to remove. If not provided, assumes full position balance removal |
Returns
Returns an object with:| Property | Type | Description |
|---|---|---|
totalPtOut | bigint | Amount of PT that will be received on withdrawal |
totalSyOut | bigint | Amount of SY that will be received on withdrawal |