Asset Management

Fee System

Overview

MetaVault implements three types of fees:

  • Management fees (time-based)

  • Performance fees (profit-based)

  • Oracle fees (update rewards)

Management Fees

function _assessManagementFees(
    address managementFeeReceiver,
    uint256 duration
) private

Calculates and distributes management fees based on total assets under management.

Calculation:

managementFees = (totalAssets() * duration * managementFee) 
    / SECS_PER_YEAR 
    / MAX_BPS;

Example:

// 2% annual management fee
// For $1M AUM over 30 days:
// managementFees = ($1M * 30 days * 200) / (365 days * 10000)
// = $1,643.84

Performance Fees

Applied during harvest operations when:

  1. Current price exceeds high watermark

  2. Returns exceed hurdle rate

  3. Profit is realized

Configuration Functions:

function setPerformanceFee(
    uint16 _performanceFee
) external onlyRoles(ADMIN_ROLE)

Example:

// 20% performance fee
// If profit is $100k above hurdle:
// performanceFee = $100,000 * 0.20 = $20,000

Oracle Fees

function _assessOracleFees(
    address oracleFeeReceiver,
    uint256 duration
) private

Rewards oracle updaters for providing price information.

Performance Tracking

harvest

function harvest(
    Harvest[] calldata harvests
) external updateWatermark

Updates vault performance and processes fees.

Process Flow:

  1. Calculate duration since last report

  2. Update share prices

  3. Calculate yields

  4. Process fees

  5. Update watermark

Example:

vault.harvest([
    Harvest({
        chainId: 1,              // Ethereum
        vaultAddress: aaveVault  // Target vault
    }),
    Harvest({
        chainId: 137,            // Polygon
        vaultAddress: curveVault // Target vault
    })
]);

Performance Metrics

sharePrice

function sharePrice() public view returns (uint256)

Returns current price per share.

High Watermark

uint256 public sharePriceWaterMark

Tracks all-time high share price for fee calculations.

Risk Management

Emergency Controls

Emergency Shutdown

function setEmergencyShutdown(
    bool _emergencyShutdown
) external onlyRoles(EMERGENCY_ADMIN_ROLE)

Enables/disables vault operations in emergencies.

Impact:

  • Blocks new deposits

  • Prevents new investments

  • Allows withdrawals

Recovery Address

function setRecoveryAddress(
    address _recoveryAddress
) external onlyRoles(ADMIN_ROLE)

Sets emergency fund recovery destination.

Share Management

Share Locking

function _lockShares(
    address to,
    uint256 sharesBalance,
    uint256 newShares
) private

Implements timelock for share withdrawals.

Calculation:

newLockTime = ((_depositLockCheckPoint[to] * sharesBalance) / newBalance)
    + ((block.timestamp * newShares) / newBalance);

Investment Limits

Maximum Deposits

function maxDeposit(address to) public view returns (uint256)

Calculates maximum allowed deposit amount.

Maximum Withdrawals

function maxWithdraw(address owner) public view returns (uint256)

Determines maximum withdrawal amount.

Oracle Integration

Price Updates

function setOracle(
    uint64 chainId,
    address oracle
) external onlyRoles(ADMIN_ROLE)

Configures price oracle for specific chain.

Update Requirements

  • Maximum staleness: 8 hours

  • Minimum update frequency

  • Required validations

Asset Accounting

Total Assets

function totalAssets() public view override returns (uint256)

Returns total assets under management:

  • Pending cross-chain investments

  • Pending cross-chain divests

  • Available assets

Debt Tracking

function totalDebt() public view returns (uint256)

Tracks allocated assets across all vaults.

Idle Assets

function totalIdle() public view returns (uint256)

Returns unallocated assets in vault.

  • See Core Operations for investment functions

  • See Integration for setup guide

  • See Introduction for quick reference

Last updated