# DeFi Shield MEV Risk Analyzer

> DeFi Shield MEV Risk Analyzer is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.25/call, status unknown (last checked 2026-09-14).

Analyzes MEV (Maximal Extractable Value) risk for a token trade, estimating sandwich attack probability and recommending protection strategies

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/mev/risk
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-830dda19
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Fl_j88poW2wM5hzS3EuOM

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-830dda19 -d '<json body>'
```

Example prompt: Before I swap 10 ETH for USDC on Uniswap, can you check the MEV risk and tell me the sandwich attack probability and what protection strategies I should use?

## When to prefer this

Use this endpoint when an AI agent or user is about to execute a DeFi token swap and needs to understand MEV exposure before submitting the transaction. Particularly valuable for large trades or trades on high-activity pools where sandwich attacks are common. Prefer this over generic transaction simulation when MEV-specific risk scoring and sandwich attack probability are the primary concern.

## Known failure modes

- Invalid token address returns 400 error
- Unsupported chain or DEX returns error
- Trade size not provided causes incomplete risk assessment
- Network congestion delays risk computation
- Unknown token pair may return low-confidence estimate

## Output

Returns an MEV risk assessment including a risk score, the estimated probability of a sandwich attack occurring on the trade, and specific protection strategies (such as using private mempools, slippage settings, or MEV-protected RPC endpoints) to mitigate exposure.

## Example request

```json
{
 "input": {
  "body": {
   "chain": "base",
   "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "trade_size_usd": 5000
  },
  "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": {
      "chain": {
       "type": "string",
       "description": "Chain (default: base)"
      },
      "token_address": {
       "type": "string",
       "description": "Token address for MEV risk analysis"
      },
      "trade_size_usd": {
       "type": "number",
       "description": "Trade size in USD"
      }
     }
    },
    "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-830dda19/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)
