Skip to main content
The ixWrapperSellPt method on the MarketThree class converts PT (Principal Tokens) back into base assets by swapping PT for SY and then redeeming SY for base in a single atomic operation.

Usage

This is an async method because it needs to construct the SY redemption accounts from the market’s flavor configuration.

Required Parameters

Optional Parameters

Returns

Returns a Promise<PreparedInstruction> with the following structure:
The setupIxs array contains instructions to create the necessary associated token accounts (ATAs) for SY, PT, and base tokens. The ixs array contains the flavor pre-instructions, the sell PT instruction, and the flavor post-instructions.