Skip to content

Morpho Vaults for Earn products

Integrating Morpho Vaults (Earn) into your application means implementing the infrastructure that allows users to deposit assets into yield-generating vaults built on top of Morpho's lending protocol.

The users will benefit from earning native yield on their deposited assets, alongside with incentives (rewards) from different rewards provider.

Key Components of Earn Integration

When building earn products with Morpho Vaults, you need to integrate three main components:

  1. Vault Operations: Deposit, withdraw, and position management
  2. Yield Tracking: Vault APY calculation and performance monitoring
  3. Rewards Integration: Discovery, tracking, and claiming of additional incentives

Here is a quick visual for better understanding:

Integrating Earn gives users access to:

  1. Curated Risk Profiles: Unlike traditional lending platforms where users are exposed to all assets in the pool, Morpho Vaults allow selective exposure to specific collateral types based on risk preferences.

  2. Permissionless Infrastructure: Any entity (individual, DAO, protocol) can create and manage vaults with different risk parameters and allocation strategies.

  3. Non-Custodial Architecture: All positions remain fully controlled by the user with transparent onchain verification of allocations and immutable vault logic.

Technical Components

From a technical standpoint, integrating Earn involves:

  1. Vault Discovery and Display: Implementing systems to discover available vaults, display their key metrics (APY, TVL, allocation breakdown), and present risk profiles to users.

  2. Transaction Handling: Building the interface and backend support for deposit and withdrawal operations, including:

    • Asset approval workflows
    • Transaction status monitoring
    • Receipt confirmation and position updates
    • Rewards tracking updates
  3. Position Management: Creating interfaces for users to:

    • View their current vault positions
    • Track historical performance
    • Monitor yield accrual
    • Perform deposits & withdrawals
    • Claim rewards
  4. Risk Transparency: Building displays that clearly communicate:

    • Which Morpho markets the vault allocates to
    • Collateral types users are exposed to
    • Current utilization ratios
    • Current allocation strategy and any pending changes

Rewards Considerations

A complete Earn integration should include rewards functionality as one of the core components. Many Morpho Vaults earn additional incentives beyond base lending yield through reward campaigns.

Key aspects to integrate:

  • Rewards Discovery: Identify available reward programs for vault depositors
  • Rewards Tracking: Display accruing and claimable rewards in real-time
  • Claiming Process: Implement claim functionality using Merkle-proof based distribution systems (URD and Merkl)
  • Multi-Token Support: Handle various reward tokens from different reward providers
  • Program Awareness: Display active campaigns and their respective parameters

For detailed implementation guidance, see the Rewards integration guide.

Assets Flow - Earn

Understanding the complete flow of assets is crucial for proper integration:

1. Deposit

  • User deposits an asset (e.g., USDC, ETH) into a Morpho Vault
  • User receives vault shares (ERC4626 tokens) representing their proportional ownership
  • The vault allocates the deposited assets across various Morpho Markets based on the curator's strategy
  • These markets are permissionless pools containing a loan token (what was deposited) and a collateral token

2. Yield Generation

  • Borrowers deposit collateral into Morpho Markets and borrow the loan token
  • Borrowers pay interest on borrowed amounts
  • This interest accrues to suppliers (the vault, in this case)
  • The vault's share price increases as interest accumulates, representing yield for depositors

3. Withdrawal Process

  • Users can redeem their vault shares for the underlying asset at any time
  • The vault pulls liquidity from Morpho Markets according to its withdrawal queue
  • Users receive their original deposit plus accrued yield (minus any performance fees)

Functional Integration Requirements

For a complete Earn integration, your system needs to implement:

  1. Read Operations:

    • Query vault metadata (name, symbol, asset, curator, fees)
    • Fetch current APY and historical performance
    • Display current allocation across markets
    • Show user-specific position data
    • Present risk parameters of underlying markets
  2. Write Operations:

    • Handle asset approvals
    • Execute deposits & withdrawals
    • Facilitate claiming any associated rewards
  3. Monitoring Capabilities:

    • Track position changes
    • Alert users to significant vault parameter changes
    • Update yield information in real-time

Risk Considerations

A complete Earn integration should help users understand:

  1. Smart Contract Risk: Exposure to both Morpho and Vault contracts
  2. Market Risk: Exposure to specific collateral types and their volatility
  3. Curator Risk: Dependence on curator's expertise and continued management
  4. Liquidity Risk: Potential for withdrawal delays during high utilization
  5. Oracle Risk: Vulnerability to incorrect price feeds affecting underlying markets

By properly integrating these components, your application can offer users access to Morpho's capital-efficient lending infrastructure through a curated, simplified experience that abstracts away much of the complexity while maintaining transparency about underlying risks and operations.