# DeFi Yield Risk Optimizer

> DeFi Yield Risk Optimizer is a paid API for AI agents from api.fadeandco.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Ranks DeFi liquidity pools by total APY from DefiLlama, filtered by chain, minimum TVL, and stablecoin preference, with TVL, 7-day impermanent loss, and reward share data per pool.

## Facts

- Endpoint: GET https://api.fadeandco.workers.dev/api/agent-intel/defi-yield-risk-optimizer?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-yield-risk-optimizer-99b91f09
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jRc9flDp2augQhtrcEsP1

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 defi-yield-risk-optimizer-99b91f09
```

Example prompt: Show me the top 10 DeFi pools on Arbitrum with at least $500,000 TVL, stablecoins only, and hide anything above 200% APY — I want to see each pool's TVL, impermanent loss risk, and how much of the yield comes from rewards.

## When to prefer this

Use this endpoint when you need a quick, ranked snapshot of DeFi yield opportunities on a specific chain with basic risk indicators (TVL, IL risk, reward share). It is ideal for agents doing yield discovery or portfolio screening without needing on-chain audit data. Prefer it over raw DefiLlama API calls when you want pre-filtered, pre-ranked results with IL and reward metadata in a single response. Do not use it as a safety oracle — it carries no audit score or exploit history.

## Known failure modes

- Invalid chain name not recognized by DefiLlama returns empty pool list or error
- Limit outside 1–20 range may return default or error
- DefiLlama upstream outage causes fetch failure
- No pools match the filter combination (e.g., stablecoin-only on a chain with no qualifying pools) returns empty array
- Extremely high minTvlUsd filters out all pools

## How this service works

Ranks DeFi pools by total APY from DefiLlama's public yields data, filtered by chain, minimum TVL and optional stablecoin-only, with each pool's TVL, 7-day impermanent loss, reward share of APY and IL-risk flag. Ranking is by APY, not by safety: there is no audit or exploit-history score (none is in this free source).

## Output

Returns a JSON array of ranked DeFi pools sorted by total APY descending, each with pool ID, symbol, project name, chain, TVL in USD, total APY percent, base APY, reward APY, reward share of APY (0–1), 7-day impermanent loss percent, stablecoin flag, exposure type, and an IL risk flag. Includes metadata: source URL, checked timestamp, applied filter values, and a disclaimer that ranking is by APY only with no audit or exploit-history scoring.

## 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": {
      "chain": {
       "type": "string",
       "description": "Chain name as DefiLlama spells it, e.g. Base, Ethereum, Arbitrum (default Base)"
      },
      "limit": {
       "type": "string",
       "description": "How many pools, 1 to 20 (default 5)"
      },
      "maxApyPct": {
       "type": "string",
       "description": "Hide pools above this APY percent (default 1000); extreme APYs are usually reward-token artefacts"
      },
      "minTvlUsd": {
       "type": "string",
       "description": "Minimum pool TVL in USD (default 1000000)"
      },
      "stablecoinOnly": {
       "type": "string",
       "description": "true to list only stablecoin pools"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "Ranked by APY only. No audit, exploit-history or contract-risk score in this source; check the protocol before using a pool.",
  "chain": "Base",
  "pools": [
   {
    "chain": "Base",
    "apyPct": 788.653,
    "ilRisk": "yes",
    "poolId": "37a01d83-3eed-407a-9703-720f632ce288",
    "symbol": "WETH-EDEL",
    "tvlUsd": 1088749,
    "il7dPct": null,
    "project": "aerodrome-v1",
    "exposure": "multi",
    "apyBasePct": null,
    "stablecoin": false,
    "apyRewardPct": 788.653,
    "rewardShareOfApy": 1
   },
   {
    "chain": "Base",
    "apyPct": 243.305,
    "ilRisk": "yes",
    "poolId": "bf599ba2-97ae-48bb-9fd0-4f647ad7a832",
    "symbol": "USDC-CBBTC",
    "tvlUsd": 6352333,
    "il7dPct": null,
    "project": "aerodrome-slipstream",
    "exposure": "multi",
    "apyBasePct": 243.305,
    "stablecoin": false,
    "apyRewardPct": 0,
    "rewardShareOfApy": 0
   }
  ],
  "source": "https://yields.llama.fi/pools",
  "checkedAt": "2026-10-23T09:35:20.466Z",
  "maxApyPct": 1000,
  "minTvlUsd": 1000000,
  "stablecoinOnly": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-yield-risk-optimizer-99b91f09/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fadeandco.workers.dev](https://www.zero.xyz/host/api.fadeandco.workers.dev/llms.txt)
