# ChainRead Code Analysis — Smart Contract / Address Risk Scoring

> ChainRead Code Analysis — Smart Contract / Address Risk Scoring is a paid API for AI agents from api.firstmention.uk, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Analyzes a blockchain address or smart contract on Base or Ethereum and returns a risk score, severity flags, and a verdict (e.g. CAUTION) to indicate potential dangers.

## Facts

- Endpoint: POST https://api.firstmention.uk/s/chainread/code?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainread-code-analysis-smart-contract-address-risk-scoring-f1abe3ab
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RdNXQGs3ENgNtJn4AEJ0G

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 chainread-code-analysis-smart-contract-address-risk-scoring-f1abe3ab -d '<json body>'
```

Example prompt: Can you check the risk score for this Base contract address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913? I want to know if it's safe to interact with — get me the verdict and any severity flags.

## When to prefer this

Use this endpoint when you need a rapid, pay-per-call risk verdict on a specific blockchain address or smart contract on Base or Ethereum, especially when you want structured severity flags (like owner concentration risk) and a numeric score without running your own on-chain analysis. Prefer this over general blockchain explorers when you need actionable risk classification rather than raw transaction data.

## Known failure modes

- Invalid or malformed 0x address returns an error response
- Unsupported chain value (not 'base' or 'ethereum') causes validation failure
- Payment not included or insufficient USDC causes 402 Payment Required
- Address not found on specified chain may return empty flags or low confidence score
- Rate limiting or timeout on high-traffic chains may result in delayed or failed response

## How this service works

Pay-per-call HTTP APIs, paid with x402 in USDC on Base (eip155:8453): agentkit, api-change-check, basedue, basewatch, chainread, check-sanctions, chgwatch, company-facts, composite, edgar, feednews, pageaudit, solcheck, token-dd, txpreflight, walletcheck, webmd, webread, websearch, x402index. Each operation describes its service.

## Output

Returns a JSON object containing: a numeric risk score (0–100), a plain-language verdict (e.g. CAUTION, SAFE, DANGER), an array of flags each with a code (e.g. owner_holds_power) and severity (high/medium/low), the queried address, the chain, and metadata including the caller's payer address and price paid in USD.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "hash": {
   "type": "string",
   "description": "0x transaction hash (for /tx)"
  },
  "chain": {
   "enum": [
    "base",
    "ethereum"
   ],
   "type": "string"
  },
  "number": {
   "type": "string",
   "description": "Block number or 'latest' (for /block)"
  },
  "address": {
   "type": "string",
   "description": "0x address or ERC-20 contract address"
  },
  "addresses": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Up to 25 addresses (for /batch)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "risk": "medium",
  "_meta": {
   "payer": "0x...",
   "price_usd": 0.01
  },
  "chain": "base",
  "flags": [
   {
    "code": "owner_holds_power",
    "severity": "high"
   }
  ],
  "score": 45,
  "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "verdict": "CAUTION"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainread-code-analysis-smart-contract-address-risk-scoring-f1abe3ab/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.firstmention.uk](https://www.zero.xyz/host/api.firstmention.uk/llms.txt)
