# DeFi Protocol Comparator

> DeFi Protocol Comparator is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.5/call, status unknown (last checked 2026-09-15).

Compares multiple DeFi protocols side by side across TVL, 7-day trend, safety score, and chain diversification

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/protocol/compare
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-09d97394
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WvRQJgfaN8hPg5jlmw-er

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 defi-shield-hazel-vercel-app-09d97394 -d '<json body>'
```

Example prompt: Can you compare Uniswap and Aave side by side — show me their TVL, 7-day trend, safety scores, and how many chains each one supports?

## When to prefer this

Use this endpoint when you need a structured, multi-dimensional side-by-side comparison of two or more DeFi protocols — especially when the user wants to evaluate TVL, safety, recent momentum, and chain coverage in a single call. Prefer this over individual protocol lookups when ranking or decision-making across protocols is the goal.

## Known failure modes

- Unknown or misspelled protocol names may return empty or partial results
- Truncated response if too many protocols are requested simultaneously
- Stale TVL or trend data if underlying DeFiLlama or similar data source is unavailable
- HTTP 402 if payment header is missing or USDC balance is insufficient
- Network timeout if upstream protocol data APIs are slow

## Output

Returns ranked comparisons of the requested DeFi protocols across four dimensions: by TVL (total value locked in USD), by 7-day percentage change, by safety score (0-100), and by chain diversification count. Also includes a full detailed comparison object per protocol with chain list, token symbol, category, and other metadata.

## Example request

```json
{
 "input": {
  "body": {
   "protocols": [
    "Uniswap",
    "Aave"
   ]
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "properties": {
      "protocols": {
       "type": "array",
       "description": "Array of 2-10 protocol names to compare"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-shield-hazel-vercel-app-09d97394/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
