> For the complete documentation index, see [llms.txt](https://docs.trilobyte.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilobyte.finance/user-guides/for-borrowers.md).

# For Borrowers

This guide explains how businesses interact with Trilobyte to obtain and repay loans.

## Getting a Loan

### 1. Find a Pool Manager

Borrowers work with an approved **Pool Manager** who will:

* Evaluate your business and cash flows
* Perform due diligence and risk assessment
* Structure the loan terms (principal, rate, term, leverage ratio, and any reporting cadence)
* Create the vault on your behalf

{% hint style="info" %}
Loan terms are negotiated **off-chain** between you and the Pool Manager. The agreed terms are then encoded into a Vault smart contract. The manager can never be the borrower on their own vault — this is enforced on-chain.
{% endhint %}

### 2. Wait for Funding

Once the vault is created, it enters the **RaisingFunds** phase. Junior investors (alongside the manager's own collateral) fund first, then senior investors fund the rest once the manager locks the junior tranche. You don't need to do anything during this phase.

### 3. Receive Disbursement

When the vault is fully funded, the Pool Manager approves and disburses the loan (verifying any collateral pledge you've made, if your loan is collateral-backed). The full principal amount is transferred directly to your wallet address.

## Making Repayments

Once your loan is active, you make periodic repayments:

* Payments are due on the schedule set at disbursement
* The payment amount is the calculated **installment** — a fixed amount covering principal and interest across both tranches
* Anyone can submit a payment on your behalf via `receive_payment(payer, amount)`

### What happens to each payment — the six-bucket waterfall

Your payment isn't split by a fixed ratio between you and investors. Instead, it fills six buckets **in strict order**, and nothing reaches you until everything ahead of it is paid in full:

1. **Reserve fee** → protocol treasury
2. **Senior interest**
3. **Senior principal**
4. **Junior interest**
5. **Junior principal**
6. **Residual** → your cash pool — only what's left after buckets 1–5

If you pay less than the full installment, the app shows you exactly which buckets were filled and how much is carried forward as **arrears** — which must be cleared, in the same order, before any new payment counts toward the next period.

{% hint style="info" %}
There's no "gross-up" to calculate anymore. Pay whatever amount you send — the vault does the bucket math for you and tells you what's still owed.
{% endhint %}

### Staying on schedule

* Make payments **before the due date** to avoid late fees
* If you miss a payment, the Pool Manager can apply a governed late-fee penalty (default 18% p.a.)
* After the **grace period** (default 30 days), anyone can trigger **default**
* While you have any missed payment outstanding, you **cannot withdraw from your cash pool** — see below

{% hint style="danger" %}
Default has serious consequences — the Pool Manager's collateral (and any collateral you've pledged) is used to recover investor losses, senior tranche first, and the vault enters a terminal state. Always communicate with your Pool Manager if you're having difficulty making payments.
{% endhint %}

## Withdrawing from the Cash Pool

During the **Active** and **FullyRepaid** phases, you can withdraw your residual from the cash pool:

* Call `withdraw_cash(amount)` to withdraw available funds
* The cash pool balance is whatever's left over after debt service (bucket 6 of the waterfall)
* **You must be current on payments to withdraw** — if you have any missed payment, `withdraw_cash` is blocked until you catch up (`BorrowerNotCurrent`)
* Once fully repaid, the current-on-payments requirement no longer applies

## Renegotiation

If your circumstances change and you need adjusted terms, work with your Pool Manager:

* The manager can propose **new interest rate and/or loan term** — bounded by the protocol's global rate limits and how far a single round can cut your current rate
* **Approving now requires your sign-off too** — the manager alone can no longer bind you to new terms; both of you must authorize `approve_renegotiation`
* If approved, the installment is recalculated on the **remaining outstanding principal** across both tranches
* This is only possible while your loan is **Active** — once a loan has defaulted, it's terminal and cannot be renegotiated

## Loan Completion

When both tranches are fully repaid:

1. The vault transitions to **FullyRepaid**
2. You can withdraw any remaining funds from your cash pool
3. Once every investor has claimed their yield, the vault moves to **Finalized** (terminal state)

## Key Functions

| Function                                                | Description                                                    |
| ------------------------------------------------------- | -------------------------------------------------------------- |
| `receive_payment(payer, amount)`                        | Make a loan repayment, allocated through the waterfall         |
| `withdraw_cash(amount)`                                 | Withdraw from the cash pool (blocked while behind on payments) |
| `record_collateral_pledge(pledge_id)`                   | Link a collateral pledge you've locked in escrow to this vault |
| `get_config()`                                          | View vault terms and current phase                             |
| `get_outstanding()`                                     | Check remaining principal across both tranches                 |
| `get_outstanding_senior()` / `get_outstanding_junior()` | Check remaining principal per tranche                          |
| `get_arrears()`                                         | View any carried shortfall, per bucket                         |
| `get_next_due()`                                        | See next payment due date                                      |
| `get_emi()`                                             | View the shared installment amount                             |
| `get_cash_pool()`                                       | Check available cash pool balance                              |
| `get_covenant_status()`                                 | Check whether you're current on payments and reporting         |
| `get_payments_made()`                                   | See how many periods have been fully paid                      |

*As of September 2026.*
