{"uid":"cap_Nc0dm5ARvDoOAAZQPf3GU","slug":"macro-risk-spread-on-chain-vs-risk-free-yield-comparison-0f828b5a","name":"Macro Risk Spread — On-Chain vs Risk-Free Yield Comparison","description":"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.","url":"https://x402-agent-store.rileycraig14.workers.dev/macro/risk-spread","method":"GET","headers":{},"bodySchema":{"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"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.09","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.09/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5-8KnJpEXEW6thyQRmWPz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.09","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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?","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:48:30.956Z","isFirstParty":false}