# Grey Ridge Signals — DeFi Yield Rotation Advisor

> Grey Ridge Signals — DeFi Yield Rotation Advisor is a paid API for AI agents from x402-data-api.sigrunner.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-21).

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.

## Facts

- Endpoint: GET https://x402-data-api.sigrunner.workers.dev/defi/yield-rotation?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/grey-ridge-signals-defi-yield-rotation-advisor-7c4e148d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yxVYjWKcIaUO6D-6B6_Rr

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 grey-ridge-signals-defi-yield-rotation-advisor-7c4e148d
```

Example prompt: 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.

## When to prefer this

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).

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## 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": [
      "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"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grey-ridge-signals-defi-yield-rotation-advisor-7c4e148d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.sigrunner.workers.dev](https://www.zero.xyz/host/x402-data-api.sigrunner.workers.dev/llms.txt)
