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

# Fill withdrawal requests

> Allocate reserve tokens to queued withdrawal requests.

Fill queued requests as liquidity becomes available. Managers and allocators can execute fills through the vault's withdrawal-fill policy; depositors claim the allocated tokens separately.

## Find pending requests

Fetch your vault's requests and keep those with LP tokens left to fill:

```typescript theme={null}
const requests = await vault.fetcher.fetchAllWithdrawalAccounts([
  { memcmp: { offset: 8, bytes: vault.selfAddress.toBase58() } },
]);

const pendingRequests = requests.filter(
  ({ account }) => account.lpAmountRemaining > 0n,
);
```

Use the selected request's `publicKey` as `withdrawalAddress` below. Plan liquidity around the vault's withdrawal schedule. You can fill a request before it becomes claimable; you do not need to wait for its unlock time.

## Choose the payout

Fills use the vault's registered deposit assets. If their reserve balances are insufficient, [withdraw funds from positions](https://docs.exponent.finance/developer-strategy-vaults/deploy-capital-with-policies.md#withdraw-and-rebalance) first, or fill part of the request.

By default, the SDK draws from available token-entry balances in vault order. Set `tokenEntryIndices` to restrict the payout assets and their order. A full fill requires enough liquidity across those entries.

## Execute the fill

For an ordinary queued request, use the [transaction builder](https://docs.exponent.finance/developer-strategy-vaults/vault-transaction-builder.md). Governance opt-out requests need a proposal account; use the [manual fill builder](https://docs.exponent.finance/developer-strategy-vaults/typescript/vault-operations/overview.md#instruction-builder) for those.

```typescript theme={null}
import {
  VaultTransactionBuilder,
  managerAction,
} from "@exponent-labs/exponent-sdk";

const fill = managerAction.fillWithdrawal({
  withdrawalAccount: withdrawalAddress,
  amount: { kind: "full" },
});

const plan = await VaultTransactionBuilder
  .create({ vault, connection, signer: manager.publicKey })
  .addActions([fill])
  .build();

await plan.send({ signers: [manager] });
```

`build()` returns an execution plan and prepares policy execution, supported price refreshes, and valuation accounts. `send()` handles lookup tables, simulates, and submits its transactions in order. Keep the underlying [oracle and protocol inputs current](https://docs.exponent.finance/developer-strategy-vaults/refresh-aum.md#run-a-refresh).

For a partial fill, replace the `fill` declaration with a capped amount in the accounting denomination's smallest units:

```typescript theme={null}
const fill = managerAction.fillWithdrawal({
  withdrawalAccount: withdrawalAddress,
  amount: { kind: "up-to-base", maxBaseAmountAtomic: 250_000_000n },
  tokenEntryIndices: [0],
});
```

With USD6 accounting, this requests up to \$250 before the withdrawal fee, using token entry `0`. The SDK limits the planned fill to available liquidity; onchain prices determine the executed payout.

Each fill burns the redeemed LP tokens and fixes the token payout after fees. The depositor can [claim](https://docs.exponent.finance/developer-strategy-vaults/typescript/vault-operations/overview.md) once the request unlocks, including after a partial fill; claiming returns any unfilled LP tokens and closes the request.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.