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

# Defaulted

The **Defaulted** phase is triggered when a borrower fails to make payments within the allowed grace period. Default has serious consequences for the Pool Manager, and it starts a strict, ordered recovery for investors.

## How Default Happens

1. The borrower misses a payment — the **next due date** passes
2. The Pool Manager may apply **late fees** (a governed rate, default 18% p.a., split pro rata across the tranches' arrears)
3. The **grace period** countdown runs from the contractual due date (`schedule_start + (payments_made + 1) × period_seconds`), plus `grace_period`
4. If no payment is made before the deadline, anyone can call `check_default()`
5. The vault transitions to **Defaulted**

## What Happens on Default

When `check_default()` is called and the grace period has expired:

1. The vault phase transitions to **Defaulted**
2. The Pool Manager's **collateral is slashed** — transferred into the vault's recovery pool
3. If the vault holds a borrower collateral pledge, it is **seized** to the designated recovery party
4. The manager is **marked delinquent** in the Globals contract (`mark_delinquent`)
5. The manager's and borrower's **outstanding principal** are decremented in Globals
6. A `VaultDefaulted` event is emitted with both tranches' outstanding amounts and the missed-payment count

## Recovery — senior first, always

Once defaulted, **anyone** can call `distribute_recovery()` — once. It allocates the vault's full token balance (slashed collateral, seized pledge proceeds if paid in on-chain, plus any funds already in the vault) into per-tranche recovery pools, strictly in this order:

1. Senior principal outstanding
2. Senior's unpaid (accrued) interest
3. Junior principal outstanding
4. Junior's unpaid interest
5. Residual — first back to the manager (any of the slashed collateral not needed to make 1–4 whole), then to the borrower

Investors then call `claim_recovery(investor, tranche)` to pull their pro-rata share from their tranche's recovery pool. **Junior structurally cannot recover anything until senior's pool (principal + interest) is fully covered.** A second call to `distribute_recovery()` on the same vault fails with `RecoveryAlreadyDistributed`; `claim_recovery`/`finalize` before the first call fail with `RecoveryNotDistributed`.

## Consequences for the Manager

* **Collateral slashed** — The locked collateral for this vault is seized into the recovery pool
* **Delinquency flag** — The manager is flagged as delinquent in Globals
* **Blocked from new vaults** — The Factory rejects vault creation for delinquent managers
* **Requires manual clearing** — Only an Operations Admin can call `clear_delinquency` after review

{% hint style="danger" %}
Default is the most severe outcome. Pool Managers have strong financial incentives to ensure borrower repayment — their own collateral is at stake, and it pays out to investors before they see any of it back.
{% endhint %}

## Default is terminal

Once a loan defaults, the phase is **terminal** — it cannot be renegotiated or returned to Active:

* The Pool Manager's staked **collateral is slashed** to compensate investors, senior tranche first.
* The manager is marked **delinquent** in Globals, which blocks them from originating new loans until cleared.
* Restructuring is only possible **before** default — see [Renegotiation](/protocol-mechanics/vault-lifecycle/renegotiation.md), which is reachable from the Active phase only.
* Once recovery is distributed and every tranche pool is fully claimed, anyone can call `finalize()` to move the vault to [Finalized](/protocol-mechanics/vault-lifecycle/finalized.md).

## Relevant Functions

| Function                            | Caller        | Description                                                                                                                     |
| ----------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `check_default()`                   | Anyone        | Trigger default once the grace period has expired (slashes manager collateral, seizes any pledge, marks the manager delinquent) |
| `distribute_recovery()`             | Anyone (once) | Allocate the vault's full balance into per-tranche recovery pools, senior first                                                 |
| `claim_recovery(investor, tranche)` | Investor      | Pull your pro-rata share of your tranche's recovery pool                                                                        |
| `finalize()`                        | Anyone        | Close the vault once recovery is distributed and fully claimed                                                                  |

*As of September 2026.*
