> For the complete documentation index, see [llms.txt](https://docs.useicaria.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.useicaria.xyz/protocol/anchor-vaults.md).

# Anchor vaults

The per-asset contracts that carry inventory and post a two-sided quote in every market.

A market is a vault: one Stock Token, USDG alongside it, and the LPs whose capital stands behind both sides. Unless it is halted, the vault has a bid and an ask live around the oracle mid at all times, absorbs swaps up to its clip, and hands the spread it earns to the people who funded it.

## Inventory model

A configured mix is what every vault aims at (half and half by value to begin with), and a hard band around that target is what it will not leave.

| Parameter          | Meaning                                                              | Tier A initial value |
| ------------------ | -------------------------------------------------------------------- | -------------------- |
| `targetRatioBps`   | How much of the vault's value it intends to carry in the Stock Token | 5,000 (50%)          |
| `inventoryBandBps` | The drift from target at which one side of the quote switches off    | 2,000 (±20%)         |
| `maxClip`          | The biggest swap the vault will take in one go                       | 50,000 USDG          |
| `dailyVolumeCap`   | The per-market volume ceiling during the guarded launch              | 2,000,000 USDG       |

Buying pressure drains token inventory and piles up USDG, leaving the vault light on the asset. From there [skew pricing](/protocol/pricing-and-spreads.md) sharpens the bid and dulls the ask, which is the vault paying makers and arbitrageurs to bring the mix back. Should flow stay one-directional long enough to reach the band edge, that side of the quote simply stops rather than absorbing inventory risk without limit. Quoting continues on the other side throughout.

## Inventory rather than a curve

Inventory is something a constant-product pool holds as well, but it reads its price out of that inventory, so every tick on the reference price leaves it quoting yesterday's number for arbitrageurs to collect. The oracle is where an anchor vault gets its price; inventory only moves the spread around it. Being last to hear what an asset is worth is therefore not a position the vault can end up in, and its LPs keep the spread instead of financing somebody's arbitrage. The cost of that arrangement is stated openly: the vault leans on the oracle, and every guard protecting that dependency is set out in [Oracles and market sessions](/risk/oracles.md).

## Value accounting

A vault is worth `usdgBalance + tokenBalance × mid`, valued at the guarded oracle price. ERC-4626-style accounting runs over that total: depositing mints shares at the prevailing value per share, spread revenue lifts that value, and redeeming burns shares against a proportional, in-kind slice of both assets. Because redemption is in kind, a departing LP never obliges the vault to trade, and no pause can lock LP capital inside. [Liquidity provision](/protocol/liquidity-provision.md) works through the mechanics and the economics.

## Lifecycle

| State       | Meaning                                                                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `ACTIVE`    | Quoting on both sides, within whatever the regime allows                                                                                       |
| `ONE_SIDED` | Sitting at the band edge, with only the corrective side quoting                                                                                |
| `HALTED`    | Quoting is off: a stale oracle, an `oraclePaused()` flag, a corporate action in flight, or a guardian pause. Deposits and withdrawals continue |
| `RETIRED`   | Delisted: quoting has ended permanently and only withdrawals remain                                                                            |

Vaults come out of `VaultFactory` carrying the parameters agreed at [listing](/assets/listing-framework.md), and every one of those parameters is a `ParamController` value that moves only by timelock.

## Invariants

Properties the contract holds to, and which the test suite demonstrates:

* No fill clears beyond the oracle band, under any state and any parameter set.
* Value per share never falls because of a swap, since spread revenue cannot be negative by construction.
* Withdrawals stay open through `HALTED` and `RETIRED` alike.
* Nothing the vault quotes can drive its own inventory past the band.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.useicaria.xyz/protocol/anchor-vaults.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
