# Protocol Fees

Each vault collects **exit**, **management** and **performance** fees. Exit fees are kept in the vault at redemption. A portion of the management and performance fees is returned to the vault **strategist/beneficiary** in the form of shares (freshly minted). The remainder goes to the DAO represented by the holders and stakers.

Only the **harvester** can collect performance or management fees, it’s a role given by the vault owner. At creation of the vault, the strategist and a global DAO harvester address are granted this role.

### Exit Fees

{% hint style="info" %}
Exit fees are applied to the **redemption** of shares and serve to prevent repeated entries/exits.
{% endhint %}

The variables defining exit fees are specific to each vault and are represented in basis points by exitFees in the FeesProps structure.They can only be changed by the owner, who will always be the DAO of the project, but they are chosen by the strategist at creation.

There is a **minimum** for management and performance fees to be claimed which is given in USD terms in *SecurityProps.minHarvestThreshold*

### Management Fees

Management fees are defined by the variable *managementFeesRate* which indicates the **8-hours** management fees rate (not in basis point, but on 1,000,000). The total value of the vault, multiplied by the number of rounds (8 hours) since the last claim and by the managementFeesRate gives the total management fee. Then this amount is paid under the form of shares to the strategist and to the fee receiver given by the *FeesManager* contract.

The formula to compute the shares to mint for management fees is the following one:

$$
rounds = \frac{block.timestamp - previousManagementFeesHarvestTimestamp}{8 \* 60 \* 60}
$$

$$
toMint = \frac{rounds \* shareTotalSupply \* managementFeesRate}{10^6}
$$

{% hint style="info" %}
The harvesting of management fees leads to a **dilution** of the share price, naturally to the detriment of investors, who indirectly pay fees.
{% endhint %}

### Performance Fees

Performance fees work in a similar way to management fees. A percentage in basis points is given by the variable *performanceFeesRate*. At the time of the claim, the fund share price is compared to the **all time high**, which is given by the variable *highWaterMark*. The formula to compute the share to mint to pay for performance fees is the following one.

$$
perf = sharePrice - hmw
$$

$$
totalPerf = \frac{perf \* shareTotalSupply}{10^8}
$$

$$
feesOnPerf = \frac{totalPerf \* performanceFeesRate}{10^4}
$$

$$
feesToMintInShare = \frac{feesOnPerf\*10^8}{sharePrice}
$$

The ratio given by *performanceFeesToTrader* is sent to the strategist and the rest to the address indicated by the variable feesReceiver in the *FeesManager* contract. If the *highWaterMark* is higher than the share price, then the performance fees are paid and the *highWaterMark* is set to the new share price for future harvests.

Given this implementation, there is an incentive to enter the vault when it has a *highWaterMark* above *sharePrice*. The investor gets a ”free ride” by not paying a performance fee when the fund increases.

{% hint style="info" %}
The harvesting of performance fees leads to a **dilution** of the share price, naturally to the detriment of investors, who indirectly pay fees.
{% endhint %}


---

# 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://docs.shprd.finance/understand-shprd/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.
