# Lone Star Oracle DeFi Risk Scorer

> Lone Star Oracle DeFi Risk Scorer is a paid API for AI agents from defi.lonestaroracle.xyz, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Returns a composite risk score for a DeFi protocol, including TVL, hack history, audit status, contract safety analysis, and an AI-generated risk verdict

## Facts

- Endpoint: GET https://defi.lonestaroracle.xyz/risk
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lone-star-oracle-defi-risk-scorer-e89ac7b8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_qcELefjQSkR6HRUssQ2QJ

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 lone-star-oracle-defi-risk-scorer-e89ac7b8
```

Example prompt: Before I deposit funds, can you pull the Lone Star Oracle risk score for Aave on Ethereum — I want to see the TVL, whether it's been hacked, audit status, contract safety, and the AI verdict on overall risk?

## When to prefer this

Use this endpoint when an agent needs a quick, multi-dimensional DeFi protocol risk assessment before executing a transaction, recommending a yield strategy, or advising a user on protocol safety. Preferred over generic blockchain explorers because it aggregates hack history, audit status, TVL, contract safety, and an AI verdict into a single scored response.

## Known failure modes

- Unknown or unsupported protocol returns 404 or empty result
- Protocol address not recognized on the specified chain
- Missing required query parameters returns 400 bad request
- Payment not processed results in 402 Payment Required
- Rate limiting or quota exceeded returns 429
- Stale data if protocol metadata has not been recently updated

## How this service works

DeFi protocol risk score: TVL, hack history, audit status, contract safety, AI verdict, plus current supply/lending yields (APY)

## Output

Returns a structured risk profile for the queried DeFi protocol, including its current TVL, history of security incidents or hacks, audit status (audited/unaudited/partial), contract safety indicators, and an AI-generated overall risk verdict summarizing the protocol's safety level.

## Example request

```json
{
 "address": "0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9",
 "chain_id": "1",
 "protocol": "aave"
}
```

## Request schema (JSON Schema)

```json
{
 "name": "DeFiRisk — DeFi Protocol Risk Scoring",
 "tags": [
  "defi",
  "risk",
  "protocol",
  "tvl",
  "audit",
  "security",
  "defillama"
 ],
 "type": "object",
 "version": "1.0.0",
 "category": "blockchain",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "q": {
       "type": "string",
       "title": "Q",
       "description": "Alias for protocol"
      },
      "slug": {
       "type": "string",
       "title": "Slug",
       "description": "Alias for protocol"
      },
      "address": {
       "type": "string",
       "title": "Address",
       "default": "",
       "description": "Optional contract address for GoPlus check"
      },
      "chain_id": {
       "type": "string",
       "title": "Chain Id",
       "default": "1",
       "description": "Chain ID for GoPlus (default: 1 = Ethereum)"
      },
      "protocol": {
       "type": "string",
       "title": "Protocol",
       "description": "Protocol name or slug"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  }
 },
 "description": "Protocol-level DeFi risk scoring: TVL, hack history from DeFiLlama, audit status, GoPlus contract safety, risk score 0-10 with AI assessment, plus current supply/lending APY (DeFiLlama yields) for lending/yield protocols. For agents and developers evaluating DeFi protocols before capital allocation."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lone-star-oracle-defi-risk-scorer-e89ac7b8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi.lonestaroracle.xyz](https://www.zero.xyz/host/defi.lonestaroracle.xyz/llms.txt)
