Documentation Index
Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt
Use this file to discover all available pages before exploring further.
createWithdrawYtInstruction
Builds a raw instruction to withdraw YT (Yield Tokens) from a yield position back to the user’s token account.Usage
Accounts
| Name | Type | Signer | Writable | Description |
|---|---|---|---|---|
owner | PublicKey | Yes | Yes | The user withdrawing YT |
vault | PublicKey | No | Yes | Vault account |
userYieldPosition | PublicKey | No | Yes | User’s yield position PDA |
ytDst | PublicKey | No | Yes | Destination YT token account |
escrowYt | PublicKey | No | Yes | Vault YT escrow account |
tokenProgram | PublicKey | No | No | SPL Token program |
authority | PublicKey | No | No | Vault authority PDA |
syProgram | PublicKey | No | No | SY program |
addressLookupTable | PublicKey | No | No | Vault address lookup table |
yieldPosition | PublicKey | No | Yes | Vault robot yield position |
systemProgram | PublicKey | No | No | System program |
eventAuthority | PublicKey | No | No | Event authority PDA |
program | PublicKey | No | No | Exponent Core program |
Args
| Name | Type | Description |
|---|---|---|
amount | bigint | Amount of YT to withdraw (in base units) |
Returns
TransactionInstruction — a transaction instruction ready to be added to a transaction.