Introduction
Dynamic has partnered with Morpho to bring yield capabilities directly into your app, and Earn also supports Aave lending markets. Your users can deposit stablecoins into a vault, withdraw at any time, and track their position in real time without leaving your app. Each vault is served by a provider, which is the DeFi protocol that lends out the deposited funds. Every vault has avaultId and a provider field, and all providers use the same Earn functions. A few features depend on what the provider offers, as described in Provider support.
What you can offer your users
- Deposit and withdraw assets into yield vaults with a seamless in-app experience
- Earn yield in the same asset your users deposit: deposit USDC, earn USDC
- Track positions with real-time holdings and accrued yield
Supported chains
Earn vaults are EVM-only today, available on Ethereum, Base, Arbitrum, Optimism, Polygon, Monad, and Stable. The chains a vault runs on depend on its provider, so readchainId from listYieldVaults rather than assuming a vault exists on every chain.
Default vaults
These vaults are enabled by default and returned bylistYieldVaults, which also returns each vault’s live netApy and tvlUsd. APY changes continuously, so the table omits it, and the TVL values below are a snapshot, not a guarantee.
Other vaults can be enabled for your environment. Contact us to have one added.
Key concepts
You don’t need a DeFi background to build with Earn. These are the only ideas you need:Provider support
Listing vaults, reading vault details, depositing, withdrawing, and reading a position work the same way for every provider. Earnings, performance, and rewards depend on what the provider reports or offers:getYieldEarningsreturns every position’s assets and USD value. Its profit and loss fields arenullfor a provider that does not report a cost basis, and those positions add nothing tototalPnlUsd.getYieldPerformance,getYieldRewards, andclaimYieldRewardswork only for the providers listed on their reference pages. For a vault from any other provider, the call rejects with an HTTP 400 error.
provider field from listYieldVaults or getYieldDetails to decide which features to show for it.
Using the Earn functions
This is the full lifecycle:listYieldVaults: see which vaults are enabled for your environment.getYieldDetails: get a specific vault’s asset, decimals, and other metadata.depositToYieldVault: deposit a wallet’s funds into a vault.getYieldPosition: read a wallet’s currentassetsbalance in a vault. This is the number to show a user, and it grows on its own as yield accrues.getYieldRewardsandclaimYieldRewards: check for and claim bonus token rewards, if the vault runs a campaign.withdrawFromYieldVault: withdraw a wallet’s position, in whole or in part.
Do your own research when selecting a vault or lending market. APY is variable and not guaranteed. Review the protocol documentation and understand the risks before depositing funds.