> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# What is LI.FI Earn?

> The fastest way to launch an Earn product. Access yield opportunities from 20+ protocols across 60+ chains, with built-in cross-chain execution for one-click deposits.

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.

<Note>
  **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.
</Note>

***

## 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.

| Layer                              | Base URL             | What It Does                                                                                   |
| ---------------------------------- | -------------------- | ---------------------------------------------------------------------------------------------- |
| **Earn Data API**                  | `https://earn.li.fi` | Vault discovery, standardized metadata, APY and TVL analytics, portfolio positions and returns |
| **[Composer](/composer/overview)** | `https://li.quest`   | Onchain 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?

<AccordionGroup>
  <Accordion title="Wallet & DeFi Platforms">
    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.
  </Accordion>

  <Accordion title="Portfolio Trackers & Dashboards">
    Aggregate a user's DeFi positions across protocols without integrating each
    one individually. The Earn Data API normalizes position data into a
    consistent format.
  </Accordion>

  <Accordion title="DeFi Aggregators">
    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.
  </Accordion>
</AccordionGroup>

***

## Try It Out

List the top USDC vaults on Base sorted by APY:

<CodeGroup>
  ```bash curl theme={"system"}
  curl -X GET 'https://earn.li.fi/v1/vaults?chainId=8453&asset=USDC&sortBy=apy&limit=5'
  ```

  ```ts TypeScript theme={"system"}
  const response = await fetch(
    'https://earn.li.fi/v1/vaults?chainId=8453&asset=USDC&sortBy=apy&limit=5'
  );
  const { data, total } = await response.json();

  data.forEach((vault) => {
    console.log(`${vault.name}: ${(vault.analytics.apy.total * 100).toFixed(2)}% APY`);
  });
  ```
</CodeGroup>

See the [Quickstart](/earn/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](/composer/overview).

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/earn/quickstart">
    Make your first API calls in under 5 minutes
  </Card>

  <Card title="How Earn Works" icon="diagram-project" href="/earn/how-it-works">
    Understand the data pipeline, NormalizedVault schema, and how data stays
    fresh
  </Card>

  <Card title="API Integration Guide" icon="code" href="/earn/guides/api-integration">
    Full endpoint reference with parameters and response examples
  </Card>

  <Card title="Discover and Deposit Recipe" icon="book" href="/earn/recipes/discover-and-deposit">
    End-to-end recipe: find top vaults, then deposit via Composer
  </Card>
</CardGroup>
