> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exponent.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Withdraw YT

> Low-level instruction to withdraw YT from a yield position

# createWithdrawYtInstruction

Builds a raw instruction to withdraw YT (Yield Tokens) from a yield position back to the user's token account.

## Usage

```typescript theme={null}
import { createWithdrawYtInstruction } from "@exponent-labs/exponent-sdk/client/core";
import { PublicKey, SystemProgram } from "@solana/web3.js";

const ix = createWithdrawYtInstruction(
  {
    owner: wallet.publicKey,
    vault: vaultAddress,
    userYieldPosition: userYieldPositionPda,
    ytDst: userYtTokenAccount,
    escrowYt: vaultEscrowYt,
    tokenProgram: TOKEN_PROGRAM_ID,
    authority: vaultAuthority,
    syProgram: syProgramId,
    addressLookupTable: vaultLookupTable,
    yieldPosition: vaultYieldPosition,
    systemProgram: SystemProgram.programId,
    eventAuthority: eventAuthorityPda,
    program: EXPONENT_CORE_PROGRAM_ID,
  },
  {
    amount: BigInt(1_000_000),
  }
);
```

## 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.
