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

# Create a MicroVault

> Create a vault and track its deployment.

Creating a MicroVault deploys a non-upgradeable vault with its own ERC-20 share token. The vault contract address is also the share-token address.

## Prerequisites

* MicroVaults enabled for your organization
* A base asset returned by `GET /v3/microvaults/yield-sources?chainId=11155111`
* A fee recipient address

## 1. Submit the vault settings

Fees use percentages: `1` means `1%`. Use `0` for no fee.

| Field | Meaning |
| - | - |
| `baseAsset` | Token shareholders deposit and receive on redemption. It must match an available MicroVault yield source on the selected chain. |
| `name` | Full ERC-20 name shown for the share token. |
| `symbol` | Short ERC-20 ticker shown for the share token. |
| `feeRecipient` | Address that receives fee shares when fees accrue. |
| `managementFeePct` | Annual management fee in percent. |
| `performanceFeePct` | Fee on gains above the vault's high-water NAV, in percent. |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X POST "https://sandbox.groundtech.co/v3/microvaults/vaults" \
  -H "Authorization: Bearer $GROUND_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "baseAsset": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
  "name": "Acme Treasury MicroVault",
  "symbol": "acmeUSDC",
  "feeRecipient": "0x76f8fc6667e239f83a547d4e16225d6a34f6fa22",
  "managementFeePct": 0,
  "performanceFeePct": 0
}'
```

The response describes the asynchronous creation task. Save `task.id` to identify this creation attempt.

## 2. Track provisioning

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS "$BASE_URL/v3/microvaults/vaults" \
  -H "Authorization: Bearer $GROUND_API_KEY" | jq
```

1. Find the entry in `provisionings` whose `id` equals the saved `task.id`.
2. Save that entry's `chainId`, `customerId`, and `customerVaultNonce`.
3. Find the active vault in `items` with the same `chainId` and
   `customerVaultNonce`, and with `onchainCustomerId` equal to that `customerId`.
   Follow `nextCursor` to check later pages.
4. Verify its `address` against the confirmed creation transaction receipt before
   saving its API `id`.

For example, a provisioning entry with `chainId: 11155111`, `customerId: "7"`,
and `customerVaultNonce: "2"` matches an active item on chain `11155111` with
`onchainCustomerId: "7"` and `customerVaultNonce: "2"`. It must also match the
address in the confirmed receipt. Share names are not unique identifiers.

If the provisioning entry has already disappeared, use its creation transaction
receipt and the deployed factory ABI to obtain the created vault address. Match
that address in `items`. Keep the task ID and transaction hashes if you need
Ground to investigate an unresolved creation.

## Confirm creation

Creation is complete when the vault appears in `items` with `status: "active"`. Save its `id` for API calls. Its `address` is both the vault contract address and the ERC-20 share-token address.

If the provisioning entry reports `failed`, do not create a duplicate vault with the same settings. Record its task ID and error, correct the reported cause, and retry with a new idempotency key.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.