Yield Generation

Understanding how yield is generated, accounted for, and distributed is fundamental to curating a Morpho Vault V2. Vault V2 tracks yield automatically through an adapter-based model. Morpho Vault V1 (legacy) is covered at the end of this page.

Vault Architecture

Yield in Morpho Vaults V2

Vaults V2 are designed to be future-proof, capable of allocating assets to many different yield sources. The yield calculation is fully automated through an adapter-based architecture.

Automatic Asset Reporting via Adapters

Each Adapter in Vaults V2 implements a realAssets() function that reports the current value of all investments it manages. This allows the vault to automatically aggregate yield from diverse sources.

  • Adapter Responsibility: Each adapter is responsible for accurately reporting the current value of its investments through realAssets().
  • Automatic Aggregation: The vault calculates its total assets by summing the realAssets() from all adapters plus any idle assets.
  • Protocol Flexibility: This model allows the vault to account for yield from any source while maintaining automated, onchain accuracy.

For example, MorphoMarketV1AdapterV2 reports the current value of the vault's supply positions on Morpho Blue variable rate markets, including accrued interest.

The V2 Yield Flow

  1. Allocation: The Allocator deploys capital to various protocols through Adapters (e.g., to Morpho Blue variable rate markets).
  2. Yield Generation: Each underlying position generates yield according to its own protocol's rules.
  3. Real-time Reporting: Each adapter continuously tracks the current value of its investments and reports this via realAssets().
  4. Vault Accrual: When a user interacts with the vault, the vault automatically queries all adapters' realAssets() and updates its totalAssets accordingly.
  5. Vault Receipt Token Value Growth: As the real asset values increase from yield generation, the value of the vault receipt token increases automatically, delivering yield to vault users.

Interest Rate Controls

While yield tracking is automatic, the Allocator can set additional controls:

maxRate

A parameter set by the Allocator with setMaxRate. It caps how quickly totalAssets, and therefore the value of the vault receipt token, can grow. In practice, it caps the yearly rate at which yield accrues in the vault, before fees. Onchain, maxRate is stored as a rate per second, so a yearly target has to be converted before calling setMaxRate. Rewards distributed outside the vault are not affected. It can be used to limit how quickly yield accrues, for example to spread a donation over time or to prevent sudden yield spikes. It does not guarantee a minimum yield.

At each interest accrual, the vault compares two values:

  • realAssets: the vault's idle balance of the asset plus the realAssets() reported by each adapter.
  • maxTotalAssets: totalAssets + totalAssets * elapsed * maxRate / WAD, where elapsed is the time in seconds since the last accrual.

The new totalAssets is the lower of the two. When realAssets grows faster than maxRate allows, the difference stays in the vault and is accrued at later accruals, never faster than maxRate.

The cap only limits growth. If realAssets falls below totalAssets, totalAssets falls to realAssets and the loss is realized.

setMaxRate accrues interest before applying the new value, so the new maxRate only applies to growth from that point.

The maxRate is capped at 200% APR (see MAX_MAX_RATE constant here)

Donations

Anyone can donate to a Vault V2 by sending the vault's asset to the vault address. The donation increases realAssets without minting shares, so it goes to existing users through the value of the vault receipt token.

A donation is accrued like any other growth: it increases the value of the vault receipt token no faster than maxRate. With a maxRate set, a donation can be distributed over time instead of at the next accrual.

Yield in Morpho Vaults V1 (Legacy)

In Vaults V1, yield generation is a direct and automatic process tied exclusively to variable rate markets. It works as follows:

  1. Allocation: The vault allocates capital to one or more variable rate market instances, as directed by the Allocator.
  2. Interest Paid by Borrowers: Borrowers in those markets pay interest on their loans according to the market's specific Interest Rate Model (IRM).
  3. Onchain Accrual: This interest automatically accrues to all lenders in the market, including the Morpho Vault.
  4. Automatic totalAssets Update: When any user interacts with the vault (e.g., deposits or withdraws), the vault contract automatically calculates its total assets by summing up its underlying positions on variable rate markets. This process is fully onchain and reflects the real, up-to-the-second value of its holdings.
  5. Vault Receipt Token Value Growth: As totalAssets increases from the accrued interest, the value of the vault receipt token appreciates, delivering yield to vault users.

The key takeaway for Morpho Vault V1 is that interest accrual is automatically tracked onchain. The Curator's job is to select the right markets, not to manage the yield calculation itself.