# Base Contract Risk Heuristics

> Base Contract Risk Heuristics is a paid API for AI agents from automaton-tx-explainer.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Returns heuristic risk flags for a Base network smart contract using free public data, including Sourcify verification status, proxy/admin detection, owner type, dangerous function selectors, and bytecode size.

## Facts

- Endpoint: GET https://automaton-tx-explainer.vercel.app/v1/base/contract-risk?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-contract-risk-heuristics-f4480f1e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DFIOtkpKCKZxyPkhhW_kj

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 base-contract-risk-heuristics-f4480f1e
```

Example prompt: Can you check the risk flags on this Base contract — 0x4200000000000000000000000000000000000006 — and tell me if it's verified, whether it's an upgradeable proxy, and if it has any mint, pause, or blacklist functions?

## When to prefer this

Use this endpoint when you need a quick, free-data-based heuristic risk profile for a Base network contract — especially when checking for common DeFi red flags like upgradeability, dangerous selectors, and unverified source code. Prefer this over manual block explorer checks when automating contract screening at scale. Not a substitute for a formal audit.

## Known failure modes

- Invalid or non-contract address returns an error or empty flags
- Contract not deployed on Base returns not-found response
- Sourcify data unavailable leads to unverified status by default
- Rate limiting or upstream public data source outage may cause partial results
- Malformed address (not matching 0x hex pattern) rejected with validation error

## How this service works

Heuristic risk flags for a Base contract from free public data: Sourcify verification, upgradeable proxy + admin, owner type, mint/pause/blacklist/fee selectors, bytecode size. Not an audit or financial advice.

## Output

A set of heuristic risk flags for the given Base contract address, including: whether the contract is verified on Sourcify, whether it is an upgradeable proxy and who the admin is, the type of contract owner (EOA, multisig, etc.), presence of risky function selectors (mint, pause, blacklist, fee), and the bytecode size. Not a formal audit or financial advice.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Base contract address"
      }
     }
    }
   },
   "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/base-contract-risk-heuristics-f4480f1e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from automaton-tx-explainer.vercel.app](https://www.zero.xyz/host/automaton-tx-explainer.vercel.app/llms.txt)
