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

# Initialize Vault

> Create a new Strategy Vault with roles, token entries, and Squads integration

# ExponentVault.ixInitializeVault

Creates a new Strategy Vault. This is a **static method** since the vault doesn't exist yet at call time. It sets up the vault PDA, mints the initial LP tokens, creates the Squads smart account for policy-gated execution, and registers the vault's token entries.

## Usage

```typescript theme={null}
import { ExponentVault } from "@exponent-labs/exponent-sdk";
import { PublicKey, Transaction, sendAndConfirmTransaction } from "@solana/web3.js";

const ix = ExponentVault.ixInitializeVault({
  payer: wallet.publicKey,
  mint: new PublicKey("So11111111111111111111111111111111111111112"), // Underlying mint
  manager: wallet.publicKey,
  seedId: new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]), // 8-byte unique seed
  feeTreasury: feeTreasuryAddress,
  feeTreasuryLpBps: 200, // 2% management fee
  tokenEntries: [
    {
      mint: usdcMint,
      priceId: { simple: { id: 0 } },
      tokenSquadsAccount: usdcSquadsAccount,
    },
  ],
  maxLpSupply: 1_000_000_000_000n,
  initialLpAmount: 1_000_000n,
  lpDecimals: 6,
  vaultType: { generic: {} },
  roles: {
    manager: [wallet.publicKey],
    curator: [],
    allocator: [],
    sentinel: [],
  },
  addressLookupTable: lookupTableAddress,
  squadsProgram: squadsV4ProgramId,
  squadsProgramConfig: squadsProgramConfigAddress,
  squadsTreasury: squadsTreasuryAddress,
  squadsSettings: squadsSettingsAddress,
  squadsVault: squadsVaultAddress,
}, env);

const tx = new Transaction().add(ix);
await sendAndConfirmTransaction(connection, tx, [wallet]);
```

## Parameters

| Name                  | Type                 | Required | Description                                                   |
| --------------------- | -------------------- | -------- | ------------------------------------------------------------- |
| `payer`               | `PublicKey`          | Yes      | Transaction payer and initial LP token recipient              |
| `mint`                | `PublicKey`          | Yes      | Underlying mint used for vault-level price validation         |
| `manager`             | `PublicKey`          | Yes      | Manager of the vault (can differ from payer)                  |
| `seedId`              | `SeedId` (8 bytes)   | Yes      | Unique 8-byte seed for the vault PDA                          |
| `feeTreasury`         | `PublicKey`          | Yes      | Fee treasury account that receives management fees            |
| `feeTreasuryLpBps`    | `number`             | Yes      | Management fee in basis points                                |
| `tokenEntries`        | `TokenEntryInput[]`  | Yes      | Initial set of accepted deposit tokens                        |
| `maxLpSupply`         | `bigint`             | Yes      | Maximum LP token supply (deposit cap)                         |
| `initialLpAmount`     | `bigint`             | Yes      | Initial LP tokens to mint                                     |
| `lpDecimals`          | `number`             | Yes      | Decimal places for the LP token                               |
| `vaultType`           | `VaultType`          | Yes      | `{ orderbook: {} }` or `{ generic: {} }`                      |
| `roles`               | `VaultRoles`         | Yes      | Role membership lists (manager, curator, allocator, sentinel) |
| `proposalVoteConfig`  | `ProposalVoteConfig` | No       | Governance voting configuration                               |
| `addressLookupTable`  | `PublicKey`          | Yes      | Address lookup table for the vault                            |
| `squadsProgram`       | `PublicKey`          | Yes      | Squads v4 program ID                                          |
| `squadsProgramConfig` | `PublicKey`          | Yes      | Squads program config account                                 |
| `squadsTreasury`      | `PublicKey`          | Yes      | Squads treasury account                                       |
| `squadsSettings`      | `PublicKey`          | Yes      | Squads settings account                                       |
| `squadsVault`         | `PublicKey`          | Yes      | Squads vault account                                          |
| `tokenProgram`        | `PublicKey`          | No       | SPL Token program. Defaults to `TOKEN_PROGRAM_ID`             |

The second argument is an `Environment` object that specifies the program ID.

## Returns

`TransactionInstruction` — a single instruction that creates the vault, mints LP tokens, and sets up the Squads smart account.

## TokenEntryInput

```typescript theme={null}
interface TokenEntryInput {
  mint: PublicKey;
  priceId: PriceId;
  tokenSquadsAccount: PublicKey;
  forceDeallocatePolicyIds?: bigint[];
}
```

## Deriving the Vault Address

After initialization, you can derive the vault PDA from its seed:

```typescript theme={null}
const [vaultAddress] = ExponentVault.deriveVaultAddress(seedId);
```
