Skip to content

Basic Mechanics

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 are earning additional incentives beyond the base lending yield, and users expect to be able to track and claim these rewards through your interface. Key aspects to integrate:

  • Rewards Discovery: Query the Rewards API (https://rewards.morpho.org/v1/users/{address}/distributions) to discover available rewards for your users
  • Rewards Tracking: Display accruing, pending, and claimable rewards in your interface
  • Claiming Process: Implement the necessary functions to allow users to claim rewards, which uses a Merkle-proof based distribution system
  • Multi-Token Support: Handle cases where users may receive different reward tokens from various reward programs
  • Epoch Awareness: Show users when the next rewards epoch ends and when rewards become claimable

By integrating rewards functionality alongside deposit and withdrawal operations, you provide a complete earning experience that maximizes user returns and engagement with your platform.

Integration Options

Developers can choose different levels of integration:

  1. Basic Integration: Simply connecting to existing vaults through standard ERC4626 interfaces for deposit and withdrawal.

  2. Enhanced Integration: Adding specialized UX features like yield projection tools, position dashboards, and comparative vault metrics.

  3. Full-Stack Integration: Implementing your own allocation strategy bots, creating custom vaults for your users, and potentially earning curator fees.

Assets Flow - Earn

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

  1. Deposit Path:

    • 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. Vault Management:

    • Vault curators can adjust market allocations to optimize for yield or risk
    • Allocators can dynamically rebalance within approved markets to maximize returns
    • Timelocks protect users from sudden risky changes to vault parameters
    • Performance fees (if any) are taken from the yield, not the principal
  4. 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
    • Monitor curator actions (especially timelocked 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.