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

# Fees

Set up your fee system

Lagoon vaults support four types of fees: <mark style="color:$primary;">**management**</mark>, <mark style="color:$primary;">**performance**</mark>, <mark style="color:$primary;">**entry/exit**</mark> and <mark style="color:$primary;">**protocol**</mark>. All fee parameters are encoded directly in the vault's smart contract, visible to any investor before deposit. Fees are collected at each settlement and distributed as shares to the designated feeReceiver address.

| Fee type       | Charged on                              | When collected     |
| -------------- | --------------------------------------- | ------------------ |
| Management     | Total AUM                               | At each settlement |
| Performance    | New profits above high-water mark       | At each settlement |
| Entry and Exit | New deposit and withdrawal requests     | At each settlement |
| Haircut        | Instant redemptions, after the exit fee | At redemption      |
| Protocol       | Vault fees collected                    | At each settlement |

## **Management Fees**

A periodic charge on the total assets under management. It accumulates continuously over time and is collected at each settlement, based on the vault's current valuation.

$$
\text{managementFee} = \left( \frac{\text{assets} \times \text{rate}}{\text{BPS}} \right) \times \frac{\text{timeElapsed}}{\text{1 year}}
$$

* **assets** is the total assets being managed.
* **rate** is the fee rate for 1 year in BPS.
* **BPS** is a constant representing "Basis Points", 10 000 for percentage conversions (e.g., 1% = 100 BPS).
* **timeElapsed** is the time period for which the fee is calculated.

{% hint style="info" %}
The management fee grows **linearly over time.** The longer the period between settlements, the more fees accumulated. The fee is proportional to the vault's AUM and the annual rate.
{% endhint %}

## **Performance Fees**

Applied exclusively to new profits, calculated against the **high-water mark,** the highest price per share the vault has ever reached. This ensures managers are only rewarded for genuine new gains, never for recovering previous losses.

$$
\begin{align\*}
\text{If } \text{pricePerShare} > \text{highWaterMark}: \\
\text{profit} &= (\text{pricePerShare} - \text{highWaterMark}) \times \text{totalSupply} \\\[1em]
\text{performanceFee} &= \frac{\text{profit} \times \text{rate}}{\text{BPS}}
\end{align\*}
$$

* **pricePerShare** is the current price per share.
* **highWaterMark** is the highest price per share reached.
* **totalSupply** is the total number of shares.
* **rate** is the performance fee rate (in basis points).
* **BPS** is a constant representing basis points (10 000).

{% hint style="info" %}
The performance fee is directly tied to profits and managers are rewarded only for returns exceeding the high-water mark.
{% endhint %}

## **Entry and Exit Fees**

Flat-percentage fees applied on every deposit and every redemption. Entry fees are deducted from the shares minted to the depositor; exit fees are deducted from the shares used to compute the assets returned to the redeemer. Both are taken in **shares** and sent to the `feeReceiver` at settlement, with the protocol cut split off as for any other fee.

$$
\text{entryFeeShares} = \frac{\text{grossShares} \times \text{entryRate}}{\text{BPS}}
$$

$$
\text{exitFeeShares} = \frac{\text{shares} \times \text{exitRate}}{\text{BPS}}
$$

* **grossShares** is the shares amount before deducting the entry fee.
* **shares** is the amount of shares being redeemed.
* **entryRate / exitRate** are the fee rates in BPS.
* **BPS** is a constant representing basis points (10 000).

Both fees apply to **both async and sync flows** (`requestDeposit` / `syncDeposit` for entry, `requestRedeem` / `syncRedeem` for exit). For async flows the rate in effect at the moment of **settlement** is what applies — not the rate at the time the request was submitted — and that rate is frozen on-chain in the settlement data, so users can verify after the fact exactly what fee they paid.

{% hint style="info" %}
After vault initialization, `entryRate` and `exitRate` **can only be lowered, never raised**. Combined with the 2% hard cap, this means the maximum fee a user can ever pay on entry or exit is fixed when they first interact with the vault.
{% endhint %}

## Haircut (Instant Exit Fee)

An additional fee charged **only on instant redemptions** (`syncRedeem`), on top of the base exit fee. Where the exit fee remunerates the vault operator, the haircut compensates the holders who stay for serving an immediate exit priced off a valuation that is not refreshed at that instant.

### When it applies

`syncRedeem` — and therefore the haircut — is only reachable when **all** of the following hold:

| Condition                                                                                                                                   | Controlled by                            | If not met                         |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------- |
| `syncMode` is `SyncRedeem` or `Both`                                                                                                        | Curator, via `setSyncMode`               | Async redemption remains available |
| The valuation is still valid: less than `totalAssetsLifespan` seconds have elapsed since the last valuation update (`isTotalAssetsValid()`) | Curator, via `updateTotalAssetsLifespan` | Async redemption remains available |
| The vault is `Open` (not `Closing` or `Closed`) and not paused                                                                              | Vault admin / Security Council           | Both flows blocked                 |
| Caller and receiver pass the access check                                                                                                   | Access Manager                           | Both flows blocked                 |

Only the first two conditions are specific to instant exits: when `syncMode` excludes sync redeems or the valuation has expired, `syncRedeem` reverts and the user redeems through the asynchronous flow (`requestRedeem`), **which never charges a haircut** — only the exit fee. The last two gate `requestRedeem` just the same, so they leave no fallback. Integrators can probe availability with `previewSyncRedeem(shares)`, which returns 0 when instant redemption is unavailable.

### How it is computed

The haircut is applied **after** the base exit fee, on the shares remaining once that fee has been deducted — not on the original redeemed amount.

$$
\begin{align\*}
\text{exitFeeShares} &= \frac{\text{shares} \times \text{exitRate}}{\text{BPS}} \\\[1em]
\text{haircutShares} &= \frac{(\text{shares} - \text{exitFeeShares}) \times \text{haircutRate}}{\text{BPS}} \\\[1em]
\text{assets} &= \text{convertToAssets}(\text{shares} - \text{exitFeeShares} - \text{haircutShares})
\end{align\*}
$$

Because the two are applied in sequence rather than summed, the combined charge is slightly below their addition: 2% exit and 20% haircut cost 21.6% in total, not 22%.

Redeeming 1 000 shares with `exitRate` = 100 BPS (1%) and `haircutRate` = 500 BPS (5%):

* **exitFeeShares** = 1 000 x 1% = 10 shares, minted to the `feeReceiver` (with the protocol cut split off).
* **haircutShares** = (1 000 - 10) x 5% = 49.5 shares, burned.
* The redeemer receives the asset value of the remaining 940.5 shares.

### Where it goes

Unlike every other fee, the haircut is **not paid to the `feeReceiver`** and carries **no protocol cut**. The shares are burned while the matching assets stay in the vault, so the value accrues to the remaining holders. Each instant redemption emits a `HaircutTaken` event with the shares taken and the rate applied.

{% hint style="info" %}
The redemption itself leaves the price per share **unchanged**: the vault deducts the full pre-haircut asset value from `totalAssets`, as if the haircut had never been taken. The retained value therefore only becomes visible — as a higher price per share for remaining holders — at the **next `totalAssets` update**, when the valuation is refreshed and requests are settled.
{% endhint %}

{% hint style="warning" %}
Unlike `entryRate` and `exitRate`, which can only be lowered after initialization, `haircutRate` can be raised or lowered at any time within its 20% cap. Read the current rate — or call `previewSyncRedeem` — before an instant redemption.
{% endhint %}

## Protocol fees

Lagoon earns a percentage of the fees collected by the vault. For example, if the vault computes 200 shares for performance and management fees, and the protocol fee rate is 10%, Lagoon receives 10% of the 200 shares, equating to 20 shares.

## Maximum Fee Limits

Protocol-enforced caps protect depositors from excessive fees. These limits are hardcoded in the smart contract and cannot be overridden by vault operators.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><h4><mark style="color:$primary;"><strong>Management Fee Cap</strong></mark></h4></td><td><h4><strong>10%</strong></h4></td><td><sup>per year, maximum configurable by curator</sup></td></tr><tr><td><h4><mark style="color:$primary;"><strong>Performace Fee Cap</strong></mark></h4></td><td><h4><strong>50%</strong></h4></td><td><sup>on profits above high-water mark</sup></td></tr><tr><td><h4><mark style="color:$primary;"><strong>Entry and Exit Fee Cap</strong></mark></h4></td><td><h4><strong>2%</strong></h4></td><td><sup>on new deposit and withdrawal requests. Rates can only decrease, never increase.</sup></td></tr><tr><td><h4><mark style="color:$primary;"><strong>Haircut Fee Cap</strong></mark></h4></td><td><h4><strong>20%</strong></h4></td><td><sup>on instant redemptions, applied after the exit fee</sup></td></tr><tr><td><h4><mark style="color:$primary;"><strong>Protocol</strong></mark></h4></td><td><h4>10%</h4></td><td><sup><strong>fix protocol fee.</strong> On-chain limitation set to 30%</sup></td></tr></tbody></table>

## **Fee Distribution**

At every settlement, the vault mints new shares to represent the fees owed. These shares are sent directly to the `feeReceiver` address configured at vault creation.

{% hint style="info" %}
Fees are distributed as **shares, not assets**. This means the fee receiver participates in the vault's performance from the moment fees are collected, without triggering any asset movement.
{% endhint %}
