# Bad Debt Early-Warning Signal — Cross-Fork DeFi Lending

> Bad Debt Early-Warning Signal — Cross-Fork DeFi Lending is a paid API for AI agents from trade-production-180b.up.railway.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns positions that are liquidatable but stalled (unsellable collateral or underwater past the bonus), quantifying bad-debt-at-risk per venue and chain in real time.

## Facts

- Endpoint: GET https://trade-production-180b.up.railway.app/baddebt
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/bad-debt-early-warning-signal-cross-fork-defi-lending-d8e169f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UiZJ7fLFoDTGNf9PUYFzr

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 bad-debt-early-warning-signal-cross-fork-defi-lending-d8e169f6
```

Example prompt: Show me all positions on Base that are liquidatable but stuck — collateral unsellable or past the bonus — and tell me the total bad-debt-at-risk in USD for positions over $500 across every lending venue you're watching.

## When to prefer this

Choose this endpoint when you need to identify positions that have crossed into insolvency territory — liquidatable but impossible to clear due to unsellable collateral or bonus exhaustion — rather than simply positions at risk of liquidation. It provides a cross-fork, multi-chain aggregated view that no single-venue monitor can replicate, making it the right tool for systemic bad-debt surveillance across a lending protocol fleet.

## Known failure modes

- Invalid or unsupported chain identifier returns an error or empty result
- minUsd filter set too high may return zero results even when bad debt exists
- RPC or on-chain data latency may cause stale snapshots during network congestion
- Unknown venue data gaps if a fork is not yet tracked by the fleet

## How this service works

Insolvency / bad-debt early-warning: positions liquidatable but NOT being liquidated (unsellable collateral or underwater past the bonus), rotting into protocol bad debt. Query: ?chain, ?minUsd.

## Output

A list of positions that are liquidatable but not being liquidated (due to unsellable collateral or being underwater past the bonus), grouped by venue and chain, including each position's debt size and the total bad-debt-at-risk USD figure per venue/chain.

## 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": {}
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/bad-debt-early-warning-signal-cross-fork-defi-lending-d8e169f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from trade-production-180b.up.railway.app](https://www.zero.xyz/host/trade-production-180b.up.railway.app/llms.txt)
