> ## Documentation Index
> Fetch the complete documentation index at: https://docs.derive.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Fees

> How management and performance fees accrue, the high-water mark and benchmark assets, and the protocol fee share.

You set two fee rates when you [create the vault](/vaults/create-a-vault) —
`managementFeeBps` and `performanceFeeBps`. This page covers how they are actually
charged.

## How fees are paid

Fees are **dilutive share mints**: when a fee settles, the protocol mints new vault
shares to you, the curator, diluting every other holder proportionally. Assets never
leave the vault — your fee is a growing claim on it.

There is no separate fee-collection call. Fees settle **atomically inside every
deposit and withdrawal settlement** — each `mintShares`, `burnShares`, and `forceBurn`
first brings fees up to date, then applies the deposit or withdrawal math on the
post-fee share price.

<Warning>
  Both fee rates are **immutable** after creation. There is no method to change them — winding down and creating a new
  vault is the only way to reprice.
</Warning>

## Management fee

`managementFeeBps` is an annualised rate on NAV, accrued pro-rata over the time elapsed
since the last fee settlement, regardless of performance. A 100 bps vault that settles
a deposit 73 days after its last settlement mints you shares worth ≈ `1% × 73/365` of
NAV.

<Note>
  As a safety valve, a single settlement mints at most **2.5% of NAV** in management fees, however long the gap since
  the last one. If your vault can go months without a deposit or withdrawal, settle something periodically or the excess
  accrual is forfeited.
</Note>

## Performance fee

`performanceFeeBps` is charged only on gains **above the high-water mark** — the
highest share price the vault has already paid fees at. Each fee mint ratchets the HWM
up to the new post-fee share price; it never moves down. You are never paid twice for
recovering the same drawdown.

The vault row exposes the current mark as `global_hwm`.

## Benchmark assets

By default the HWM is denominated in USD. Setting `benchmarkAsset` at creation
denominates it in a spot asset instead, so the performance fee charges only on
**outperformance versus that asset** — e.g. an ETH vault that charges fees on beating
ETH, not on an ETH rally. Omit it for the feed-less USD default.

## Protocol fee share

A deployment-set `protocol_fee_share_bps` slice of **every** fee mint is diverted to
the protocol fee recipient instead of you. The total shares minted are unchanged — the
split only decides how they are divided between you and the protocol. The vault row
exposes the rate.

## Withdrawing fees

Fees arrive as vault shares, so realising them is just a withdrawal: from your own
wallet, request a withdrawal for the shares you want to redeem
(`shareholder.requestWithdraw`), then settle your own burn in the
[settle loop](/vaults/deposits-withdrawals#the-settle-loop) like any other request.

The one constraint is the **curator stake floor**. To keep your incentives aligned
with your shareholders', you must hold the **greater** of:

* **\$10,000**, or
* **1% of the vault's value**

in the vault at all times. A withdrawal that would leave your stake below the floor is
rejected (`vault_curator_stake_below_min`, 18013). Everything above it — accrued fees
included — is yours to withdraw whenever you like.

<Note>
  The floor applies for as long as the vault is open. It lifts only on the vault's final closing burn — see
  [Winddowns](/vaults/winddowns) for taking out your full stake.
</Note>

## Observe fees in practice

Fee settlements are public — every mint shows up in the vault's action history with
the shares minted and the new high-water mark:

<CodeGroup>
  ```typescript TypeScript (SDK) theme={null}
  const history = await client.vaults.getActionHistory(vaultId, { pageSize: 20 });
  console.log(history); // deposits, withdrawals, and fee events with the curator/protocol share split

  // Track share price vs the HWM over time ('1h' | '8h' | '24h' | '1wk'):
  const perf = await client.vaults.getPerformanceHistory(vaultId, '24h');
  ```

  ```python Python (SDK) theme={null}
  import asyncio

  from derive_py import WebSocketClient
  from derive_py.data_types.generated_models import PerformanceResolution


  async def main():
      client = WebSocketClient.from_env()
      await client.connect()

      history = await client.vaults.action_history(vault_subaccount_id=vault_id, page_size=20)
      print(history)  # deposits, withdrawals, and fee events with the curator/protocol share split

      # Track share price vs the HWM over time (1h | 8h | 24h | 1wk):
      perf = await client.vaults.performance_history(
          vault_subaccount_id=vault_id,
          resolution=PerformanceResolution.field_24h,
      )
      print(perf)

      await client.disconnect()


  asyncio.run(main())
  ```

  ```rust Rust (SDK) theme={null}
  use derive_rs::{
      Environment, WsClient,
      models::{GetVaultActionHistoryRequest, GetVaultPerformanceHistoryRequest},
  };

  #[tokio::main]
  async fn main() -> Result<(), Box<dyn std::error::Error>> {
      let client = WsClient::new_public(Environment::Mainnet).await?;
      let vault_id = 5678;

      // Deposits, withdrawals, and fee events with the curator/protocol split.
      let history = client
          .rpc()
          .vault_shareholders()
          .get_vault_action_history(
              GetVaultActionHistoryRequest::builder()
                  .subaccount_id(vault_id)
                  .page_size(20)
                  .try_into()?,
          )
          .await?;
      println!("{history:?}");

      // Track share price vs the HWM over time ("1h" | "8h" | "24h" | "1wk"):
      let perf = client
          .rpc()
          .vault_shareholders()
          .get_vault_performance_history(
              GetVaultPerformanceHistoryRequest::builder()
                  .subaccount_id(vault_id)
                  .resolution("24h")
                  .try_into()?,
          )
          .await?;
      println!("{perf:?}");
      Ok(())
  }
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.derive.xyz/v3/public/get_vault_action_history \
    -H "Content-Type: application/json" \
    -d '{ "subaccount_id": 42, "page_size": 20 }'

  curl -X POST https://api.derive.xyz/v3/public/get_vault_performance_history \
    -H "Content-Type: application/json" \
    -d '{ "subaccount_id": 42, "resolution": "24h" }'
  ```
</CodeGroup>

`public/get_vault` also folds pending fees into its live pricing:
`simulated_share_price_usd` is the price a depositor would actually face **with your
fees settled**, which is why it is the quote anchor for the
[settle loop](/vaults/deposits-withdrawals#the-settle-loop).

<CardGroup cols={2}>
  <Card title="Create a Vault" icon="vault" href="/vaults/create-a-vault">
    Where the fee rates, benchmark, and the rest of the economics are set.
  </Card>

  <Card title="Process Deposits & Withdrawals" icon="rotate" href="/vaults/deposits-withdrawals">
    The settlements your fees piggyback on.
  </Card>
</CardGroup>


## Related topics

- [Spot feed](/api-reference/channels/spotfeed.md)
- [public/get_latest_signed_feeds](/api-reference/market-data/publicget_latest_signed_feeds.md)
- [private/get_account](/api-reference/account/privateget_account.md)
