Earn - Morpho Vaults V2

Earn: Developer Resources

This page is your central hub for all the tools, links, and data sources you need to build on Morpho's Earn product (Morpho Vaults).

Onchain Data & Contracts

These resources are for interacting directly with the blockchain.

  • Vault Addresses: While you can find the factory (the main address used to deploy all vaults) list of all core contracts on the main Addresses page, the best way to dynamically fetch all deployed Morpho vaults is via the Morpho API.
  • Contract Specifications: For detailed function signatures, events, and errors, refer to the canonical Morpho Vault V2 Contract Specs.
  • GitHub Repositories:
    • vault-v2: The canonical Morpho Vault V2 implementation.

Offchain Data & Tools

These tools provide easier access to onchain data for frontends, backends, and analytics.

  • Morpho API (Recommended): The simplest way to fetch comprehensive data about vaults, their states, APYs, and user positions.
  • SDKs: A suite of TypeScript libraries to accelerate your development.
    • @morpho-org/morpho-sdk: The default abstraction layer - ready-to-send transactions, plus core entity classes for Vaults and Markets (@morpho-org/morpho-sdk/entities) and Viem-based fetchers (@morpho-org/morpho-sdk/fetch).
    • @morpho-org/simulation-sdk: Simulates user interactions to predict outcomes before sending a transaction.
    • Learn more: Introduction to Morpho SDKs

Code & Examples

  • Solidity Snippets: The morpho-blue-snippets repository contains simple, educational Solidity contracts for common vault interactions.

On this page