> For the complete documentation index, see [llms.txt](https://docs-personal.isle.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-personal.isle.finance/how-isle-personal-works/fees.md).

# Fees

{% hint style="info" %}
Isle Personal has two distinct fee mechanisms: a **Protocol Fee** on interest accrual, and a **Payment Service Fee** on borrowing through the payment service.
{% endhint %}

### Protocol Fee

The protocol fee is a percentage of interest collected, taken before distributing yields to lenders.

#### How It Works

When interest accrues on accumulated debt:

1. Interest is calculated based on the IRM (Interest Rate Model)
2. Protocol fee is deducted from the interest
3. Remaining interest goes to lenders (increases their share value)
4. Protocol fee is minted as **supply shares** and credited to the fee recipient

#### Calculation

$$
\text{Protocol Fee} = \text{Interest Accrued} \times \text{Fee Rate}
$$

Where **Fee Rate** is expressed in basis points (bps). For example, 1000 bps = 10%.

#### Example

If $100 of interest accrues and the fee rate is 10% (1000 bps):

* Protocol fee: $100 × 10% = $10 (minted as shares to fee recipient)
* Lender yield: $100 - $10 = $90

### Payment Service Fee

When a borrower uses the `IsleV2Service` to make a payment (via gasless meta-transaction), an additional fee is charged on the **borrowed amount** at the time of borrowing.

#### How It Works

When `makePayment()` is called:

1. The service borrows the requested amount from the pool on behalf of the borrower
2. A payment fee is deducted from the borrowed amount
3. The payee receives the remainder
4. The fee is split between suppliers and the protocol, then returned to the pool

#### Calculation

$$
\text{Payment Fee} = \text{Borrowed} \times \text{paymentFeeBps}
$$

$$
\text{Protocol Cut} = \text{Payment Fee} \times \text{protocolFeeBps}
$$

$$
\text{Supplier Cut} = \text{Payment Fee} - \text{Protocol Cut}
$$

$$
\text{Payee Receives} = \text{Borrowed} - \text{Payment Fee}
$$

#### Fee Distribution

The payment fee is returned to the pool via `topUpFromService()`:

* **Supplier Cut** → added directly to `totalSupplyAssets`, increasing the value of all existing supply shares proportionally
* **Protocol Cut** → added to `totalSupplyAssets` and minted as new supply shares for the protocol

#### Example

If a borrower borrows $1,000 with `paymentFeeBps` = 100 bps (1%) and `protocolFeeBps` = 2000 bps (20%):

* Payment fee: $1,000 × 1% = $10
* Protocol cut: $10 × 20% = $2
* Supplier cut: $10 - $2 = $8
* Payee receives: $1,000 - $10 = $990

#### Configuration

Payment service fees are managed by the `IsleV2Service` contract, separately from the market:

| Parameter        | Description                         | Configured By           |
| ---------------- | ----------------------------------- | ----------------------- |
| `paymentFeeBps`  | Total fee rate on borrowed amount   | `CONFIG_ROLE` (Service) |
| `protocolFeeBps` | Protocol's share of the payment fee | `CONFIG_ROLE` (Service) |


---

# 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:

```
GET https://docs-personal.isle.finance/how-isle-personal-works/fees.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
