# Renegotiation

The **Renegotiation** phase allows the Pool Manager to propose modified loan terms when circumstances change. This can happen from either the **Active** or **Defaulted** phase.

## When to Renegotiate

Renegotiation is useful when:

* The borrower is struggling with payments and needs adjusted terms
* Market conditions have changed and rates need updating
* A defaulted vault can be restructured to resume payments
* The loan term needs to be extended or shortened

## How It Works

### 1. Propose

The Pool Manager calls `propose_renegotiation(caller, new_interest_rate, new_loan_term)`:

* The vault's **previous phase** (Active or Defaulted) is saved
* A `RenegotiationProposal` is stored with the new rate, new term, and timestamp
* The vault transitions to the **Renegotiation** phase

### 2. Approve or Reject

The Pool Manager then either approves or rejects the proposal:

**If approved** (`approve_renegotiation`):

* The vault's interest rate and loan term are updated
* The **EMI is recalculated** based on the **outstanding principal** (not the original principal)
* Payment tracking is reset: `payments_made = 0`, `missed_payments = 0`, `late_fees = 0`
* The **next due date** is set to 30 days from now
* The vault transitions back to **Active**

**If rejected** (`reject_renegotiation`):

* The proposal is discarded
* The vault returns to its **previous phase** (Active or Defaulted)

{% hint style="warning" %}
Only one renegotiation proposal can exist at a time. A new proposal cannot be created while one is pending.
{% endhint %}

## Key Details

* Only the vault's **Pool Manager** can propose, approve, or reject renegotiations
* The EMI recalculation uses the **remaining outstanding principal**, not the original principal — this means the new payment schedule reflects what's actually owed
* Renegotiation from **Defaulted** is particularly powerful — it allows a defaulted vault to be restructured and resume active repayments

## Relevant Functions

| Function                                    | Caller  | Description                             |
| ------------------------------------------- | ------- | --------------------------------------- |
| `propose_renegotiation(caller, rate, term)` | Manager | Propose new terms                       |
| `approve_renegotiation(caller)`             | Manager | Apply new terms, recalculate EMI        |
| `reject_renegotiation(caller)`              | Manager | Cancel proposal, restore previous phase |
| `get_reneg_proposal()`                      | Anyone  | View current proposal                   |


---

# Agent Instructions: 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:

```
GET https://docs.trilobyte.finance/protocol-mechanics/vault-lifecycle/renegotiation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
