# DeFi Shield Pre-Trade Safety Check

> DeFi Shield Pre-Trade Safety Check is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Performs a comprehensive one-call pre-trade safety check on a token or contract, covering honeypot detection, contract risk, holder concentration, liquidity analysis, MEV exposure, and GoPlus security flags.

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/defi/pre-trade-check
- 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/defi-shield-hazel-vercel-app-7de42b36
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oFGrtajM75Mb4ChGUgL_M

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

Example prompt: Before I swap into this token, run a full pre-trade safety check on contract address 0xAbCd...1234 on Ethereum — I want to know if it's a honeypot, the holder concentration, liquidity depth, MEV risk, and any GoPlus flags.

## When to prefer this

Use this endpoint when an AI agent needs a single, comprehensive pre-trade safety check that aggregates multiple DeFi risk signals (honeypot, rug pull, MEV, GoPlus) in one call rather than querying multiple specialized APIs. Ideal for automated trading agents, portfolio managers, or DeFi assistants that need a fast go/no-go signal before executing a swap or investment.

## Known failure modes

- Invalid or non-existent contract address returns an error or empty result
- Unsupported chain ID returns an error indicating the chain is not supported
- GoPlus API unavailability may cause partial results or timeout
- Unverified contracts may yield incomplete risk signals
- Payment failure (x402) blocks the call entirely

## Output

Returns a structured safety report including: honeypot detection result, contract risk indicators, holder concentration analysis, liquidity metrics, MEV exposure assessment, and aggregated GoPlus security flags — plus an overall safety verdict to inform the trade decision.

## Example request

```json
{
 "input": {
  "body": {
   "chain": "base",
   "amount_usd": 1000,
   "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b1566dA3C95",
   "slippage_tolerance": 0.5
  },
  "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)"
      },
      "amount_usd": {
       "type": "number",
       "description": "Trade size in USD for MEV/slippage analysis (default: 1000)"
      },
      "token_address": {
       "type": "string",
       "description": "Token contract address (0x + 40 hex chars)"
      },
      "slippage_tolerance": {
       "type": "number",
       "description": "Your planned slippage tolerance in %"
      }
     }
    },
    "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-7de42b36/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)
