Skip to main content
The ixWrapperCollectInterest instruction collects accrued interest from YT held in open orders, as well as held from filled orders on the Exponent orderbook.

Usage

import { PublicKey } from "@solana/web3.js";

const ix = await orderbook.ixWrapperCollectInterest({
  trader: wallet.publicKey,
  mintSy: syMintAddress,
});

Required Parameters

ParameterTypeDescription
traderPublicKeyThe trader’s wallet public key
mintSyPublicKeyThe SY token mint address

Optional Parameters

ParameterTypeDescription
sySrcPublicKeySY token source account
tokenBaseTraderPublicKeyBase token account for the trader

Returns

Returns a TransactionInstruction that collects accrued interest and transfers it to the trader’s SY token account.

How It Works

YT held in open orders continuously accrues yield. Interest is staged automatically during order fills and removals — you don’t need to trigger staging manually. This instruction transfers the staged SY from your escrow to your token account. Staged interest is tracked separately from your trading balances (PT, YT, SY). To withdraw trading balances, use ixWrapperWithdrawFunds.