Skip to main content

Introduction

Dynamic has partnered with Morpho to bring yield capabilities directly into your app. Earn also supports Aave lending markets on EVM chains and vaults on Solana. 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 a vaultId 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 run on EVM chains and on Solana. Morpho and Aave vaults are EVM vaults, available on Ethereum, Base, Arbitrum, Optimism, Polygon, Monad, and Stable. Other vaults run on Solana. The chains a vault runs on depend on its provider, so read chainId and chainName from listYieldVaults rather than assuming a vault exists on every chain. Every Earn action needs a wallet account on the vault’s chain family, so an EVM vault takes an EVM wallet account and a Solana vault takes a Solana wallet account. The API rejects a wallet account from the other chain family with an HTTP 400 error.

Default vaults

These vaults are enabled by default and returned by listYieldVaults, which also returns each vault’s live netApy and tvlUsd. These numbers change continuously, so the table omits them.
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:
Depending on the provider, a wallet’s shares in a vault can stay fixed between deposits and withdrawals while only assets moves. Always display assets, never shares, when showing a user their balance or how much they’ve earned.
Your app should make clear to end users that yield is generated via a DeFi protocol independent from the wallet provider. Users keep full control of their assets and should explicitly direct any deposit or supply action.

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:
  • getYieldEarnings covers one chain at a time and needs a wallet account on that chain’s family: an EVM wallet account for Morpho and Aave positions, a Solana wallet account for Kamino positions. Its profit and loss fields are null for a provider that does not report a cost basis, and those positions add nothing to totalPnlUsd. roe is null for Kamino and Aave, which report no time-weighted return.
  • getYieldPerformance, getYieldRewards, and claimYieldRewards work only for the providers in the table. For a vault from any other provider, the call rejects with an HTTP 400 error.
Read each vault’s provider field from listYieldVaults or getYieldDetails to decide which features to show for it.

Solana vaults

Solana vaults use the same Earn functions as every other vault, but Solana changes a few behaviors that your UI needs to account for:
  • Several transactions per action. A Solana deposit or withdrawal is split into up to three Solana transactions, such as the deposit itself and a step that stakes the deposited shares in the vault’s farm. The SDK signs, sends, and confirms them one at a time, in order, so the user may approve more than one signature for a single action.
  • A short signing window. All of an action’s transactions are built against the same blockhash, which stays valid only briefly. If the user takes too long to approve, the remaining transactions expire and the action stops partway.
  • Partial completion. When a later transaction fails or expires, the earlier ones have already confirmed on-chain. Read the wallet’s position with getYieldPosition before retrying, because repeating the whole action could apply the earlier steps twice.
  • No separate receiver. Solana vaults credit shares and return tokens to the depositor’s own accounts, so receiverAddress must be omitted or equal to the wallet’s own address.
  • Network fees. The user pays SOL network fees unless you opt in to gas sponsorship for the action by passing sponsored: true, which is available for Dynamic embedded wallets when SVM gas sponsorship is enabled for your project. Unlike EVM vaults, Solana vault actions are never sponsored by default.
  • Positions include staked shares. getYieldPosition counts shares staked in the vault’s farm, so the position stays the same size when the farm step runs.
For a hand-built integration that uses the Kamino SDK directly instead of the Earn functions, see the Kamino yield vaults recipe.

Using the Earn functions

This is the full lifecycle:
  1. listYieldVaults: see which vaults are enabled for your environment.
  2. getYieldDetails: get a specific vault’s asset, decimals, and other metadata.
  3. depositToYieldVault: deposit a wallet’s funds into a vault.
  4. getYieldPosition: read a wallet’s current assets balance in a vault. This is the number to show a user, and it grows on its own as yield accrues.
  5. getYieldRewards and claimYieldRewards: check for and claim bonus token rewards, if the vault runs a campaign.
  6. withdrawFromYieldVault: withdraw a wallet’s position, in whole or in part.
Step 5 applies only to providers that support rewards, which today are Morpho and Kamino. See each function’s reference page for parameters, return types, and usage examples.
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.
Dynamic does not control DeFi vaults, lending markets, or the underlying protocols. Vault and market information is provided for reference only and may change or be inaccurate. Earnings are generated from third-party protocols and are not guaranteed. Using vaults and lending markets involves risk, including potential loss of funds. These materials are for general information purposes only and are not investment advice or a recommendation or solicitation to engage in any specific transaction. You are responsible for evaluating protocols and vaults at your own discretion. Dynamic does not provide investment, financial, legal, or tax advice.
Last modified on October 26, 2026