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

# Vault Lifecycle

Every Trilobyte vault goes through a series of phases that represent the state of the loan. Transitions between phases are triggered by on-chain actions — deposits, approvals, payments, or enforcement calls.

## Phase Diagram

```
RaisingFunds ──► AwaitingApproval ──► Active ──► FullyRepaid   (loan settled · terminal)
                                        │  ↕
                                        │  Renegotiation  (⇄ Active only)
                                        ▼
                                     Defaulted             (terminal)

RaisingFunds / AwaitingApproval ──► Finalized
   (funding or approval deadline expired → investors refunded)
```

## Phases at a Glance

| Phase                | Description                                                                                                              | Who Acts                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
| **RaisingFunds**     | Vault is open for investor deposits                                                                                      | Investors                    |
| **AwaitingApproval** | Fully funded, waiting for manager to approve and disburse                                                                | Pool Manager                 |
| **Active**           | Loan is live — borrower makes payments, investors claim yield                                                            | Borrower, Investors, Manager |
| **FullyRepaid**      | Loan settled (outstanding reached zero) — investors claim remaining yield. **Terminal.**                                 | Investors, Borrower          |
| **Finalized**        | Terminal state for a vault **cancelled before disbursement** (funding or approval deadline expired) — investors refunded | —                            |
| **Renegotiation**    | Terms are being renegotiated (**from Active only**)                                                                      | Pool Manager                 |
| **Defaulted**        | Borrower failed to repay within the grace period. **Terminal** (manager collateral is slashed).                          | Anyone (trigger)             |

## Transition Rules

* **RaisingFunds → AwaitingApproval**: Automatic when total deposits equal the principal
* **RaisingFunds → Finalized**: Funding deadline expired (permissionless call)
* **AwaitingApproval → Active**: Manager calls `approve_and_disburse`
* **AwaitingApproval → Finalized**: Approval deadline expired (permissionless call)
* **Active → FullyRepaid**: Automatic when the outstanding balance reaches zero (terminal — investors claim any remaining yield here)
* **Active → Renegotiation**: Manager proposes new terms
* **Active → Defaulted**: Grace period expired after a missed payment (permissionless call; terminal)
* **Renegotiation → Active**: Manager approves the proposal (EMI recalculated) — or rejects it, which restores **Active**

*(Defaulted and FullyRepaid are terminal. Renegotiation is only reachable from — and returns to — Active; a defaulted loan cannot be renegotiated because the manager's collateral is already slashed.)*

{% hint style="info" %}
Explore each phase in detail using the sub-pages below.
{% endhint %}


---

# 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.trilobyte.finance/protocol-mechanics/vault-lifecycle.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.
