# TokenGuard DeFi Hacks Database

> TokenGuard DeFi Hacks Database is a paid API for AI agents from eltociear-tokenguard.hf.space, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Returns a comprehensive list of historical DeFi/crypto hacks and exploits including dates, chains affected, attack techniques, and USD amounts lost.

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/hacks
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenguard-defi-hacks-database-bc0e4e8b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cBBaP4s1590QfIeb9R4Hu

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 tokenguard-defi-hacks-database-bc0e4e8b -d '<json body>'
```

Example prompt: Can you pull up the full list of historical DeFi hacks from TokenGuard — I want to see which protocols were hit, what chains were affected, what attack techniques were used, and how much was stolen in each case?

## When to prefer this

Choose this endpoint when you need structured historical data on DeFi/crypto security incidents, including protocol names, attack vectors, chains, and financial impact. Ideal for security research, risk assessment, due diligence on protocols, or building dashboards tracking ecosystem losses. Costs only $0.005 per call via x402 micropayment on Base.

## Known failure modes

- Payment failure: x402 micropayment of $0.005 USDC not provided or rejected — returns 402 Payment Required
- Service unavailable: Hugging Face Space may be sleeping or overloaded — returns 503
- Empty result set: no hacks match applied filters — returns empty hacks array
- Malformed request body: invalid JSON — returns 400 Bad Request

## How this service works

DeFi exploit/hack history — 574+ incidents sorted by funds lost with technique, chain, classification. Filter by minimum amount (DeFiLlama).

## Output

Returns a JSON object with an array of hack events (each with Unix timestamp date, protocol name, affected chains, attack technique such as 'Compromised Private Keys' or 'Flash Loan', and USD amount lost), plus aggregate statistics: total number of hacks (e.g. 574) and total USD lost across all incidents (e.g. $20 billion).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "description": "Max hacks to return (default 20)"
  },
  "min_amount_usd": {
   "type": "number",
   "description": "Minimum funds lost in USD"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hacks": [
   {
    "date": 1647993600,
    "name": "Ronin Bridge",
    "chains": [
     "Ethereum"
    ],
    "technique": "Compromised Private Keys",
    "amount_usd": 624000000
   }
  ],
  "total_hacks": 574,
  "total_lost_usd": 20000000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-defi-hacks-database-bc0e4e8b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-tokenguard.hf.space](https://www.zero.xyz/host/eltociear-tokenguard.hf.space/llms.txt)
