Morpho Vault v2

Morpho Vault V2 is a protocol for permissionless lending vaults built on top of the Morpho Markets V1, Morpho Vaults V1 and more.
What are Morpho Vaults V2?
Morpho Vaults V2 represent a major evolution of the vault concept, transforming them from a simple layer on Morpho Market V1 into a universal gateway to onchain yield. They are designed to be protocol-agnostic and future-proof, capable of allocating assets to any protocol, including Morpho Market V1, Morpho Vault V1, and future versions of Morpho.
While retaining the core principle of simplifying yield generation for passive depositors, Vaults V2 introduce a powerful new architecture centered around Adapters, a more granular ID & Cap System, and automatic interest accrual through real-time asset reporting.
The Evolution from V1 to V2
Vaults V2 are a significant leap forward, designed for maximum flexibility and control.
- From Specific to Universal: Vaults V1 were tightly coupled to Morpho Market V1. Vaults V2 can connect to any protocol via Adapters.
- From Simple to Automatic Yield Aggregation: While V1 calculated interest automatically from Morpho Market V1, V2 aggregates yield from diverse sources through adapters that report their current assets in real-time.
- From Simple to Granular Risk: V1 had simple, per-market caps. V2 introduces a multi-dimensional ID & Cap system, allowing risk curation across abstract factors like a specific collateral type, oracle, or protocol.
Core Concepts of Vaults V2
1. The Adapter Model: A Universal Gateway to Yield
The central innovation of Vaults V2 is the Adapter system. An adapter is a smart contract that acts as a translator, containing the logic to interact with a specific external protocol and automatically report the current value of investments.
- How it works: The
Allocator
callsallocate
on the vault, specifying a target adapter, an amount, and any protocol-specific data. The vault then transfers assets to the adapter, which executes the supply logic on the target protocol (e.g., supplying to a Morpho Market V1 or depositing into a Morpho Vault V1). - Automatic Asset Reporting: Each adapter implements a
realAssets()
function that returns the current value of all investments it manages. This allows the vault to automatically calculate total assets by aggregating across all adapters. - Future-Proof: New adapters can be developed and enabled by the
Curator
at any time, allowing the vault to integrate with any new source of onchain yield without requiring an upgrade to the vault itself. Initial adapters includeMorphoMarketV1Adapter
andMorphoVaultV1Adapter
.
2. Granular Risk Curation: The ID & Cap System
Vaults V2 introduce a far more sophisticated system for curating risk. Instead of a single cap per market, Curators can now define and cap risk based on abstract identifiers (ids
), where each id
represents a common risk factor.
For example, the MorphoMarketV1Adapter
can generate ids
for:
- A specific collateral asset (e.g.,
keccak256("collateralToken", stETH_address)
) - A specific market configuration (e.g.,
keccak256("collateralToken/oracle/lltv", ...)
).
The Curator
can then set both absolute caps (a fixed asset amount) and relative caps (a percentage of the vault's total assets) on these ids
. This allows for multi-dimensional risk policies, such as:
- Max total exposure to
stETH
as collateral: 15M (absolute cap on the collateralid
). - Max 20% of the vault allocated to any market using a specific, new oracle (relative cap).
3. Advanced Liquidity Management
Vaults V2 separate idle liquidity from allocated capital more explicitly.
- Idle Assets: All user deposits and withdrawals flow through the main vault contract, which holds the idle assets.
- Liquidity Adapter: The
Allocator
can designate a specific, highly liquid adapter as theliquidityAdapter
. If idle assets are insufficient to cover a withdrawal, the vault will automatically pull funds from this market. This adapter also receives all new deposits, ensuring capital is immediately put to work. - In-Kind Redemptions (
forceDeallocate
): As a final non-custodial guarantee, users canforceDeallocate
assets from any adapter back to the vault's idle pool. By combining this with a flash loan, a user can always exit the vault by exchanging their vault shares for a direct position in an underlying protocol, even if the vault is illiquid. A small penalty applies to disincentivize misuse of this emergency function.
Key Feature Comparison: Vaults V1 vs. Vaults V2
Feature | Morpho Vault V1 (Vaults V1) | Morpho Vaults V2 |
---|---|---|
Protocol Support | Exclusively Morpho Market V1 (Morpho Blue). | Protocol-agnostic. Connects to any protocol via Adapters. |
Interest Accrual | Automatic. Calculated onchain from Morpho Market V1. | Automatic aggregation. Each adapter reports current assets via realAssets() . |
Risk Curation | Simple. Absolute supply cap per market. | Granular. Absolute and relative caps on abstract ids (e.g., collateral type, oracle, protocol). |
Roles & Permissions | Owner is powerful; Guardian is a safety net. | Separated roles (Owner, Curator, Allocator, Sentinel) for better separation of duties. |
Bad Debt | (v1.1) Not realized by the vault; remains in Morpho Market V1. | Automatically tracked. Adapters report losses in real-time through realAssets() . |
Liquidity | Liquidity is a single pool across all markets. | Distinct idle assets and an optional, dedicated liquidityAdapter . |
Compliance / Gating | Not natively supported. | Native support for onchain Gating via gate contracts for shares and asset transfers. |
ERC-4626 Compliance | Fully compliant. | Mostly compliant, with shares remaining fully ERC-20. |
Advanced Role System
Vaults V2 refine the role system for greater security and flexibility:
- Owner: Manages top-level permissions. Can appoint the Curator and Sentinels. Has no direct control over funds or risk parameters.
- Curator: The primary risk manager. Sets adapters, caps, fees, and interest rate limits. Most actions are timelocked.
- Allocator: The active portfolio manager. Allocates funds to enabled adapters and manages the
liquidityAdapter
. - Sentinel: The safety-focused role that can reactively reduce risk by deallocating funds, decreasing caps, or revoking pending timelocked actions.
Other Key Features
- New Fee Structure: Supports both a performance fee (on yield) and a management fee (on total assets).
- Interest Rate Controls: The Curator can set a
maxRate
that caps how quicklytotalAssets
can grow, useful for implementing fixed-rate distributions. - Gating & Compliance: Optional
Gate
contracts can be set by the Curator to enforce onchain rules for deposits, withdrawals, and share transfers (e.g., for KYC/whitelisting).
Are Morpho Vaults v2 Non-Custodial?
Yes, Morpho Vault v2 maintains non-custodial guarantees through three fundamental mechanisms: in-kind redemptions, timelocks, and role-based access control.Core Non-Custodial Mechanisms
1. In-Kind Redemptions with forceDeallocate
Vault v2 ensures users can always exit, regardless of vault liquidity, through the permissionless forceDeallocate
function. This mechanism enables:
- Guaranteed exits: Users can redeem their vault shares directly for underlying positions in protocols, similar to ETF redemptions
- Permissionless operation: Anyone can call
forceDeallocate
to move assets from adapters back to the vault's idle assets - Flashloan-enabled exits: Users can flashloan liquidity, supply it to an adapter's market, then withdraw through
forceDeallocate
before repaying the flashloan
When a vault lacks sufficient idle liquidity for withdrawals, users can perform an in-kind redemption through flashloan-enabled exits:
- User flashloans the required liquidity amount
- User deposits flashloaned assets directly into the underlying market/protocol
-
User calls
forceDeallocate
to withdraw equivalent assets from the adapter - User withdraws their vault shares for the deallocated assets
- User repays the flashloan with the withdrawn assets
- User retains their position in the underlying market as compensation
A small penalty (up to 2%) may apply to discourage manipulation, but this doesn't prevent exits—it only adds a minor cost.
This mechanism ensures that even if a vault's underlying markets become illiquid, users are never permanently locked in. They can always exit by effectively swapping their vault shares for direct positions in the underlying protocols.
2. Comprehensive Timelock System
All potentially harmful curator actions are protected by configurable timelocks (0 to 3 weeks), giving users time to react:
Timelocked actions include:- Increasing allocation caps (absolute and relative)
- Enabling new adapters or allocators
- Setting performance/management fees (capped at 50% and 5% respectively)
- Configuring access gates
- Modifying fee recipients
- Users can monitor pending changes via the
submit
function, which records proposal timestamps in theexecutableAt
mapping - Sentinels can revoke malicious proposals before execution
- Emergency functions like decreasing caps can be called immediately by curators or sentinels for protective risk management
- Some timelocks can be made infinite through
abdicateSubmit
, permanently preventing certain actions
Key protection: The timelock system ensures that users always have advance notice of changes that could affect their funds, with emergency overrides only available for actions that reduce risk exposure (like lowering caps), never for actions that could increase risk.
3. Role Separation and Limitations
The vault's v2 role-based architecture ensures no single party can unilaterally harm users through strict separation of concerns, ensuring that even if one role is compromised, user funds remain protected by the constraints and oversight of other roles, combined with timelock protection for any potentially harmful changes.
Check the roles declination on the related section.
Additional Safety Mechanisms
Caps and Risk Controls
- Absolute caps: Hard limits on allocation to specific protocols/markets
- Relative caps: Percentage-based limits relative to total vault assets
- Id system: Groups related risks (e.g., same collateral) under unified caps
Gates (Optional Access Control)
When enabled, gates control:
- Share transfers (who can send/receive vault shares)
- Asset deposits (who can deposit into vault)
- Asset withdrawals (who can receive assets from vault)
Gates are timelocked and can be permanently disabled through abdication.
Immutable Contracts
All vault contracts are immutable—no upgrades can change the core non-custodial guarantees after deployment.
Why This Matters
These mechanisms ensure that:
- No entity can permanently lock user funds (guaranteed via
forceDeallocate
) - No surprise changes can harm users (guaranteed via timelocks)
- No single party controls user assets (guaranteed via role separation)
The combination of guaranteed exits, transparent timelocks, and distributed control makes Morpho Vault v2 genuinely non-custodial—users retain ultimate control over their assets even when delegating management to curators and allocators.