Skip to main content

getYieldEarnings

Gets a wallet’s Earn earnings across every vault it holds on one chain: aggregate USD totals plus a per-vault breakdown. The values are indexed by Morpho rather than read on-chain, so they trail the chain head by a short delay. getYieldPosition stays the source of truth for what a position is worth right now; use this function for earnings and PNL. Morpho aggregates per chain, so chainId is required and Vault V1 positions are not covered. Aggregate totals come back in USD only, because per-vault earnings are denominated in different underlying assets and are not additive. A vault with no USD price is skipped from the totals, not counted as zero. Positions in vaults the environment does not offer are still included, with vaultId set to null for those entries.

Usage

Parameters

Returns

Promise<YieldEarnings> - The wallet’s aggregate USD totals and per-vault earnings. Each entry in vaults:

Examples

List per-vault earnings

React

useGetYieldEarnings is a query hook that stays disabled until walletAccount is defined, safe to render before a wallet is connected.
Last modified on September 21, 2026