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

# Vault Creation

> Create and initialize a new vault using the Voltr SDK

<Info>
  You can also create a vault without code at [voltr.xyz/create](https://voltr.xyz/create) (see [Quick Start (UI)](/vault-owners/initialization/via-ui)), or in one command with the [`sdk-scripts` CLI](/vault-owners/operations/cli-and-scripts): `pnpm cli -- --profile configs/my-vault.json --mode execute vault:init --manager <MANAGER_PUBKEY> --name "My USDC Vault" --max-cap 100000000000`.
</Info>

The page below shows the lower-level SDK flow, based on `@solana/kit` plus direct instruction builders. Use it when you embed vault creation in your own code; otherwise the CLI is the quickest path.

## Setup

```typescript theme={null}
import fs from "fs";
import {
  createKeyPairSignerFromBytes,
  generateKeyPairSigner,
} from "@solana/kit";
import { findAssociatedTokenPda } from "@solana-program/token";
import {
  findVaultAssetIdleAuthPda,
  getInitializeVaultInstructionAsync,
} from "@voltr/vault-sdk";
```

## 1. Define Vault Parameters

```typescript theme={null}
const vaultParams = {
  maxCap: 18_446_744_073_709_551_615n,
  startAtTs: 0n,
  lockedProfitDegradationDuration: 86_400n,
  managerPerformanceFee: 1_000,
  adminPerformanceFee: 500,
  managerManagementFee: 50,
  adminManagementFee: 25,
  redemptionFee: 10,
  issuanceFee: 10,
  withdrawalWaitingPeriod: 0n,
  name: "My Voltr Vault",
  description: "Short vault strategy description",
};
```

<Warning>
  `maxCap: 0n` means zero capacity, not unlimited capacity. For an uncapped vault, use the full u64 max value.
</Warning>

<Warning>
  Keep the description within the on-chain limit. Oversized metadata will cause the transaction to fail.
</Warning>

## 2. Load Signers And Derive Vault Accounts

```typescript theme={null}
const adminSigner = await createKeyPairSignerFromBytes(
  Uint8Array.from(JSON.parse(fs.readFileSync("/path/to/admin.json", "utf-8")))
);
const managerSigner = await createKeyPairSignerFromBytes(
  Uint8Array.from(JSON.parse(fs.readFileSync("/path/to/manager.json", "utf-8")))
);

const vaultSigner = await generateKeyPairSigner();
const assetMint = "ASSET_MINT_ADDRESS" as const;
const assetTokenProgram = "TOKEN_PROGRAM_ADDRESS" as const;

const [vaultAssetIdleAuth] = await findVaultAssetIdleAuthPda({
  vault: vaultSigner.address,
});
const [vaultAssetIdleAta] = await findAssociatedTokenPda({
  owner: vaultAssetIdleAuth,
  mint: assetMint,
  tokenProgram: assetTokenProgram,
});
```

## 3. Build The Initialize Instruction

```typescript theme={null}
const initializeVaultIx = await getInitializeVaultInstructionAsync({
  payer: adminSigner,
  admin: adminSigner.address,
  manager: managerSigner.address,
  vault: vaultSigner,
  vaultAssetMint: assetMint,
  vaultAssetIdleAta,
  assetTokenProgram,
  ...vaultParams,
});
```

## 4. Send The Transaction

Send the returned instruction with your standard `@solana/kit` transaction flow. The admin signs as payer and the generated vault keypair signs as the new account.

Save the resulting vault address. You will use it for:

1. [LP metadata](/vault-owners/initialization/lp-metadata)
2. [Strategy setup](/vault-owners/strategies/setup-guide)
3. [Allocation](/vault-owners/allocation/overview)

For the full account schema and helper exports, see [SDK Reference](/developers/sdk-reference).
