createWrapperWithdrawInstruction
Builds a raw instruction that burns tranche LP shares, withdraws SY, and redeems SY back to base assets.Usage
Accounts
| Name | Type | Signer | Writable | Description |
|---|---|---|---|---|
user | PublicKey | Yes | Yes | Withdrawer |
market | PublicKey | No | Yes | Tranching market account |
returnModelStorage | PublicKey | No | Yes | Return model storage account |
addressLookupTable | PublicKey | No | No | Market address lookup table |
syProgram | PublicKey | No | No | Linked SY program |
syMint | PublicKey | No | Yes | SY mint |
tokenLpSrc | PublicKey | No | Yes | User LP source account |
tokenSyEscrow | PublicKey | No | Yes | Market SY escrow |
tokenDst | PublicKey | No | Yes | User SY token account used by the wrapper |
mintLp | PublicKey | No | Yes | Senior or Junior LP mint |
tokenProgram | PublicKey | No | No | SPL Token program |
eventAuthority | PublicKey | No | No | Event authority PDA |
program | PublicKey | No | No | Exponent Tranching program |
Args
| Name | Type | Description |
|---|---|---|
trancheSide | TrancheSide | Senior or Junior |
lpAmountIn | u64 | Selected-tranche LP shares to burn, in raw LP units |
minBaseOut | u64 | Minimum base asset output, in raw base-token units |
redeemSyAccountsUntil | u8 | Number of remaining accounts used by the SY redeem CPI segment |
Remaining accounts
Append remaining accounts in this order:- SY redeem CPI accounts, with length
redeemSyAccountsUntil - Tranching
getSyStateandwithdrawSyCPI accounts
TranchingMarket.ixWrapperWithdraw to build this ordering automatically.
Returns
TransactionInstruction - a transaction instruction ready to be added to a transaction.