# Macro Risk Spread — On-Chain vs Risk-Free Yield Comparison

> Macro Risk Spread — On-Chain vs Risk-Free Yield Comparison is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-15).

Returns the spread between top on-chain stablecoin yields (e.g. Aave v3 USDC on Base) and the US risk-free rate (Treasury Bills), with a verdict on whether on-chain premium is significant.

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/macro/risk-spread
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/macro-risk-spread-on-chain-vs-risk-free-yield-comparison-0f828b5a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Nc0dm5ARvDoOAAZQPf3GU

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 macro-risk-spread-on-chain-vs-risk-free-yield-comparison-0f828b5a
```

Example prompt: What's the current spread between the best on-chain stablecoin yields — like Aave v3 USDC on Base — and the US Treasury bill rate, and is the premium large enough to be worth the on-chain risk?

## When to prefer this

Use this endpoint when you need a macro-level, pre-computed comparison between the best available on-chain stablecoin yields and the current US risk-free rate, with a human-readable verdict. Ideal for agents making yield allocation decisions, reporting on DeFi market conditions, or helping users decide whether to move idle stablecoins into DeFi protocols. Prefer this over raw on-chain APY lookups when you specifically need the risk-free benchmarking context and spread calculation already done. No API key required — pay $0.005 USDC per call via x402 on Base.

## Known failure modes

- Payment not submitted or insufficient USDC balance — HTTP 402 returned with payment requirements
- On-chain data source temporarily unavailable — may return stale or partial spread data
- US Treasury rate feed unavailable — risk_free_rate_pct may be missing or cached
- No qualifying pools found above threshold — top_spreads array may be empty
- Cloudflare Worker timeout — 5xx error if upstream data aggregation takes too long

## How this service works

Credit-analyst primitive for agents: compares live top stablecoin DeFi yields (DefiLlama) against the official US Treasury Bill rate (US Treasury Fiscal Data) in one call. Returns the risk-free rate, top on-chain yields, the spread for each, and a verdict on whether on-chain yield currently compensates above risk-free. TradFi + DeFi combined — no other single endpoint does this.

## Output

Returns a JSON object with a plain-English verdict (e.g. 'ON-CHAIN PREMIUM: top stable yields exceed risk-free by >1%'), an array of top yield spreads by pool (with pool name, chain, APY %, and spread %), the risk-free rate source, and the current risk-free rate percentage.

## 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",
     "properties": {
      "min_tvl": {
       "type": "number",
       "description": "Minimum pool TVL USD, default 10000000"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "verdict": {
       "type": "string"
      },
      "top_spreads": {
       "type": "array"
      },
      "risk_free_rate_pct": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/macro-risk-spread-on-chain-vs-risk-free-yield-comparison-0f828b5a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
