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.
ixWrapperBuyYt method on the MarketThree class converts base assets into YT (Yield Tokens) by wrapping the base into SY, stripping SY into PT and YT, and swapping the PT back for SY in a single atomic operation.
Usage
Required Parameters
| Parameter | Type | Description |
|---|---|---|
owner | PublicKey | The owner’s wallet public key |
ytOut | bigint | Amount of YT tokens to receive |
maxBaseIn | bigint | Maximum amount of base asset to spend |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
tokenSyTrader | PublicKey | Intermediate SY token account. Defaults to owner’s ATA |
tokenPtTrader | PublicKey | Intermediate PT token account. Defaults to owner’s ATA |
tokenYtTrader | PublicKey | Destination YT token account. Defaults to owner’s ATA |
tokenBaseTrader | PublicKey | Source base 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, and YT tokens. The ixs array contains the flavor pre-instructions followed by the buy YT instruction.