Skip to main content
Earn lets your users put stablecoins and crypto to work in DeFi yield venues: Aave V3 lending markets, and yield vaults from Morpho and Euler. You pick a venue, the API builds the deposit, your user signs it, and the position is tracked with PnL from then on. Every venue looks the same to your code. A vault or an Aave market is just the venue field on one deposit call, so you can add venues without changing your integration.

Before you start

Earn runs on every chain Compass supports. See Supported Chains.

1. Find a venue

Vaults come with their APY over 7, 30 and 90 days, TVL and available liquidity. This lists USDC vaults on Base with at least a million dollars of liquidity, best 30-day APY first:
Each vault has a vault_address (what you pass when depositing), name, protocol (MORPHO or EULER), asset_symbol, apy_30d and tvl_usd. Aave markets are listed per chain, each token with its supply and borrow APY:

2. Deposit

Deposit 100 USDC from the user’s Earn Account into a vault:
The user signs transaction and sends it. Once it confirms, the position is live.

3. Track the position

Positions come back grouped as vaults, aave and pendle_pt, with a total_usd_value. Each has its current balance and usd_value, the venue’s APY, and a pnl block with total_deposited, unrealized_pnl, realized_pnl and total_pnl, plus every deposit and withdrawal with its transaction hash. How Yield Accrues explains the numbers. For one call across Ethereum, Base, Arbitrum and HyperEVM, use GET /v2/earn/positions_all.

4. Withdraw

Call manage again with action: "WITHDRAW" and the same venue. The tokens return to the Earn Account. Then send them to the user’s wallet with transfer. See Withdraw Funds.

Good to know

  • Deposit whatever the user holds. If the user holds ETH and the vault takes USDC, put a swap and the deposit in one bundle, so the user signs once. swap_quote previews the rate first.
  • Fixed rates. For a rate locked until a maturity date, see Fixed Earn. It’s the same manage call with a PENDLE_PT venue.
  • Moving between venues. A withdrawal and a deposit can run in one transaction. See Portfolio Rebalancer.
  • APYs are percentages (5.25 means 5.25%) that look back over a window. They aren’t a promise of future yield, and they’re null when there isn’t enough history yet.
  • Show only vaults users can use. Filter with min_liquidity_usd, and min_deposit_cap_usd=0 to drop paused vaults.

Endpoints

Next

Embedded Fees

Earn a fee on every deposit or withdrawal.

Gas Sponsorship

Pay gas for your users so they never need ETH.

Fixed Earn

Offer a fixed rate for a set term.