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

# Create Vault

> Create a new vault (lake) and optionally set its initial configuration and seed deposit.

```http theme={null}
POST /api/v1/lake/create
```

The operation type for signing is `"create_lake"`.

This endpoint creates a new vault and returns its generated account address. The API path uses `lake`, but this feature is referred to as `vaults` in user-facing docs.

`manager_loss_share` is currently disabled; omit it or pass `"0"`.

#### Request Body

<table><thead><tr><th width="200">Field</th><th width="110">Type</th><th width="90">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"account"</code></td><td>string</td><td>required</td><td>Creator wallet address</td><td><code>42trU9A5...</code></td></tr><tr><td><code>"signature"</code></td><td>string</td><td>required</td><td>Signature over the sorted request payload</td><td><code>5J3mBbAH...</code></td></tr><tr><td><code>"timestamp"</code></td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td><code>1716200000000</code></td></tr><tr><td><code>"manager"</code></td><td>string</td><td>optional</td><td>Manager address. Omit to create a fresh vault with no manager.</td><td><code>8zFqj1Kp...</code></td></tr><tr><td><code>"nickname"</code></td><td>string</td><td>optional</td><td>Display name for the vault</td><td><code>BTC Basis Vault</code></td></tr><tr><td><code>"deposit\_cap"</code></td><td>decimal string</td><td>optional</td><td>Maximum LP balance accepted by the vault</td><td><code>1000000</code></td></tr><tr><td><code>"manager\_profit\_share"</code></td><td>decimal string</td><td>optional</td><td>Performance fee fraction in <code>\[0,1]</code></td><td><code>0.20</code></td></tr><tr><td><code>"manager\_loss\_share"</code></td><td>decimal string</td><td>optional</td><td>Temporarily disabled; only <code>"0"</code> is accepted</td><td><code>0</code></td></tr><tr><td><code>"deposit\_min\_duration\_ms"</code></td><td>integer</td><td>optional</td><td>Minimum deposit lock duration in milliseconds</td><td><code>86400000</code></td></tr><tr><td><code>"manager\_min\_balance\_portion"</code></td><td>decimal string</td><td>optional</td><td>Manager balance ratio required to claim or re-enable the vault</td><td><code>0.10</code></td></tr><tr><td><code>"manager\_liquidation\_balance\_portion"</code></td><td>decimal string</td><td>optional</td><td>Manager balance ratio that triggers trading halt and liquidation</td><td><code>0.05</code></td></tr><tr><td><code>"initial\_deposit"</code></td><td>decimal string</td><td>optional</td><td>Seed deposit from the creator in the same request</td><td><code>1000.00</code></td></tr><tr><td><code>"withdraw\_window\_s"</code></td><td>integer</td><td>optional</td><td>Withdrawal cycle period in seconds</td><td><code>2592000</code></td></tr><tr><td><code>"withdraw\_duration\_s"</code></td><td>integer</td><td>optional</td><td>Open withdrawal time per cycle in seconds</td><td><code>259200</code></td></tr><tr><td><code>"referral\_code"</code></td><td>string</td><td>optional</td><td>Referral code to claim for the new vault</td><td><code>testcode</code></td></tr><tr><td><code>"initial\_deposit\_address\_whitelist"</code></td><td>string array or null</td><td>optional</td><td>Initial deposit-address whitelist. Empty or omitted = no restriction (anyone can deposit).</td><td><code>\["42trU9A5..."]</code></td></tr><tr><td><code>"agent\_wallet"</code></td><td>string</td><td>optional</td><td>Agent wallet address</td><td><code>69trU9A5...</code></td></tr><tr><td><code>"expiry\_window"</code></td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td><code>30000</code></td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "signature": "5J3mBbAH...",
  "timestamp": 1716200000000,
  "nickname": "BTC Basis Vault",
  "manager_profit_share": "0.20",
  "deposit_cap": "1000000",
  "deposit_min_duration_ms": 86400000,
  "manager_min_balance_portion": "0.10",
  "manager_liquidation_balance_portion": "0.05",
  "initial_deposit": "1000.00",
  "withdraw_window_s": 2592000,
  "withdraw_duration_s": 259200,
  "referral_code": "testcode",
  "expiry_window": 30000
}
```

#### Response

* Status 200: Vault created successfully

```json theme={null}
{
  "success": true,
  "data": {
    "lake_address": "AbCdEfGh123456789...",
    "referral_claimed": true
  },
  "error": null,
  "code": null
}
```

| Field                | Type    | Description                                                 |
| -------------------- | ------- | ----------------------------------------------------------- |
| `'lake_address'`     | string  | Generated vault account address                             |
| `'referral_claimed'` | boolean | Whether the optional referral code was claimed successfully |

* Status 400: Invalid request parameters
* Status 401: Unauthorized access
* Status 500: Internal server error
