> 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/finalized.md).

# Finalized

**Finalized** is the single terminal state every vault eventually reaches, regardless of how the loan ended. It is reached from three different phases, each once its own wind-down is complete — never automatically.

| From                                                               | Condition                                                                                    | Who closes it            |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- | ------------------------ |
| [FullyRepaid](/protocol-mechanics/vault-lifecycle/fully-repaid.md) | Cash pool empty and every investor has claimed their tranche's full entitlement              | Anyone, via `finalize()` |
| [Cancelled](/protocol-mechanics/vault-lifecycle/cancelled.md)      | Every investor has pulled their own `claim_refund` (funding or approval deadline was missed) | Anyone, via `finalize()` |
| [Defaulted](/protocol-mechanics/vault-lifecycle/defaulted.md)      | Recovery has been distributed and every tranche pool is fully claimed                        | Anyone, via `finalize()` |

`finalize()` is the same permissionless function in every case — it checks the vault's current phase and the relevant completion condition, then transitions to Finalized. Calling it before the condition for the current phase is met fails with `CashPoolNotEmpty`, `EmiPoolNotFullyClaimed`, or `RecoveryNotDistributed` as appropriate.

## What Happens

* No further deposits, payments, claims, or withdrawals are possible
* The vault contract remains on-chain as a permanent record

{% hint style="info" %}
Finalized vaults serve as an immutable audit trail. All events — deposits, payments, claims, phase transitions — remain queryable on the Stellar ledger.
{% endhint %}

*As of September 2026.*
