Skip to main content
This example aggregates yield data from all lending protocols (Euler V2, Neverland, Morpho), LSTs (aprMON, gMON, shMON, sMON), and yield vaults in a single pass. It uses Promise.allSettled so a failure in one source never blocks the others.

How It Works

The yield finder queries four sources in parallel:
  1. getBestYields - aggregated list across all protocols
  2. getAllLSTStats - individual APRs for each LST (MON only)
  3. getEulerBestSupply - best Euler V2 vault for the given asset
  4. getBestMorphoVault - best Morpho Blue vault for the given asset
Results are merged, deduplicated, sorted by APY, and the top-N are returned with a projected annual return in USD.

Full Example

Example Output

Comparing a Single Asset Across Protocols

Filtering by Yield Type

Periodic Yield Scanner

Notes

  • Promise.allSettled is intentional - if one source (e.g. Morpho) is temporarily unavailable, the other sources still contribute results.
  • APYs are expressed as decimals (0.0821 = 8.21%). Multiply by 100 for display.
  • LST APRs are calculated from on-chain exchange rate deltas over 500k blocks for gMON, or from direct staking contract reads for the others.