# Base DeFi Yields & TVL

> Base DeFi Yields & TVL is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.0045/call, status unknown (last checked 2026-12-01).

Returns supply/borrow APYs, utilization rates, and TVL in USD for DeFi lending markets (Aave v3, Compound v3, Morpho, Moonwell) on the Base blockchain, filtered by protocol and/or asset.

## Facts

- Endpoint: GET https://1gateway.dev/v1/defi/yields?utm_source=zero.xyz
- Price: $0.0045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-defi-yields-tvl-a1e894fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qVxUrASYcmoR6jvG5d4ia

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability base-defi-yields-tvl-a1e894fb
```

Example prompt: Show me the current supply and borrow APYs for USDC across all Base lending protocols — Aave v3, Compound v3, Morpho, and Moonwell — ranked by supply yield so I can decide where to deposit.

## When to prefer this

Choose this endpoint when you need a fast, single-call comparison of lending yields across multiple Base DeFi protocols for specific assets. It is ideal for agents doing yield optimization, portfolio allocation, or DeFi research on Base specifically. Prefer it over on-chain RPC calls (which require per-protocol ABI knowledge) or general DeFi aggregators when you want Base-specific, pre-sorted, cross-protocol data in a normalized JSON format. Note that rewards/incentive APYs are excluded, so use this for base-rate comparison only.

## Known failure modes

- 400 error if an invalid protocol or asset value is passed (returned before payment, no charge)
- Stale data if on-chain block is delayed or RPC is lagged
- Missing borrow APY (null) for supply-only markets like certain Morpho vaults
- Rewards and incentive APYs are excluded — headline yield may differ from protocol UI

## How this service works

Use when an agent must compare lending yields on Base. Input: optional protocol (aave-v3,compound-v3,morpho,moonwell) and asset (USDC,WETH,cbBTC,wstETH,cbETH,EURC). Output: JSON per market supply/borrow APY, utilization, supplied/borrowed amount and TVL in USD, sorted by supply APY, with block. Computed from contract state; base rates, rewards excluded; not advice. Example: ?asset=USDC

## Output

A JSON object containing: chain identifier (Base), the queried protocols and assets, an array of market objects each with protocol name, asset ticker, contract address, supply APY %, borrow APY % (or null if not applicable), utilization %, supplied/borrowed amounts in USD, and per-market TVL in USD — sorted descending by supply APY. Also includes aggregate totals: total TVL in USD and TVL broken down by protocol, plus the Base block number and timestamp the data was computed from.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "asset": {
       "type": "string",
       "pattern": "^[A-Za-z0-9,]{1,64}$",
       "maxLength": 64,
       "description": "Comma list of the chain's assets (Base: USDC, WETH, cbBTC, wstETH, cbETH, EURC; Ethereum: USDC, USD…"
      },
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum"
       ],
       "type": "string",
       "description": "Chain (default base). Moonwell is Base only; Morpho vaults Base and Ethereum. Bad value → 400 befor…"
      },
      "protocol": {
       "type": "string",
       "pattern": "^[A-Za-z0-9,-]{1,64}$",
       "maxLength": 64,
       "description": "Comma list of aave-v3, compound-v3, morpho, moonwell (default all on the chain). Bad value → 400 be…"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "chain",
      "query",
      "count",
      "markets",
      "totals",
      "asOf",
      "cache"
     ],
     "properties": {
      "lst": {
       "type": "array",
       "items": {
        "type": "object",
        "additionalProperties": true
       }
      },
      "asOf": {
       "type": "object",
       "properties": {
        "at": {
         "type": "string"
        },
        "block": {
         "type": "integer"
        },
        "baseBlock": {
         "type": "integer"
        }
       },
       "additionalProperties": true
      },
      "cache": {
       "type": "string"
      },
      "chain": {
       "type": "string"
      },
      "count": {
       "type": "integer"
      },
      "query": {
       "type": "object",
       "properties": {
        "asset": {
         "type": "array"
        },
        "protocol": {
         "type": "array"
        }
       },
       "additionalProperties": true
      },
      "totals": {
       "type": "object",
       "properties": {
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-defi-yields-tvl-a1e894fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
