Skip to main content

createWrapperSellYtInstruction

Sells YT tokens for base assets in a single atomic operation. This instruction buys PT on the market, merges the PT and YT back into SY, and then redeems the SY for the underlying base asset. The entire flow is executed atomically so the caller receives base tokens directly from their YT position.

Usage

Accounts

Args

Returns

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