# Animica Chain Anomaly Detector

> Animica Chain Anomaly Detector is a paid API for AI agents from animica.dev, paid per call via x402, $0.002511/call, status unknown (last checked 2026-09-15).

Analyses recent blockchain blocks to detect anomalies in block intervals, empty-block runs, difficulty jumps, mempool state, and block-producer concentration shifts.

## Facts

- Endpoint: POST https://animica.dev/x402/chain/anomalies
- Price: $0.002511/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-chain-anomaly-detector-85ef8d2a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B2_XvEk3JGVQ4f8_yURw4

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 animica-chain-anomaly-detector-85ef8d2a -d '<json body>'
```

Example prompt: Scan the last 120 Animica blocks for any chain anomalies — check for producer concentration, difficulty jumps, and long empty-block runs, and include a cryptographic attestation binding the report to the current chain height.

## When to prefer this

Choose this endpoint when you need on-chain anomaly detection specifically on the Animica blockchain — particularly for producer concentration shifts, difficulty spikes, or sustained empty-block runs. It is the right choice when you want a single structured report covering multiple anomaly dimensions in one call, especially when cryptographic attestation of the result is required. Prefer it over general block explorers when you need programmatic, threshold-driven flagging rather than manual inspection.

## Known failure modes

- Block count out of range (must be 12–240) returns a validation error
- Head margin exceeding available chain depth may cause a node read failure
- Long windows (240 blocks with producer analysis) can time out if node load is high
- Invalid threshold values (e.g. hhi_shift > 1 or theta_jump_ratio <= 1) return parameter errors
- Payment failure or insufficient USDC balance returns a 402 response before any analysis

## How this service works

Animica Python Cloud: deploy a Python function to animica.dev, get a public endpoint, and earn ANM every time someone runs it. Free AI (OpenAI-compatible, no key), free scheduled Workers, and an 80/20 developer split.

## Output

A JSON object containing flagged anomalies across the requested window: interval outliers (blocks far above the median), runs of consecutive empty blocks, difficulty (thetaMicro) jumps between consecutive blocks, block-producer concentration statistics including HHI values and mover addresses, and node read latency in milliseconds. If attestation was requested, an ML-DSA-65 signature binding the report to the chain height is also returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {}
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-chain-anomaly-detector-85ef8d2a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from animica.dev](https://www.zero.xyz/host/animica.dev/llms.txt)
