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

# Maturity, grace and the rollover auction

What happens when a fixed term reaches maturity, from the 24-hour grace window to the rising-rate rollover auction that carries a loan into a new term.

The trajectory of a fixed-term loan has one hazard built into it, and that is maturity itself. A borrower whose position is perfectly sound but who lacks the cash on that particular day would, in most designs, be liquidated out of a healthy loan. Farlight avoids this with a rollover auction, a mechanism borrowed from Blend. It needs no oracle and asks nobody to exercise judgement.

## The grace window

Once the loan's `maturity` timestamp is reached, a **grace window** of 24 hours begins. While it runs:

* full repayment remains open and returns the collateral,
* interest continues to accrue at each slice's APR,
* liquidation on health factor works exactly as it did before maturity.

If the window ends and the debt has not been repaid in full, the loan moves to **Defaulted**. From that point its collateral can be auctioned whatever the health factor says. See [Health factor and the collateral auction](/protocol/health-and-liquidation.md).

## Rolling into a new term

Ahead of maturity, the borrower, or a keeper acting on the borrower's behalf, calls `openRefinance(loanId)`. This starts an auction in which the offered rate climbs:

* It opens at the loan's current blended APR.
* It rises linearly toward a cap over a fixed period. The cap is the current rate plus 400 basis points and the period is four hours; both are PolicyController parameters.
* Any eligible lender can take the rate on offer at that moment, for part or all of the principal, by submitting a signed offer that satisfies it.
* Each acceptance is recorded in the auction contract at the rate in force when it arrived, so lenders who accept at different times hold different rates.
* When acceptances add up to the coverage target, meaning outstanding debt plus the refinance fee, the auction passes the USDG to LoanDesk. LoanDesk settles the old slices in full (principal plus accrued interest, net of the interest share), burns the outgoing slice tokens and mints new ones. Collateral remains in escrow throughout.
* The new loan has the same term length as the old one, restarted from the clearing block, and a principal equal to the old debt plus the refinance fee. Neither the accrued interest nor the fee leaves the borrower's wallet; both are folded into the new principal.
* Clearing reverts if the resulting loan would have a health factor below 1.0.

If the auction reaches the end of its period without full coverage, anyone may call `fail`. Acceptors are refunded their USDG, the loan is set to **Defaulted**, and the collateral becomes auctionable. An auction that has not yet received an acceptance can be cancelled by the borrower.

```mermaid
sequenceDiagram
  participant Bo as Borrower
  participant LD as LoanDesk
  participant RA as RolloverAuction
  participant Out as Outgoing lenders
  participant In as Incoming lenders

  Bo->>RA: openRefinance(loanId)
  Note over RA: rate rises from the blended APR toward the cap
  In->>RA: accept(rate, amount, sig)
  RA->>LD: pull USDG from incoming lenders
  LD-->>Out: principal + interest paid, slice tokens burned
  LD-->>In: new slice tokens, fresh term
  Note over LD: collateral stays in escrow throughout
```

### Nothing to price but a rate

The auction's only task is to find a rate at which someone is willing to hold the existing collateral position. With sound collateral that rate exists and is found quickly. If no lender will take the position at any rate up to the cap, the market has given its answer, and the loan goes on to liquidation. No price feed, keeper judgement or governance vote plays any part in the outcome.

### Who may accept

A lender already in the loan can accept their own rollover, and when they are happy with the position that is what usually happens. Lenders can also delegate acceptance to keepers up to a rate ceiling of their choosing, so nobody needs to be awake for every maturity.

## What it costs

The refinance fee is 0.10% of principal, paid by the borrower. See [Protocol fees](/protocol/fees.md).

## Worked example

A 20,000 USDG loan at a blended 8.825% is three days from maturity. The borrower opens a rollover auction with a cap at the current rate plus 400 bps and a four-hour period. Forty minutes in, the rate has reached 9.4%. Two of the current lenders and one new lender accept the full 20,000 between them. The outgoing slices receive 27 days of interest, three new slice tokens are minted with a fresh 30-day term at 9.4%, and the borrower pays a refinance fee of 20 USDG. The 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.usefarlight.com/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.
