# Contract Risk API

> Contract Risk API is a paid API for AI agents from contract-risk-api-six.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Scans an EVM smart contract address on Base or Ethereum and returns an on-chain risk score by detecting upgradeable proxies and privileged functions from live bytecode.

## Facts

- Endpoint: POST https://contract-risk-api-six.vercel.app/v1/scan
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/contract-risk-api-21d760d2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JGjxSOWUjjSCYmyI0NwVi

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 contract-risk-api-21d760d2 -d '<json body>'
```

Example prompt: Can you scan the contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum and tell me if it has any upgradeable proxy patterns or privileged admin functions I should be worried about before I interact with it?

## When to prefer this

Use this endpoint when you need a quick, automated risk assessment of an unfamiliar EVM smart contract before trading, investing, or interacting with it — especially when you want to detect upgrade backdoors or privileged admin functions without performing a full manual audit. It is ideal for agent workflows that gate on-chain interactions behind a safety check.

## Known failure modes

- Invalid or non-existent contract address returns an error or empty result
- Contract not deployed on the specified chain returns a not-found error
- Unsupported chain value (other than 'base' or 'ethereum') returns a validation error
- Network or RPC timeout when fetching live bytecode
- Payment failure (x402 micropayment not processed) blocks the request

## How this service works

On-chain contract risk score: detects upgradeable proxies and privileged functions from live bytecode. Use before trading/interacting with an unfamiliar contract.

## Output

Returns a risk score and detailed flags indicating whether the contract uses an upgradeable proxy pattern and whether it contains privileged or admin-gated functions, derived from analysis of the contract's live on-chain bytecode.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum"
   ],
   "type": "string",
   "description": "Chain to query (default: base)"
  },
  "address": {
   "type": "string",
   "description": "0x-prefixed EVM contract address to scan"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/contract-risk-api-21d760d2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from contract-risk-api-six.vercel.app](https://www.zero.xyz/host/contract-risk-api-six.vercel.app/llms.txt)
