Skip to main content

createWrapperBuyYtInstruction

Builds a raw instruction to buy YT tokens from base assets in a single atomic operation. This instruction handles SY minting from the base asset, stripping SY into PT and YT, and selling excess PT back to the pool — all within a single transaction instruction. This is the most convenient way to acquire YT from a base asset.

Usage

Accounts

Args

Returns

TransactionInstruction — a transaction instruction ready to be added to a transaction.