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

# Fund Allocation

> Deposit and withdraw funds between the vault and strategies

Strategy allocation is partly generic and partly protocol-specific.

The generic Voltr side uses:

* `getDepositStrategyInstructionAsync`
* `getWithdrawStrategyInstructionAsync`

The protocol side determines:

* strategy address derivation
* required ATAs and protocol accounts
* any remaining accounts needed by the adaptor

## Deposit To A Strategy

```typescript theme={null}
import { getDepositStrategyInstructionAsync } from "@voltr/vault-sdk";

const depositIx = await getDepositStrategyInstructionAsync({
  manager: managerSigner,
  vault: vaultAddress,
  vaultAssetMint: assetMintAddress,
  assetTokenProgram,
  strategy: strategyAddress,
  depositAmount: 1_000_000n,
  adaptorProgram,
  remainingAccounts: [
    // protocol-specific accounts
  ],
});
```

## Withdraw From A Strategy

```typescript theme={null}
import { getWithdrawStrategyInstructionAsync } from "@voltr/vault-sdk";

const withdrawIx = await getWithdrawStrategyInstructionAsync({
  manager: managerSigner,
  vault: vaultAddress,
  vaultAssetMint: assetMintAddress,
  assetTokenProgram,
  strategy: strategyAddress,
  withdrawAmount: 500_000n,
  adaptorProgram,
  remainingAccounts: [
    // protocol-specific accounts
  ],
});
```

## Operational Notes

* ATAs created for strategy operations are usually a one-time manager-paid rent cost.
* The manager should keep some idle vault liquidity for withdrawals.
* Batch ATA setup and allocation instructions when possible.
* Let the CLI handle the exact account wiring (see below).

## Allocate From The CLI

The [`sdk-scripts`](https://github.com/voltrxyz/sdk-scripts) CLI builds both the generic Voltr side and the protocol-specific accounts from your vault profile. Each `deposit`/`withdraw` moves funds between the vault and one strategy:

```bash theme={null}
# Kamino lending market / vault (manager):
pnpm cli -- --profile configs/my-vault.json --mode execute kamino:market:deposit  --amount 1000000
pnpm cli -- --profile configs/my-vault.json --mode execute kamino:kvault:withdraw --amount 500000

# Jupiter Earn (manager):
pnpm cli -- --profile configs/my-vault.json --mode execute spot:earn:deposit  --amount 1000000
pnpm cli -- --profile configs/my-vault.json --mode execute spot:earn:withdraw --amount 500000
```

Always preview with `--mode print` then `--mode simulate` before `--mode execute`. See [CLI & Scripts](/vault-owners/operations/cli-and-scripts) for the full command surface, and the programmatic [examples](https://github.com/voltrxyz/sdk-scripts/tree/main/examples) to build these instructions in your own code.
