Skip to main content
LI.FI Earn is the fastest way to launch and monetize an Earn product in any wallet, app, or platform. Access market-leading yield opportunities from 20+ protocols across 60+ chains through a single API integration, without requiring in-house DeFi expertise or managing underlying execution complexity.
Two layers, one product. LI.FI Earn combines the Earn Data API for vault discovery and portfolio tracking with Composer for onchain execution. Together, they let you surface yield opportunities and execute deposits in a single integration, across any chain.

Why Use Earn?

  • Access to 20+ protocols. Surface yield opportunities from Aave, Morpho, Euler, Pendle, and more through a single API. No need to integrate each protocol individually.
  • Standardized data. Every vault follows the same schema regardless of the underlying protocol. Compare APYs, TVLs, and token compositions without data wrangling.
  • One-click deposits. Composer handles swap, bridge, and deposit in a single transaction. Users can enter any vault from any token on any chain.
  • Portfolio tracking. Retrieve all user positions, balances, and returns across supported protocols in a standardized format.
  • Full control. You decide which protocols to surface, how to structure your product, and what disclosures to show. LI.FI handles the infrastructure.
  • Built-in monetization. Configure revenue sharing to monetize vault integrations.

The Two Layers

LI.FI Earn provides the full infrastructure for building an Earn product, from discovering yield opportunities to executing deposits and tracking positions.
LayerBase URLWhat It Does
Earn Data APIhttps://earn.li.fiVault discovery, standardized metadata, APY and TVL analytics, portfolio positions and returns
Composerhttps://li.questOnchain execution: one-click deposits, cross-chain flows, any-token-to-vault transactions
A typical integration flow:
  1. Discover. Use the Earn Data API to list vaults, filter by chain/asset/protocol, and sort by APY or TVL.
  2. Display. Show vault details (APY breakdown, TVL, underlying tokens) in your UI.
  3. Deposit. When a user wants to deposit, pass the vault’s LP token address to Composer’s GET /v1/quote endpoint. Composer handles swap, bridge, and deposit in a single transaction.
  4. Track. Use the Earn Data API’s portfolio endpoint to show the user’s positions and returns across vaults.

Who Is Earn For?

Build a yield marketplace in your app. Show users the best available yields across protocols, let them compare options, and enable one-click deposits via Composer. Use the portfolio endpoint to display their active positions and returns.
Aggregate a user’s DeFi positions across protocols without integrating each one individually. The Earn Data API normalizes position data into a consistent format.
Use the Earn Data API as your vault data layer. Filter by chain, asset, or protocol, sort by yield or TVL, and use Composer for execution.

Try It Out

List the top USDC vaults on Base sorted by APY:
curl -X GET 'https://earn.li.fi/v1/earn/vaults?chainId=8453&asset=USDC&sortBy=apy&limit=5'
See the Quickstart for the full step-by-step walkthrough including vault selection, deposits, and position tracking.

Current Limitations

  • Data coverage. Vault data reflects what LI.FI’s sync pipeline has indexed. Not all vaults from every supported protocol are guaranteed to appear.
  • Deposits only via Composer. The Earn Data API handles discovery and tracking only. Onchain execution requires the separate Composer API.

Next Steps

Quickstart

Make your first API calls in under 5 minutes

How Earn Works

Understand the data pipeline, NormalizedVault schema, and how data stays fresh

API Integration Guide

Full endpoint reference with parameters and response examples

Discover and Deposit Recipe

End-to-end recipe: find top vaults, then deposit via Composer