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

# Index Vault technical details

## Technical considerations

Index Vault behavior is very similar to [Credit Vaults](/brila-protocol/credit-vaults.md), with exceptions in the following areas:

### Capital Deployment

Instead of loans, IVs utilize an instrument called `Investment` to deploy funds.

`Investments` are LP positions at non-IV vaults on Brila.&#x20;

Because Brila vaults implement the ERC-4626 interface, interactions with all types of Brila vaults work the same way.

### Valuation

Instead of an array of loans, IVs hold an array of `investments`.&#x20;

When calculating IV valuations, the IV iterates through that array and calls ERC-4626 `totalAssets()` on each of the underlying vaults to fetch the value of each `investment`.

### Investment Flow

#### Allocating Capital

Capital allocation happens through proxying one of the following methods:

* `deposit(assets, receiver)`
* `mint(shares, receiver)`

Allocation is only possible if the target vault’s token is already registered on the `vaultsRegistry`.&#x20;

#### Adding tokens to the vaultsRegistry

Adding a token as a potential `investment` adds the token to the list of tracked asset balances and values.&#x20;

In order to `register` a token, the token must:

* Be one of the allowlisted types of Brila products (i.e. [Lines of Credit](/brila-protocol/automated-lines-of-credit.md), [Credit Vaults](/brila-protocol/credit-vaults.md), or [Flexible Portfolios](/brila-protocol/other-concepts/other-legacy-contracts/flexible-portfolios-legacy/flexible-portfolio-contracts.md))
* Not be registered already

#### Removing tokens from the vaultsRegistry

`unregister` removes a token from the tracked assets list.

#### Redeeming / withdrawing

Redeeming and withdrawing happens through proxying one of the following methods:

* `withdraw(assets, receiver, owner)`
* `redeem(shares, receiver, owner)`

## Closing Vaults

Index Vaults cannot be closed while holding any active `investment`. Similar to how vaults cannot close before maturity unless all underlying loans are inactive, IVs cannot close unless all `investments` have closed first.


---

# 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.brila.finance/brila-protocol/index-vaults/index-vault-technical-details.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.
