{"uid":"cap_yxVYjWKcIaUO6D-6B6_Rr","slug":"grey-ridge-signals-defi-yield-rotation-advisor-7c4e148d","name":"Grey Ridge Signals — DeFi Yield Rotation Advisor","description":"Pay-per-call market & on-chain data for Base trading agents over x402: live DeFi yields, cross-venue funding rates, token prices, Polymarket and RPC data — plus a pre-trade token-safety gate (GO/HOLD/BLOCK). No account, no API key; agents pay inline in USDC from $0.001/call.","url":"https://x402-data-api.sigrunner.workers.dev/defi/yield-rotation?utm_source=zero.xyz","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","required":["from","to"],"properties":{"to":{"type":"string","description":"DefiLlama poolId you're considering"},"from":{"type":"string","description":"DefiLlama poolId you currently hold"},"notional":{"type":"string","description":"position size in USD (default 10000)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["verdict","apy_delta_pct","risk_score_delta","rotation_cost_usd","breakeven_days","net_gain_first_year_usd","reasons"],"properties":{"reasons":{"type":"array","items":{"type":"object","required":["code","detail","field"],"properties":{"code":{"type":"string"},"field":{"type":"string"},"detail":{"type":"string"}}}},"verdict":{"type":"string"},"apy_delta_pct":{"type":"integer"},"breakeven_days":{"type":"number"},"risk_score_delta":{"type":"integer"},"rotation_cost_usd":{"type":"number"},"net_gain_first_year_usd":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"reasons":[{"code":"pickup_pays_off","field":"breakeven_days","detail":"Target pays 8.00% more APY; the rotation cost is recouped in 4d with no material risk increase."}],"verdict":"ROTATE","apy_delta_pct":8,"breakeven_days":3.4,"risk_score_delta":0,"rotation_cost_usd":7.5,"net_gain_first_year_usd":1992.5}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ApNVOGxRvDz2wl73AFrdl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two DeFi yield pools and returns a ROTATE/HOLD verdict with APY delta, risk score, rotation cost, and breakeven timeline for a given position size.","exampleAgentPrompt":"Should I rotate my $10,000 position from the DefiLlama pool 'aave-v3-usdc-base' to 'compound-v3-usdc-base'? Give me the breakeven days and whether the extra yield is worth the switching cost.","exampleUseCases":[{"title":"Yield optimization for autonomous DeFi agent","prompt":"I'm holding $25,000 in pool 'curve-3pool-ethereum' and I see 'aave-v3-usdc-base' is offering 8% more APY — tell me if the rotation cost is worth it and how many days to break even."},{"title":"Risk-adjusted pool comparison before rebalancing","prompt":"Before I move my $5,000 from DefiLlama pool 'uniswap-v3-weth-usdc' to 'morpho-blue-usdc', check whether the APY gain justifies the risk increase and switching fees."},{"title":"Automated daily yield rotation check","prompt":"Every morning, check if rotating my $50,000 position from 'lido-steth' to 'rocketpool-reth' would be profitable after costs — give me a ROTATE or HOLD verdict with the net annual gain."}],"resultDescription":"A JSON object containing: a verdict string (ROTATE or HOLD), apy_delta_pct (integer percentage difference), risk_score_delta (integer, positive means riskier target), rotation_cost_usd (estimated gas + slippage cost), breakeven_days (days to recoup switching cost), net_gain_first_year_usd (net profit after costs over 12 months), and an array of reason objects each with a code, field, and human-readable detail string.","failureModes":["Invalid or unrecognized DefiLlama poolId returns an error — ensure poolIds match DefiLlama's exact pool identifier format","Missing required 'from' or 'to' query parameters returns a 400-level error","Payment failure (insufficient USDC balance or x402 handshake failure) blocks the request","Pool data temporarily unavailable from DefiLlama upstream causes stale or error response","Very small notional values may produce nonsensical breakeven figures if rotation cost exceeds annual yield gain"],"whenToPreferThis":"Use this endpoint when an autonomous DeFi agent needs a pre-trade, economics-aware decision on whether to rotate a yield position between two specific DefiLlama pools. It is superior to raw APY comparison alone because it accounts for rotation costs, risk score delta, and breakeven horizon in a single call. Prefer it over building custom yield comparison logic when the agent needs a structured GO/HOLD signal with traceable reasons, and when paying $0.01 USDC per call without an API key is acceptable (x402 inline payment).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:34:13.215Z","isFirstParty":false,"canonicalSlug":"grey-ridge-signals-defi-yield-rotation-advisor-7c4e148d"}