> For the complete documentation index, see [llms.txt](https://docs.brila.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brila.finance/brila-protocol/other-concepts/instruments/fixedinterestonlyloan.md).

# FixedInterestOnlyLoan

`FixedInterestOnlyLoans` is an ERC-721 contract. Each minted NFT represents a loan that must be paid back to the NFT owner.&#x20;

{% embed url="<https://github.com/trusttoken/contracts-helium>" %}

### Loan Parameters

Each loan is parametrized by:&#x20;

* Underlying token with which funds are lent out and repaid (e.g. USDC)&#x20;
* Principal debt (minting price)&#x20;
* Period payment (interest paid at each installment)&#x20;
* Period length (a period when the borrower pays installments)&#x20;
* Period count (total number of installments)&#x20;
* End date (date of the last installment to be paid together with the principal, set when the loan is started)&#x20;
* Recipient’s address&#x20;
* Grace period (time by which borrower can be late in repayment of each installment)&#x20;
* A canBeRepaidAfterDefault flag that allows a loan to be repaid after a loan was marked as defaulted&#x20;

### Loan states & state transitions

A loan can have one of the possible statuses: `Created`, `Accepted`, `Started`, `Repaid`, `Canceled`, or `Defaulted`.&#x20;

Upon minting the loan status is set to `Created`. In this state, a borrower can accept a loan by calling `acceptLoan(id)` and the loan status is changed to `Accepted`.&#x20;

The NFT owner can call `start(id)` on loans whose status is `Accepted`. When a loan is started the loan end date is calculated for the loan and the loan status is changed to `Started`.&#x20;

The NFT owner can mark loans as canceled whose status is `Created` or `Accepted`.&#x20;

The NFT owner can mark loans as `Defaulted` whose status is `Started` and the current block time is after a current period `endDate + grace`P`eriod` time.

The NFT owner can update the loan's `gracePeriod` at any time by calling `updateInstrument(id)`. The NFT owner must call `repay(id, amount)` to recalculate repaid periods and the current period end date.&#x20;

The repaid amount must be equal to the period payment or period payment + principal for the last installment. The loan can be repaid after it was marked as defaulted only if the proper `canBeRepaidAfterDefault` flag was set to true.


---

# 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.brila.finance/brila-protocol/other-concepts/instruments/fixedinterestonlyloan.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.
