Skip to main content
This page covers the smart contract implementation details. See Glossary.
The FeeManager is an optional contract that you can attach to a Multi-Vehicle or Conduit at deployment time. It automates fee calculation and collection across the vehicle lifecycle. Once set during initialization, the FeeManager cannot be changed or removed, ensuring predictability for users. You can share a single FeeManager across multiple Multi-Vehicle contracts to maintain consistent fee behavior and centralize configuration changes.

The 4 fee types

Railnet supports four distinct fee types, each calculated and applied at different points in the vehicle lifecycle.

Performance fee (on earnings)

A fee charged on gains above the high water mark. You only collect when the strategy makes money.
Best for: Hedge fund-style fee models, performance-aligned compensation. Users only pay when the strategy profits.
If the strategy loses value, no performance fees are collected until the share price recovers past the previous high water mark.

Management fee (time-based)

An annualized fee prorated by time elapsed since the last operation. Charged regardless of performance.
Best for: Covering ongoing operational costs (gas, infrastructure, monitoring). Provides a predictable revenue stream.
Management fees accrue continuously based on block.timestamp. The first operation after a long idle period may mint substantial shares.

Deposit fee (entry fee)

A fee charged when users deposit assets. Deducted from shares received during the unlock phase.
Best for: Discouraging short-term “hot money” deposits, one-time onboarding costs, aligning incentives for long-term holders.

Redeem fee (exit fee)

A fee charged when users redeem shares. Deducted from assets received during the unlock phase.
Best for: Discouraging short-term withdrawals, compensating for liquidity management costs, protecting remaining holders from withdrawal impact.

When fees are applied

Fee recipients and distribution

Fees can be distributed to multiple recipients with configured percentage splits:

Example configurations

Aligned with user returns. You only charge on gains.

Configuration

Prerequisites

You need the following roles on your External Access Control, scoped to the Fee Manager contract:

Set fee percentages

Configure the four fee rates. Values must not exceed the maximum limits set during Fee Manager deployment.
Fee values must not exceed the maxFees ceiling defined at deployment. Attempting to set fees above the maximum will cause the transaction to revert. You can query the current maximums with feeManager.maxFees().

Fee calculation formulas

The management fee is annualized and prorated by time elapsed:
Where timeDelta is the seconds elapsed since the last update and 31536000 is the number of seconds in a year (365 days).
The performance fee is applied to earnings above the high water mark:
The high water mark (lastTotalAssets) is updated after each fee collection, so you only pay performance fees on new gains.
Transactional fees are deducted from the gross amount:
For reverse calculations (determining gross amount from a desired net amount):

Configure fee recipients

Fee recipients define how collected fees are split among addresses. The sum of all recipient shares must equal 10,000 bps (100%).
Updating recipients causes old recipients to lose access to any uncollected fees. Always call dispatchERC20 to distribute pending fees before changing recipients.

Collect accumulated fees

Performance and management fees accumulate as vehicle shares held by the Fee Manager. To convert these shares into underlying assets, trigger a redemption.
1

Monitor accumulated fees

Check the FeeManager’s share balance in the vehicle to see how much has been collected.
2

Redeem vehicle shares

The Fee Manager holds vehicle shares from accumulated performance and management fees. Redeem them to convert shares into the underlying asset.Requires: FEE_MANAGER_REDEEM_VEHICLE_SHARES role.
3

Distribute to recipients

Once redeemed, dispatch base assets to configured recipients.Requires: FEE_MANAGER_DISPATCH_ERC20 role.

View current configuration

Query the Fee Manager’s current state at any time.

Preview fee impact

Use the view functions to simulate fee calculations without executing transactions.

Immutability and guardrails

Cannot change after deployment:
  • The FeeManager address (set during Multi-Vehicle construction)
  • The maxFees ceiling (set during FeeManager deployment)
Plan carefully: Choose maxFees conservatively. You can always charge less than the maximum, but you can never increase fees beyond it. For example, set maxFees.performanceFeeBps = 3000 (30%) even if you start at 2000 (20%) to allow future flexibility.