# Protocol fees

Diffuse Prime protocol fees consist of **spread fee** and fees for **liquidation** and **early withdrawal**. All fees are specific to a yield strategy and defined by the vault curators. While setting fees per strategy requires more boilerplate work, it gives curators greater flexibility. In future versions, this may be simplified.

Lenders receive fixed returns when a position is created, so borrowers effectively cover all protocol fees.

## Spread fee

The spread fee is applied by slightly increasing the borrow interest rate and routing the difference to the protocol.

## Liquidation penalty fee

When a position is liquidated, a penalty fee is applied. This helps reward the liquidator and offset potential losses from price fluctuations or gas costs.

In the current early phase, only Diffuse-managed liquidators are active, so this fee is routed back to the protocol.

In volatile conditions, liquidation-related costs (e.g. gas) may exceed the penalty. Vault curators are responsible for tuning this parameter to ensure liquidations remain worthwhile.

## Early exit fee

Early withdrawals work against the interests of both lenders and the protocol. To discourage them, a small optional fee may be applied.


---

# Agent Instructions: 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://diffusefi.gitbook.io/docs/diffuse-prime/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.
