Skip to main content
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

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

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 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:
# 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 for the full command surface, and the programmatic examples to build these instructions in your own code.