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 a curator-managed Vault Interest Controller (VIC).
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 Automated to Curated Yield: Interest in V1 was calculated automatically. In V2, it is set by the Curator via the VIC, allowing the vault to aggregate yield from diverse, complex sources in a gas-efficient manner.
- 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.
- 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). - 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. Vault Interest Controller (VIC): Curator-Managed Yield
Because Vaults V2 can allocate to countless protocols, calculating the true aggregate yield onchain in real-time might not be feasible. To solve this, interest rate management is delegated to an external Vault Interest Controller (VIC).
- Curator's Responsibility: The
Curator
is responsible for monitoring the vault's overall performance and regularly setting an appropriateinterestPerSecond
via the VIC. - Flexibility: This design allows the vault to represent yield from sources with complex or delayed accrual, like fixed-term loans.
- Provided Implementations: While a
Curator
can implement any logic, Morpho provides a defaultManualVic
, which allows allocators to set the rate up to a maximum defined by the curator. For simpler cases, aSingleMorphoVaultV1Vic
is also available, which automatically calculates the rate for a vault that allocates to a single Morpho Vault V1, mimicking the behavior of Vaults V1. - ERC-4626 Nuance: This manual control is a key reason why Vaults V2 are not strictly ERC-4626 compliant. The standard's
totalAssets()
is expected to reflect real, accrued interest. In Vaults V2, it reflects the rate set by the Curator via the VIC, which is a curated representation of performance.
4. 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. | Curator-managed. Set via an external Vault Interest Controller (VIC) for flexibility. |
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. | Realized on interaction. allocate /deallocate calls realize losses, protecting the vault. |
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 enterGate and exitGate contracts. |
ERC-4626 Compliance | Fully compliant. | Not strictly compliant due to the VIC-based totalAssets , but shares remain 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 the VIC. Most actions are timelocked.
- Allocator: The active portfolio manager. Allocates funds to enabled adapters and manages the
liquidityAdapter
. - Sentinel: The new
Guardian
. A 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).
- Bad Debt Realization: Adapters report losses to the vault, which are then realized by reducing
totalAssets
. To prevent manipulation, new deposits are blocked in the same transaction that a loss is realized. - 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).