> 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/bulletloans.md).

# BulletLoans

{% hint style="warning" %}
`BulletLoans` is in the process of being sunset.&#x20;

New Brila Capital Markets portfolios deployed after June 2022 use [`FixedInterestOnlyLoan`](/brila-protocol/other-concepts/instruments/fixedinterestonlyloan.md)
{% endhint %}

`​​​BulletLoans` is an ERC-721 contract. Each of the tokens represents a single loan.

{% embed url="<https://github.com/trusttoken/contracts-ragnarok/blob/main/contracts/ragnarok/BulletLoans.sol>" %}

All loan parameters can be read from LoanMetadata struct. `BulletLoans` contract enables loan creation, facilitates loan repayment and allows managing the loan's state and parameters.

### Methods

#### `createLoan( IERC20 _underlyingToken, uint256 _principal, uint256 _totalDebt, uint256 _duration, address _recipient )`

Manager can create loan by passing the principal to be lent, the total debt to repaid, duration of the loan, and the address of the recipient. Total debt to be repaid cannot be less than principal amount. ​&#x20;

#### `repay(uint256 instrumentId, uint256 amount)`&#x20;

Existing loan can be repaid partially or in full. If loan is paid in full, this function will mark the loan’s status to ‘Fully Repaid’. Note that a loan cannot be overpaid.

#### `markLoanAsDefaulted(uint256 instrumentId)`&#x20;

Only the portfolio’s manager can mark a loan as defaulted. ​&#x20;

#### `markLoanAsResolved(uint256 instrumentId)`&#x20;

​Only the portfolio’s manager can mark a loan as resolved. Intended to be used for situations after partial repayment where a loan workout has been agreed to.

#### `updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate )`

Manager can modify loan terms, changing maturity date or total debt to be repaid.

#### `updateLoanParameters( uint256 instrumentId, uint256 newTotalDebt, uint256 newRepaymentDate, bytes memory borrowerSignature )`

Manager can modify loan terms, changing maturity date or total debt to be repaid. In order to change the maturity date to an earlier date or increase the repayment value, the borrower must consent and provide a signature.

### View methods&#x20;

#### `principal(uint256 instrumentId)`

Returns principal amount of loan.

#### `underlyingToken(uint256 instrumentId)`

Returns underlying token (e.g. USDC, USDT) of the loan.

#### `recipient(uint256 instrumentId)`

Returns borrower’s address.

#### `endDate(uint256 instrumentId)`

Returns maturity date of the loan.

#### `unpaidDebt(uint256 instrumentId)`

Returns remaining amount to be paid, i.e. total debt less repaid amount.

#### `getStatus(uint256 instrumentId)`

Returns status of loan (`Issued`, `FullyRepaid`, `Defaulted`, `Resolved`).


---

# 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/bulletloans.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.
