YEARN
v2
v2
  • Introduction to Yearn
  • FAQ
  • DeFi Glossary
  • How-To Guides
    • How to Add a Custom Token to MetaMask
    • How To Make a YIP
    • How to Mint yUSD
    • How To Participate in a yVault
    • How to Understand CRV Vote Locking
    • How To Understand yVault ROI
    • How To Withdraw from yEarn and yVaults
  • YFI and yTokens
  • yUSD
  • Products
    • yVaults
      • V2 yVaults
        • Strategies and yVaults available
      • V1 yVaults
    • Earn
    • Zap
    • yInsure
    • yGift
  • R&D
    • yBorrow
    • yLiquidate
    • ySwap
    • yTrade
    • Delegated Funding DAO Vaults
    • StableCredit
  • Developers
    • Naming Conventions
    • Deployed Contracts Registry
    • Code Repositories
    • Integration Guide
    • yVaults Documentation
      • Vaults Overview
      • Vault Interfaces
    • Misc Resources
      • YIP Boilerplate
      • Admin Access Policy
      • Smart Contract API
        • APR
        • iToken
        • Zap
      • Smart Contract Integration
        • 1split
        • aave
        • apr
        • aprmap
        • aprmapwithpool
        • aprwithpool
        • compound
        • curvefi
        • dydx
        • fulcrum
        • imanage
        • interface
        • itoken
        • uniswap
        • uniswapapr
        • uniswaproi
        • ybtc
        • ybusd
        • ycrv
        • ydai
        • ysusd
        • ytusd
        • yusdc
        • yusdt
        • zap
  • Additional Resources
    • Team
    • Github
    • Medium
    • Gov Forum
    • Discord
    • Telegram
    • Reddit
  • Contributors
    • Contribute
    • Contributor Tools
    • Writing Style Guide
Powered by GitBook
On this page
  • Integration Points
  • Vault Registry
  • Subgraph
  • API

Was this helpful?

  1. Developers

Integration Guide

PreviousCode RepositoriesNextyVaults Documentation

Last updated 4 years ago

Was this helpful?

Integration Points

Vault Registry

The Yearn Vault Registry (aka yRegistry) is a smart contract deployed on the ethereum mainnet. The Vault Registry is the single source of truth for active Yearn vaults. The registry allows users to query for active Yearn vaults and vault metadata (see "" below).

Details

  • Currently vaults are added manually by Yearn governance.

  • In the future the vault registry may be integrated into the vault lifecycle (meaning new vaults would get added into the registry during their deployment process).

Interact

  • ENS:

  • Address:

Code

Available data

  • Vault addresses (methods: getVaults).

  • Active controller address per vault (methods: getVaultInfo, getVaultsInfo).

  • Active strategy address per vault (methods: getVaultInfo, getVaultsInfo).

  • Vault type (normal, wrapped, delegated) (methods: isDelegated, isWrapped).

  • Governance address (methods: governance).

Integrations

  • Yearn API - utilizes vault registry as the single source of truth in many API calls.

Future Integrations

  • Yearn Subgraph - in the future we would like the Yearn subgraph to index new vaults automatically using the Vault registry. In order to accomplish this the vault registry must first be incorporated into the vault lifecycle.

Subgraph

Details

Interact

Code

Available data

  • Vault snapshot (current contract values).

  • Vault metrics per vault (net deposits, withdrawals, transfers, earnings, etc.).

  • Vault metrics per user (net deposits, withdrawals, transfers, earnings, etc.).

  • Active controller address per vault.

  • Active strategy address per vault.

  • Historical harvest events and earnings.

Integrations

Examples of projects using the Yearn Subgraph

Link

Code

By

API

Yearn API is a collection of Serverless API endpoints focused on Yearn integrations.

Details

Goals

  • Provide free API endpoints to simplify 3rd party integration with Yearn.

  • Provide an "API playground" (Swagger UI) anyone can use to quickly browse and test available APIs.

  • Document all existing APIs.

  • Allow the entire API stack to be forked to enable community involvement in API development.

Data Sources

  • Vault Registry - Yearn API utilizes the vault registry in a number of endpoints to maintain a list of active vaults.

  • Subgraph - Yearn API utilizes the Yearn Subgraph for various metrics endpoints.

Interact

Code

Available data

  • Current vault snapshots.

  • Vault listings from vault registry (with injected strategy/controller/token metadata).

  • Vault metrics per user (net deposits, withdrawals, transfers, earnings, etc.).

  • Vault transactions per user.

  • Vault APY data.

Integrations

Examples of projects using the API

Link

Code

By

The Yearn Subgraph is a GraphQL-based public API running on that can be utilized to extract current and historical data from the Yearn ecosystem.

See for detailed integration details.

, ,

Yearn API Playground (Swagger UI): .

The Graph
README
Graph Explorer
Github
https://yearn.tools
Github
registry.ychad.eth
0x3ee41c098f9666ed2ea246f4d2558010e59d63a0
https://github.com/iearn-finance/yearn-protocol/blob/develop/contracts/registries/YRegistry.sol
Vault Registry
Subgraph
API
available data
https://yearn.tools
https://github.com/yearn-integrations/api
x48
Lucinao
Graham
https://yvault-roi.netlify.app
https://github.com/rrridges/yvault-roi
Matt Ridges
https://www.yfistats.com
Bob_The_Builder
https://yearn.finance
https://github.com/iearn-finance/iearn-finance
Yearn
https://yearn.party
https://github.com/x48-crypto/yearn-party
x48
https://feel-the-yearn.app
Graham