TheDocumentation 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.
ixWrapperSellYt method on the MarketThree class converts YT (Yield Tokens) back into base assets by merging YT with PT to create SY and then redeeming SY for base in a single atomic operation.
Usage
Required Parameters
| Parameter | Type | Description |
|---|---|---|
owner | PublicKey | The owner’s wallet public key |
amount | bigint | Amount of YT tokens to sell |
minBaseOut | bigint | Minimum amount of base asset to receive |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
tokenBaseTrader | PublicKey | Destination base token account. Defaults to owner’s ATA |
tokenSyTrader | PublicKey | Intermediate SY token account. Defaults to owner’s ATA |
tokenYtTrader | PublicKey | Source YT token account. Defaults to owner’s ATA |
tokenPtTrader | PublicKey | Intermediate PT token account. Defaults to owner’s ATA |
Returns
Returns aPromise<PreparedInstruction> with the following structure:
setupIxs array contains instructions to create the necessary associated token accounts (ATAs) for SY, PT, YT, and base tokens. The ixs array contains the sell YT instruction followed by the flavor pre-instructions.