# searchHacks

**Identifier:** `defillama_searchHacks`

**Provider:** [DefiLlama](https://kirha.com/providers/defillama.md)

Search historical DeFi hack and exploit incidents. Filter by chain or bridge hacks, search by protocol name or technique. Use this for security due diligence.

## Run it with the CLI

```bash
kirha tools run defillama_searchHacks \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "defillama_searchHacks",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "bridgeHack": {
      "description": "if true, only show bridge hacks",
      "type": "boolean"
    },
    "chain": {
      "description": "blockchain name (e.g., 'Ethereum', 'BSC', 'Solana')",
      "type": "string"
    },
    "limit": {
      "default": 10,
      "maximum": 25,
      "minimum": 1,
      "type": "number"
    },
    "query": {
      "description": "protocol name, technique, or classification (e.g., 'compound', 'flash loan', 'reentrancy')",
      "type": "string"
    },
    "sortBy": {
      "default": "date:desc",
      "enum": [
        "date:desc",
        "date:asc",
        "amount:desc",
        "amount:asc"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "hacks": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": "number"
          },
          "bridgeHack": {
            "type": "boolean"
          },
          "chain": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "classification": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "returnedFunds": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "targetType": {
            "type": "string"
          },
          "technique": {
            "type": "string"
          }
        },
        "required": [
          "date",
          "name",
          "chain",
          "bridgeHack"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "hacks"
  ],
  "type": "object"
}
```

-----

[All DefiLlama tools](https://kirha.com/providers/defillama.md) · [< Back to tools list](https://kirha.com/tools.md)