# Borrow-Curve Stress Test

> Borrow-Curve Stress Test is a paid API for AI agents from staking.halowerk.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-22).

Analyzes caller-supplied borrow-curve metrics (stressed rate, utilization shock, liquidity gap) to stress-test lending/borrowing positions and return confidence-scored classifications with explicit thresholds.

## Facts

- Endpoint: POST https://staking.halowerk.com/v1/borrow-curve-stress-test?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/borrow-curve-stress-test-900e3a00
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bTW1L27KJsKtu0S9HvRwd

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 borrow-curve-stress-test-900e3a00 -d '<json body>'
```

Example prompt: Stress test the borrow curve for Aave's USDC market — I have a stressed rate of 18.5%, a utilization shock of 35%, and a liquidity gap of 12%; run a strict analysis and tell me the risk classification and which thresholds were used.

## When to prefer this

Use this endpoint when you need a transparent, evidence-based stress test of a DeFi borrow curve that explicitly documents thresholds and flags missing data, rather than a black-box risk score. Ideal when the caller controls the evidence supply (e.g., off-chain observations or aggregated on-chain snapshots) and needs an auditable, reproducible classification. Prefer over general risk APIs when you need time-series support for metrics and strict mode enforcement of data completeness.

## Known failure modes

- Missing all required metrics returns an error or zero-confidence result
- strict mode enabled with incomplete evidence rejects the request
- Invalid metric enum values cause schema validation failure
- Evidence array with no items fails minItems constraint
- Subject string exceeding 256 characters is rejected
- Malformed ISO-8601 timestamps on evidence items cause parsing errors

## How this service works

Borrow-Curve Stress Test analyses only the evidence supplied by the caller. It does not claim to query a chain, identify a legal status or replace an independent audit. Missing signals lower confidence and are listed explicitly; every classification includes the exact thresholds used.

## Output

Returns a risk classification for the borrow curve stress scenario, the exact thresholds used to reach each classification, a confidence score, and an explicit list of any missing signals that lowered confidence. The original context labels are echoed back for correlation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "strict": {
   "type": "boolean",
   "default": false,
   "description": "Reject unless all documented metrics are supplied."
  },
  "context": {
   "type": "object",
   "description": "Optional non-secret labels returned unchanged for correlation.",
   "maxProperties": 20,
   "additionalProperties": {
    "type": [
     "string",
     "number",
     "boolean",
     "null"
    ]
   }
  },
  "subject": {
   "type": "string",
   "maxLength": 256,
   "minLength": 1,
   "description": "Address, transaction, protocol, asset, proposal or other subject being assessed."
  },
  "evidence": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "metric",
     "value"
    ],
    "properties": {
     "note": {
      "type": "string",
      "maxLength": 500
     },
     "value": {
      "type": [
       "number",
       "boolean"
      ]
     },
     "metric": {
      "enum": [
       "stressed_rate_pct",
       "utilization_shock_pct",
       "liquidity_gap_pct"
      ],
      "type": "string"
     },
     "source": {
      "type": "string",
      "maxLength": 300,
      "minLength": 1,
      "description": "Evidence source or query identifier."
     },
     "timestamp": {
      "type": "string",
      "maxLength": 40,
      "minLength": 10,
      "description": "ISO-8601 observation time."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 50,
   "minItems": 1,
   "description": "Caller-supplied observations. Repeated metrics form a time series; the newest timestamp is assessed."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/borrow-curve-stress-test-900e3a00/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from staking.halowerk.com](https://www.zero.xyz/host/staking.halowerk.com/llms.txt)
