# Utilization Metrics

Quick derivations of how the ksUSD vault's capital is deployed at any given moment.

> All math is derived from `vault.cached_nav_usdc` plus the position state fields. No on-chain view helpers are required — read the `Vault` account directly.

***

## Buckets

At any point, total NAV decomposes into:

| Bucket            | Source                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------ |
| Liquidity buffer  | Vault USDC ATA balance — sized to `liquidity_buffer_bps × cached_nav_usdc / 10_000` target |
| Reserve fund      | `reserve_fund_usdc` (productively lent on Kamino)                                          |
| Idle-mode capital | Kamino USDC reserve via `lend_idle_usdc`                                                   |
| Drift collateral  | jitoSOL on Drift sub-account (normal basis) or USDC on Drift sub-account (reverse basis)   |
| Drift perp PnL    | Settled funding + mark-vs-entry PnL on the open position                                   |
| Kamino collateral | `usdc_collateral_kamino` (reverse basis only)                                              |
| Kamino debt       | `jitosol_borrowed_kamino × oracle_sol_price` (reverse basis only — subtracted from NAV)    |

***

## Derived ratios

```ts
const buffer        = vaultUsdcAtaBalance;          // off-chain query
const target        = vault.cachedNavUsdc.muln(vault.liquidityBufferBps).divn(10_000);
const bufferUtilBps = Number(buffer.mul(10_000n).div(target.toBigInt()));  // 10_000 = exactly on target

const queuePendingRatioBps = vault.queuePendingUsdc * 10_000n / vault.cachedNavUsdc;
const navPerShare1e9       = vault.cachedNavUsdc * 1_000_000_000n / vault.totalShares;
```

| Ratio                  | What it means                                                                                                                                        |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bufferUtilBps`        | Whether the liquidity buffer is fully funded for instant withdrawals. < 9\_000 means the buffer is underfunded; the keeper should park more capital. |
| `queuePendingRatioBps` | Total USDC owed to queued withdrawal requests, as a fraction of NAV. Persistent values > 10% mean the keeper needs to unwind position to free USDC.  |
| `navPerShare1e9`       | Live share price, scaled 1e9. Drifts up with carry; resets to par on first deposit only.                                                             |

***

## When to alert

| Condition                                                         | Interpretation                                                   |
| ----------------------------------------------------------------- | ---------------------------------------------------------------- |
| `bufferUtilBps < 5_000` for > 1h                                  | Buffer < 50% of target — instant withdrawals may revert          |
| `queuePendingRatioBps > 1_500` for > 6h                           | Queue is > 15% of NAV — keeper should accelerate position unwind |
| Drift collateral value drifts > 5% from expected per-mode formula | Margin / oracle / settlement issue — investigate                 |

***

## Related

* [NAV & share pricing](/reference/nav-calculation.md) — full NAV formula
* [Monitoring](/for-operators/monitoring.md) — what to watch
* [Withdraw](/keystone-finance/withdraw.md) — instant vs. queued paths


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keystonefi.xyz/reference/utilization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
