> For the complete documentation index, see [llms.txt](https://docs.syndromics.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.syndromics.xyz/protocol/maturity-and-refinancing.md).

# Maturity and refinancing

Fixed-term loans have an obvious weakness: the cliff at maturity. A borrower who cannot repay on the day faces liquidation even if the collateral is perfectly healthy. Syndromics removes the cliff with a refinancing auction, borrowed from Blend, that needs no oracle and no discretionary actor.

## At maturity

When a loan reaches its `maturity` timestamp it enters a **grace window** of 24 hours. During the window:

* the borrower may repay in full and release collateral,
* interest continues to accrue at the slice APRs,
* liquidation on health-factor grounds remains possible as usual.

If the window passes without repayment, the loan is **Defaulted** and becomes liquidatable regardless of health factor. See [Health factor and liquidation](/protocol/health-and-liquidation.md).

## Refinance auction

At any point before maturity, the borrower (or a keeper acting for them) may call `openRefinance(loanId)`. This starts a rising-rate auction:

* The offered rate starts at the loan's current blended APR.
* It rises linearly toward a cap over a fixed duration: the cap is the current rate plus 400 basis points and the duration is four hours. Both are ParamController values.
* Any eligible lender may accept the current rate for all or part of the principal by submitting a signed offer that meets it.
* Each acceptance is escrowed in the auction contract at the rate in force when it was submitted; different acceptors can end up at different rates.
* When acceptances cover the coverage target (outstanding debt plus the refinance fee), the auction forwards the USDG to the settlement, which repays the old slices in full (principal plus accrued interest, net of the interest share), burns the old position NFTs and mints new ones. The collateral never leaves escrow.
* The new loan has the same term length restarted from the clearing block, and a principal equal to the old debt plus the refinance fee. Interest and fee are rolled rather than paid out of pocket.
* Clearing reverts if the resulting health factor would be below 1.0.

If the auction window ends without full coverage, anyone may call `fail`: acceptors are refunded, the loan is marked **Defaulted** and collateral becomes liquidatable. A borrower may cancel an auction that has not yet received an acceptance.

```mermaid
sequenceDiagram
  participant Bo as Borrower
  participant LS as LoanSettlement
  participant RA as RefinanceAuction
  participant Old as Old lenders
  participant New as New lenders

  Bo->>RA: openRefinance(loanId)
  Note over RA: rate rises from current APR toward cap
  New->>RA: accept(rate, amount, sig)
  RA->>LS: pull USDG from New
  LS-->>Old: principal + interest, NFTs burned
  LS-->>New: new position NFTs, fresh term
  Note over LS: collateral stays in escrow throughout
```

### Why it works without an oracle

The auction only needs to find a rate at which someone is willing to hold the existing collateral position. If the collateral is genuinely sound, that rate exists and is found quickly. If nobody will take it at any rate up to the cap, the market has answered, and the loan goes to liquidation. No price feed, keeper judgement or governance vote is involved in the rollover decision itself.

### Who accepts

Existing lenders can accept their own refinance, which is the common case for a lender who is happy with the position. Keepers can be authorised by lenders to accept on their behalf up to a rate limit, so a lender does not have to watch every maturity.

## Fees

Refinancing carries a 0.10% fee on the principal, paid by the borrower. See [Fees](/protocol/fees.md).

## Example

A 20,000 USDG loan at a blended 8.825% is three days from maturity. The borrower opens a refinance auction with a cap of the current rate plus 400 bps over four hours. Forty minutes in, at 9.4%, two of the existing lenders and one new lender accept for the full 20,000. The old slices are repaid with 27 days of interest, three new NFTs are minted with a fresh 30-day term at 9.4%, and the borrower pays 20 USDG in refinance fee. Collateral never moved.


---

# 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.syndromics.xyz/protocol/maturity-and-refinancing.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.
