> 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/interest-and-repayment.md).

# Interest and settling a loan

How simple interest accrues on each slice, why there is a three-day minimum, and what happens on full and partial repayment.

A Farlight loan carries a fixed rate from the moment it is originated, and that rate holds its course for the life of the loan. Interest is simple: no compounding, no utilisation curve, no mechanism that can adjust it afterwards. The borrower knows the exact cost on day one.

## Per-second accrual

Each slice earns interest continuously, one second at a time:

```
interest = principal × aprBps / 10_000 × elapsedSeconds / 31_536_000
```

The clock starts at the slice's start timestamp, and `elapsedSeconds` is measured against `block.timestamp`. `block.number` is never used as a clock, because on Arbitrum-stack chains it follows the L1 block rather than local time.

Since every slice has its own APR, every slice accrues on its own. The borrower's total debt at any moment is the sum, over all slices, of principal plus the interest earned to date.

## The three-day floor

Every loan has a minimum interest period of **3 days**. A borrower is free to repay earlier, but pays interest as though the loan had run for the whole minimum. This stops lenders from being drafted in as free intraday liquidity, and it makes standing offers worth keeping open.

## Full repayment

`repay(loanId)` with the whole outstanding balance does five things in one transaction:

1. Pulls principal plus accrued interest from the borrower, in USDG.
2. Pays each slice its principal and the interest it earned, minus the protocol's share of that interest.
3. Burns the slice tokens.
4. Releases all of the collateral back to the borrower.
5. Emits `LoanRepaid`.

Repayment cannot be paused. An emergency pause stops new loans and auctions, but a borrower can always settle and withdraw collateral.

## Partial repayment

`repay(loanId, amount)` with less than the full balance:

1. Settles accrued interest across the slices first, then reduces principal, allocated in proportion to each slice's principal.
2. Leaves the collateral in escrow untouched.
3. Brings the loan's LTV down and its health factor up accordingly.
4. Emits `LoanPartiallyRepaid`.

When a health-factor warning fires, this and adding collateral are the two moves open to the borrower.

## When the sequencer is unavailable

Should the sequencer go down or reject transactions, a borrower can still submit `repay` through Arbitrum's L1 delayed inbox, and the transaction is force-included once the 24-hour delay has passed. Farlight's post-outage liquidation grace period exists to make that route practical rather than nominal. See [Sequencer and chain risk](/risk/sequencer-and-chain.md).

## Worked example: three slices, 30 days

Take a 20,000 USDG loan filled by three slices (5,000 at 8.50%, 10,000 at 8.90%, 5,000 at 9.00%), repaid in full exactly 30 days after origination.

| Slice | Principal | APR   | Interest over 30 days |
| ----- | --------- | ----- | --------------------- |
| 1     | 5,000     | 8.50% | 34.93                 |
| 2     | 10,000    | 8.90% | 73.15                 |
| 3     | 5,000     | 9.00% | 36.99                 |
| Total | 20,000    |       | 145.07                |

The amount due is 20,145.07 USDG. The protocol takes 10% of the interest, 14.51 USDG, and each lender receives their principal plus 90% of the interest their own slice produced. The collateral goes back to the borrower in the same transaction.


---

# 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/interest-and-repayment.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.
