# DeFi Liquidation Tracker — Aave Compound Maker Live Events (`gochujang/defi-liquidation-tracker`) Actor

Live liquidation events across Aave V2/V3, Compound V2/V3, MakerDAO. Liquidator, debt amount, collateral seized, USD value. Detect market stress + alpha on which oracle was wrong. PPE $0.005/liquidation.

- **URL**: https://apify.com/gochujang/defi-liquidation-tracker.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 liquidation trackeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### DeFi Liquidation Tracker — On-Chain Lending Protocol Liquidations Monitor

> Real-time **DeFi liquidation tracker** for **Aave V3, Compound V3, and Spark Protocol**. Monitor every **on-chain liquidation** event including collateral seized, debt repaid, liquidator address, and USD value. Get Telegram alerts for whale-sized **lending protocol liquidations** before the market reacts. No API key required — runs on Apify's cloud infrastructure.

**Liquidations are the most actionable forced-selling signal in DeFi.** A $1M+ Aave liquidation means a keeper bot is about to dump seized collateral on the open market — knowing this seconds after it hits the chain is the edge that separates informed traders from the crowd. This Actor surfaces that information as clean structured JSON, delivered via **Apify's reliable execution environment** with zero infrastructure setup.

***

### What does DeFi Liquidation Tracker do?

The **DeFi liquidation tracker** decodes on-chain event logs from three major Ethereum lending protocols — Aave V3, Compound V3 (Comet), and Spark Protocol — and returns every liquidation event within your configured lookback window. For each event it provides: the borrower address, liquidator bot address, collateral asset seized (with symbol and USD value), debt asset repaid, total liquidation value in USD, and a direct Etherscan link. **Apify's scheduling and persistent datasets** mean you can run this hourly with automatic alert delivery and a permanent archive of every liquidation surfaced.

Liquidation data that institutional DeFi desks pay premium data providers for is now accessible as a pay-per-use API — no subscriptions, no data engineering, no rate-limit management.

***

### Why use DeFi Liquidation Tracker?

- **Whale liquidation early warning.** Large liquidations ($500K+) on Aave or Compound are often followed by sharp price wicks as keeper bots dump seized collateral (rETH, wstETH, WBTC) on spot markets. Catch these seconds after on-chain confirmation.
- **MEV liquidator intelligence.** The same handful of addresses absorb most DeFi liquidations. Tracking the `liquidator` field across runs builds a real-time leaderboard of active MEV bots and measures how profitable liquidations currently are — a direct proxy for leverage stress in the system.
- **Risk management for DeFi positions.** Understanding when and why similar collateral types get liquidated helps you calibrate your own health factor buffers. Pair with historical data to backtest safety margins.
- **Cascade post-mortems.** After flash crashes or oracle manipulation events, reconstruct the full liquidation cascade by pulling every event in the impacted block range — essential for protocol risk analysis and insurance modeling.
- **Protocol health monitoring.** Sustained high liquidation volume signals elevated systemic leverage — a macro DeFi risk indicator used by protocol treasuries and risk committees.

***

### How to use DeFi Liquidation Tracker

1. Open the Actor on Apify Store and click **Try for free**.
2. Leave defaults for a 24-hour lookback across all three protocols with a $1,000 minimum liquidation size.
3. Click **Start** — results appear in 30–90 seconds depending on block range.
4. Review the **Dataset** tab for JSON/CSV output, or use the dataset API URL in your application.
5. For continuous monitoring, set up an Apify **Schedule** (hourly recommended) and add your Telegram credentials to `alertUsd` for real-time push alerts on whale liquidations.

***

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `includeAaveV3` | boolean | `true` | Decode Aave V3 mainnet `LiquidationCall` events |
| `includeCompoundV3` | boolean | `true` | Decode Compound V3 Comet `AbsorbCollateral` events (USDC/WETH/USDT markets) |
| `includeSpark` | boolean | `true` | Decode Spark Protocol liquidation events |
| `lookbackBlocks` | integer | `7200` | Ethereum blocks to scan (~24 hours at ~12s/block) |
| `minLiquidationUsd` | integer | `1000` | Filter out liquidations below this USD threshold |
| `sortBy` | string | `usd_desc` | `usd_desc`, `block_desc`, or `block_asc` |
| `limit` | integer | `100` | Maximum liquidation events returned |
| `alertUsd` | integer | `0` | Telegram alert threshold in USD. 0 = disabled |
| `telegramBotToken` | string (secret) | — | Bot token for whale liquidation alerts |
| `telegramChatId` | string | — | Telegram chat ID for alerts |

**Example — Last 24h whale liquidations only:**

```json
{"lookbackBlocks": 7200, "minLiquidationUsd": 100000, "sortBy": "usd_desc", "limit": 20}
```

**Example — Live hourly monitor with $500K Telegram alerts:**

```json
{
  "lookbackBlocks": 300,
  "minLiquidationUsd": 50000,
  "alertUsd": 500000,
  "telegramBotToken": "your-token",
  "telegramChatId": "your-chat-id"
}
```

***

### Output

Each row represents one on-chain liquidation event:

```json
[
  {
    "protocol": "Aave V3",
    "block_number": 19847221,
    "tx_hash": "0xabc123...",
    "timestamp": "2026-06-03T11:42:00+00:00",
    "user": "0xborrower_address...",
    "liquidator": "0xliquidator_bot_address...",
    "collateral_asset": "0xae78736cd615f374d3085123a210448e74fc6393",
    "collateral_symbol": "rETH",
    "collateral_amount": 142.3,
    "collateral_price_usd": 3920.50,
    "debt_asset": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "debt_symbol": "USDC",
    "debt_amount": 540000.0,
    "debt_price_usd": 1.0,
    "liquidation_usd": 558087.15,
    "etherscan_url": "https://etherscan.io/tx/0xabc123..."
  },
  {
    "protocol": "Compound V3",
    "block_number": 19847198,
    "tx_hash": "0xdef456...",
    "timestamp": "2026-06-03T11:38:00+00:00",
    "user": "0xborrower2...",
    "liquidator": "0xliquidator2...",
    "collateral_symbol": "WBTC",
    "collateral_amount": 1.85,
    "collateral_price_usd": 68200.0,
    "debt_symbol": "USDC",
    "debt_amount": 120000.0,
    "liquidation_usd": 126170.0,
    "etherscan_url": "https://etherscan.io/tx/0xdef456..."
  }
]
```

***

### Data fields

| Field | Type | Description |
|-------|------|-------------|
| `protocol` | string | Protocol name (Aave V3, Compound V3, Spark) |
| `block_number` | integer | Ethereum block where the liquidation occurred |
| `tx_hash` | string | Transaction hash |
| `timestamp` | string | ISO 8601 UTC timestamp |
| `user` | string | Borrower address (the account that was liquidated) |
| `liquidator` | string | Liquidator address (typically an MEV keeper bot) |
| `collateral_symbol` | string | Symbol of the collateral asset seized |
| `collateral_amount` | float | Amount of collateral seized in native units |
| `collateral_price_usd` | float | USD price of collateral at time of liquidation |
| `debt_symbol` | string | Symbol of the debt asset repaid |
| `debt_amount` | float | Amount of debt repaid in native units |
| `liquidation_usd` | float | Total USD value of the liquidation event |
| `etherscan_url` | string | Direct link to the transaction on Etherscan |

***

### Cost estimation

This Actor uses **Pay-Per-Event (PPE)** pricing at **$0.005 per liquidation event** returned.

| Scenario | Events returned | Estimated cost |
|----------|----------------|----------------|
| Calm market, 24h, >= $10K floor | ~10-30 events | **$0.05-$0.15** |
| Volatile day, 24h, >= $10K floor | ~50-200 events | **$0.25-$1.00** |
| Flash crash post-mortem, full lookback | ~200-400 events | **$1.00-$2.00** |
| Hourly monitor (30 days) at $50K floor | ~30 days x avg 5 events | **~$22.50/month** |

***

### FAQ

**Q: Which Ethereum contracts are decoded?**
Aave V3 Pool at `0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2`, Compound V3 Comet markets (USDC, WETH, USDT), and Spark Pool at `0xC13e21B648A5Ee794902342038FF3aDAB66BE987`. All mainnet addresses.

**Q: How far back can I look?**
`lookbackBlocks` is configurable. One Ethereum day is approximately 7,200 blocks (~12 seconds/block). For a 7-day lookback use `50400`. Very large lookback windows may increase run time to several minutes depending on event density.

**Q: Does this cover L2 protocols (Aave on Arbitrum, Base, etc.)?**
Currently only Ethereum mainnet is supported. L2 protocol coverage is on the roadmap.

> **Disclaimer:** Liquidation data is derived from public on-chain event logs. USD valuations use CoinGecko prices at run time and may differ from prices at the exact moment of liquidation. This is not financial advice.

***

### Live Sample Run

A real run with default settings (2026-06-10):

| Field | Value |
|---|---|
| Dataset (JSON) | `https://api.apify.com/v2/datasets/veXzNHngKOhcLqBrL/items?clean=1&format=json` |
| Dataset (CSV) | `https://api.apify.com/v2/datasets/veXzNHngKOhcLqBrL/items?clean=1&format=csv` |
| Run summary (KVS) | `https://api.apify.com/v2/key-value-stores/2UMWO9X1l0ATEVfjB/records/SUMMARY` |
| Run details | `https://api.apify.com/v2/actor-runs/EcKyYEQmdjnDNfOkY` |

***

### Related Actors

- **[Smart Money Wallet Tracker](https://apify.com/gochujang/smart-money-tracker)** — Cross-reference liquidator wallets against known whale list.
- **[Hyperliquid Whale Tracker](https://apify.com/gochujang/hyperliquid-whale-tracker)** — On-chain perp leverage stress signal.
- **[Stablecoin Depeg Monitor](https://apify.com/gochujang/stablecoin-depeg-monitor)** — Liquidations spike when stablecoin pegs slip.
- **[L2 TVL Tracker](https://apify.com/gochujang/l2-tvl-tracker)** — Macro TVL flows that precede liquidation events.

### Feedback

[Leave a review on Apify Store](https://apify.com/gochujang/defi-liquidation-tracker#reviews)

**Keywords:** DeFi liquidation tracker, on-chain liquidations, lending protocol liquidations, Aave liquidation monitor, Compound V3 liquidations, Spark Protocol liquidations, whale liquidation alert, collateral seized DeFi, MEV liquidator tracker, DeFi margin call monitor, forced liquidation crypto, liquidation cascade detector, Ethereum DeFi risk, health factor liquidation, on-chain forced selling

# Actor input Schema

## `includeAaveV3` (type: `boolean`):

Include Aave V3 LiquidationCall events from the mainnet Pool contract.

## `includeCompoundV3` (type: `boolean`):

Include Compound V3 (Comet) AbsorbCollateral events.

## `includeSpark` (type: `boolean`):

Include Spark Lending (Aave V3 fork) LiquidationCall events.

## `lookbackBlocks` (type: `integer`):

How many recent blocks to scan (1 block ≈ 12s on Ethereum). 7200 = ~24h.

## `minLiquidationUsd` (type: `integer`):

Skip liquidations below this USD value (uses Coingecko prices for valuation).

## `sortBy` (type: `string`):

Sort order for the returned liquidation events.

## `limit` (type: `integer`):

Maximum number of liquidation events to return.

## `alertUsd` (type: `integer`):

Send Telegram alert for liquidations above this USD value. 0 = disabled. Requires bot token + chat ID.

## `telegramBotToken` (type: `string`):

Telegram bot token for large-liquidation alerts.

## `telegramChatId` (type: `string`):

Chat ID to receive alerts.

## `etherscanApiKey` (type: `string`):

Bring your own Etherscan V2 API key for higher rate limits (recommended for scheduled use). Free at etherscan.io/myapikey.

## Actor input object example

```json
{
  "includeAaveV3": true,
  "includeCompoundV3": true,
  "includeSpark": true,
  "lookbackBlocks": 7200,
  "minLiquidationUsd": 1000,
  "sortBy": "usd_desc",
  "limit": 100,
  "alertUsd": 0,
  "telegramChatId": ""
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/defi-liquidation-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/defi-liquidation-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call gochujang/defi-liquidation-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gochujang/defi-liquidation-tracker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5FivkcEkX4b10mv8a/builds/nSCxNMoN7rYK4Ngnp/openapi.json
