Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Fee Wrapper

What is a Fee Wrapper?

A Fee Wrapper is a Vault V2 configured in a specific, constrained mode that enables distribution channels to add a fee layer on top of an existing Morpho Vault V2.

  1. Main Morpho Vault V2: Handles actual capital allocation to Morpho Markets (V1, V2, future versions). This is where yield is generated.
  2. Fee Wrapper: A lightweight Vault V2 that deposits into the main Morpho Vault V2, with the sole purpose of adding a fee layer per customer/distributor.
Fee Wrapper Architecture

Key Properties

PropertyDescription
ERC-4626 Mostly CompliantMostly compliant, with shares remaining fully ERC-20. See Vault V2 principles
Immutably BoundBound to a single Morpho Vault V2 at deployment. Can not be changed
Fee FlexibilityOwner can configure performance fees (up to 50%) and management fees (up to 5%)
Simplified ConfigurationRisk management functions are abdicated, making operation simpler
Shared LiquidityUsers share the liquidity of the underlying Morpho Vault V2

Architecture

A Fee Wrapper is deployed with a carefully designed split between immutable, defaulted, and configurable parameters.

Fixed at deployment (addAdapter / removeAdapter abdicated):

  • The single adapter pointing to the underlying Morpho Vault V2
  • The adapter registry lock (no new adapters can ever be added)
Set to recommended defaults:
  • Absolute and relative caps set to maximum values
  • Max rate set to maximum
  • Force-deallocate penalty set to 2% (MAX_FORCE_DEALLOCATE_PENALTY)
  • Liquidity adapter set to the single Morpho Vault V2 adapter
  • All roles (Curator, Allocator, Sentinel) default to the owner
Configurable by the owner:
  • Owner address
  • Vault name and symbol
  • Performance fee (up to 50%) and management fee (up to 5%)
  • Fee recipient address
  • Gate abdication mode (abdicateNonCriticalGates)

Gates & Non-Custodiality

Gates control who can interact with the vault. Each gate is a contract slot that, when set, enforces on-chain rules on a specific action. A Fee Wrapper has four gates:

GateAction it governsCritical?
receiveAssetsGateWho can deposit assetsYes - can lock funds
receiveSharesGateWho can receive sharesYes - can lock funds
sendSharesGateWho can send/transfer sharesYes - can lock funds
sendAssetsGateWho can be a withdrawal recipientNo - cannot lock funds

The three critical gates can prevent users from accessing their own funds if misconfigured. The fourth gate (sendAssetsGate) only restricts who can receive withdrawn assets and cannot lock funds.

By default all four gates are set to address(0) (permissionless): anyone can deposit, withdraw, and transfer shares freely.

Non-custodial (recommended for DeFi)

Permanently abdicate the three critical gate setters at deployment. This locks them to address(0) forever - no one can ever restrict user access to funds. This action is irreversible.

The non-critical sendAssetsGate remains configurable so the curator can still set withdrawal-recipient rules post-deployment if needed, without affecting fund safety.

Compliance-ready (KYC/AML)

Keep all gate setters configurable and set gate contracts post-deployment to enforce on-chain rules (e.g., KYC whitelists). The curator can set or change gate contracts at any time via timelocked actions.

This enables compliance-ready distribution but makes the vault partially custodial, because the critical gates could restrict certain users from accessing their funds.

For more details on gates, see the Gates concept page and the Abdicate Gates tutorial.

Use Cases

  • B2B Distribution: Distributors can deploy one Fee Wrapper per customer, each with custom fee configurations
  • Revenue Sharing: Split native yield between the distribution channel and end users (e.g., 50/50 split via fee configuration)
  • White-Label Products: Distributor can offer Morpho yield under their own brand with their own fee structure

Yield and Rewards

Native Yield (Inside ERC-4626 Flow)

Native yield comes from interest paid by borrowers on underlying Morpho Markets. It accrues automatically to shares over time, requiring no separate claim - shares simply appreciate in value. Users withdraw the same token they deposited (e.g., USDC) plus accrued interest. Performance and management fees are applied to this yield.

External Rewards (Outside ERC-4626 Flow)

External rewards (e.g., MORPHO tokens) come from incentives provided by Morpho governance, market creators, or token issuers, and are distributed via Merkl (updated every 8 hours). These rewards require a separate claim action through Merkl and are automatically forwarded to end depositors by default. It is possible to implement custom distribution. For specific reward routing (e.g., distributor claims rewards instead of users), coordinate with the Merkl team for address remapping configuration.

Deployment

Fee Wrapper Demo App

The simplest way to deploy a Fee Wrapper is through the Fee Wrapper Demo App, which provides a UI to:

  • Deploy a new Fee Wrapper
  • Check if a Fee Wrapper is properly configured
  • Update fees on an existing Fee Wrapper
  • View the full yield breakdown for a fee wrapper address

Find the factory addresses in the addresses section.

Programmatic Deployment

For programmatic deployments, the FeeWrapperDeployer periphery contract handles all configuration steps in a single transaction.

Function Signature

The createFeeWrapper function takes three parameters:

ParameterTypeDescription
morphoVaultV2FactoryaddressThe VaultV2Factory address
morphoVaultV1AdapterFactoryaddressThe MorphoVaultV1AdapterFactory address
configFeeWrapperConfigThe fee wrapper configuration (see below)

FeeWrapperConfig Fields

FieldTypeDescription
owneraddressFinal owner. MUST be a safe wallet (multisig, etc.)
saltbytes32CREATE2 salt for deterministic deployment
childVaultaddressThe underlying Morpho Vault V2 to wrap. MUST be a Morpho Vault V2
namestringERC-20 name for the fee wrapper token. Recommended for API indexing and display
symbolstringERC-20 symbol for the fee wrapper token. Recommended for API indexing and display
performanceFeeuint256Performance fee in WAD (e.g. 0.1e18 = 10%). Set to 0 to skip
managementFeeuint256Management fee in WAD/second. Set to 0 to skip
feeRecipientaddressAddress receiving fees. Required if either fee > 0. See Fees
abdicateNonCriticalGatesboolIf true, abdicate the 3 critical gate setters for non-custodial guarantees. See Gates

Deployment Phases

The deployer executes the following steps atomically in a single transaction:

  1. Create vault - deploys a new Vault V2 with the deployer as temporary owner
  2. Adapter setup - creates the MorphoVaultV1Adapter, adds it, then permanently abdicates addAdapter and removeAdapter
  3. Allocator setup - grants allocator role to deployer (temporary, removed at step 10) and owner
  4. Caps configuration - sets absolute cap to max and relative cap to 100%
  5. Allocator configuration - sets liquidity adapter and max rate (200% APR)
  6. Penalty configuration - sets force-deallocate penalty to 2%
  7. Optional fees - sets fee recipients then fees (performance and/or management)
  8. Optional gate abdication - permanently abdicates the 3 critical gate setters for non-custodial guarantees
  9. Token metadata - sets name and symbol if provided
  10. Ownership transfer - removes deployer privileges, sets sentinel/curator/owner to the final owner

Integration Guide

Query the Morpho API to compute post-fee APY. No on-chain reads needed - all data comes from the API.

1. Query the Morpho API

Endpoint: POST https://api.morpho.org/graphql

Use the fee wrapper address directly (not the underlying Morpho Vault V2 address) along with the chainID.

query FeeWrapperAPY {
  feeWrapper: vaultV2ByAddress(
    address: "0x2861ABE7AB28484Fb8375def4A7eb56C8F53fE8F"
    chainId: 8453
  ) {
    avgNetApy
    avgNetApyExcludingRewards
    performanceFee
    managementFee
    name
    symbol
    rewards {
      supplyApr
      asset { address, symbol }
    }
    adapters {
      items {
        type
        address
        ... on MorphoVaultV2Adapter {
          innerVault {
            address
            name
            avgNetApyExcludingRewards
            performanceFee
            managementFee
            rewards {
              supplyApr
              asset { address, symbol }
            }
          }
        }
      }
    }
  }
}

2. Read Net APY

The API response includes pre-computed net APY values that account for the full fee chain (inner vault fees + wrapper fees + rewards):

  • avgNetApy - 6h rolling average net APY, including rewards. This is the recommended value for most integrations.
  • avgNetApyExcludingRewards - Same as above but excluding reward incentives.

These values are ready to use directly - no manual computation needed.

If rewards are redirected via Merkl address remapping, avgNetApyExcludingRewards is the correct value to display (end users do not receive the rewards).

3. Advanced: Manual APY Breakdown (Optional)

For newly deployed fee wrappers, avgNetApy may be zero or noisy until sufficient history accumulates. The manual computation below uses innerVault.avgNetApyExcludingRewards for consistent results in those cases, and is also useful when a granular per-layer fee breakdown is needed.

// innerVault.avgNetApyExcludingRewards already includes inner vault fee deductions
adapterYield = innerVault.avgNetApyExcludingRewards
wrapperPerfFeeDeduction = max(adapterYield, 0) * feeWrapper.performanceFee
nativeYield = adapterYield - wrapperPerfFeeDeduction - feeWrapper.managementFee
rewardsApr = sum(innerVault.rewards[].supplyApr)
netApy = nativeYield + rewardsApr

Note: avgNetApyExcludingRewards is the 6h rolling average net yield after the inner vault's own performance and management fees, but excluding reward incentives. Rewards are sourced from the inner vault (innerVault.rewards[]) and distributed via Merkl based on the inner vault's market positions.

More Fee Wrapper API data can be found here.

Roles & Auth Model

All roles default to the owner at deployment:

RoleDefaultDescription
OwnerdeployerTop-level permissions. No timelock on ownership actions.
CuratorownerRisk manager. Most actions are timelocked.
AllocatorownerPortfolio manager. No timelock on allocation actions.
SentinelownerSafety role. Can revoke pending actions and reduce risk.
Auth tiers:
  • Owner-level: Transfer ownership, set roles - no timelock
  • Curator-level: Change fees, fee recipients, caps - timelocked
  • Allocator-level: Allocate/deallocate to the adapter - no timelock

Security Considerations

What the Owner CAN Do:
  • Change performance fees (up to 50%, timelocked)
  • Change management fees (up to 5%, timelocked)
  • Change fee recipients (timelocked)
  • Add/remove allocators (timelocked)
What the Owner CANNOT Do:
  • Change the underlying vault (abdicated)
  • Add new adapters (abdicated)
  • Remove the existing adapter (abdicated)
  • Access user funds directly
  • Prevent users from exiting (via forceDeallocate)