After creating your vault, strategy setup is a two-step process:
- add the adaptor to the vault
- initialize each strategy you want to deploy to
Vault creation does not initialize any strategies. Until this step is complete, deposits remain idle.
Concepts
- Adaptor: an on-chain program that knows how to talk to a category of protocols
- Strategy: a specific target inside that adaptor, such as one market, vault, or counterparty
Add The Adaptor
import { getAddAdaptorInstructionAsync } from "@voltr/vault-sdk";
const addAdaptorIx = await getAddAdaptorInstructionAsync({
payer: adminSigner,
admin: adminSigner.address,
vault: vaultAddress,
adaptorProgram: adaptorProgramAddress,
});
Initialize The Strategy
import { getInitializeStrategyInstructionAsync } from "@voltr/vault-sdk";
const initStrategyIx = await getInitializeStrategyInstructionAsync({
payer: adminSigner,
manager: managerAddress,
vault: vaultAddress,
strategy: strategyAddress,
adaptorProgram: adaptorProgramAddress,
instructionDiscriminator,
additionalArgs: new Uint8Array(),
remainingAccounts: [
// protocol-specific accounts
],
});
Do It From The CLI
The exact strategy, discriminator, and remaining accounts are adaptor-specific. Rather than wiring them by hand, the sdk-scripts CLI derives them for you from your vault profile. Add the adaptor once, then initialize each strategy:
# 1. Register the adaptor on the vault (admin). Defaults to Kamino; pass --adaptor-program for others.
pnpm cli -- --profile configs/my-vault.json --mode execute vault:add-adaptor
# 2. Initialize a strategy (manager). One command per integration:
pnpm cli -- --profile configs/my-vault.json --mode execute kamino:market:init # Kamino lending market
pnpm cli -- --profile configs/my-vault.json --mode execute kamino:kvault:init # Kamino vault
pnpm cli -- --profile configs/my-vault.json --mode execute spot:swap:init # Jupiter swap
pnpm cli -- --profile configs/my-vault.json --mode execute spot:earn:init # Jupiter Earn
pnpm cli -- --profile configs/my-vault.json --mode execute trustful:arbitrary:init
pnpm cli -- --profile configs/my-vault.json --mode execute trustful:curve:init
See CLI & Scripts for profile setup and transaction modes, and Supported Integrations for the full command surface. To build these instructions in your own code instead, the programmatic examples have one file per *-init action.