Use when open interest is elevated, leverage is concentrated near key price levels, or market depth is thinning — to detect, avoid, and opportunistically trade liquidation cascade events on HyperLiquid perpetuals.
Apply this skill whenever any of the following pre-cascade signals are present on HyperLiquid perpetual markets:
Liquidation cascades are reflexive, self-reinforcing events: forced long closures drive price down, which liquidates more longs, which drives price further down. On thin-book perpetual markets like HyperLiquid, a cascade can clear 3–8% of price in under 60 seconds with near-zero mean-reversion in the first 30 seconds.
Rule: Never hold a leveraged long into a confirmed cascade. Size aggressively to exit at the first liquidation signal, not after confirmation. Being wrong costs slippage; being right saves the position.
| Signal | Threshold | Cascade Probability Uplift |
|---|---|---|
| OI growth (24h) | > 15% | +20% |
| OI growth (24h) | > 30% | +40% |
| Funding (1h) sustained | > 0.05% for 6h+ | +25% |
| Book depth drop (bid, 0.5%) | > 30% vs 1h avg | +30% |
| Price near OI cluster | within 0.3% | +35% |
| First large liquidation fired | > $5M notional | +50% |
| CVD divergence | strong negative | +20% |
Probabilities are additive uplift estimates, not independent probabilities. When 3+ signals are simultaneously active, treat cascade risk as HIGH and apply the full defensive protocol below.
| Severity | Expected Price Drop | Duration | Recovery Pattern |
|---|---|---|---|
| Minor | 1–2% | 1–5 min | V-shape, fast recovery |
| Moderate | 2–5% | 5–20 min | Partial recovery, new lower range |
| Major | 5–10% | 20–60 min | Dead-cat bounce, re-test lows |
| Systemic | > 10% | Hours | Extended downtrend, OI reset |
GET /info → meta + assetCtxs
→ assetCtxs[i].openInterest (current OI in base asset)
→ assetCtxs[i].funding (current predicted 1h rate)
→ assetCtxs[i].markPrice (mark price for cluster proximity)
GET /info → liquidations (via WebSocket: subscribe to l2Book + trades)
→ monitor for large single-fill liquidation events
Compute OI change:
oi_change_pct = (oi_now - oi_24h_ago) / oi_24h_ago * 100
GET /info → l2Book(coin)
→ sum bid sizes within 0.5% below mid = bid_depth_near
→ compare to 1h rolling average = bid_depth_avg_1h
fragility_score = max(0, 1 - (bid_depth_near / bid_depth_avg_1h))
# fragility_score > 0.30 = dangerously thin book
def cascade_risk_level(signals: dict) -> str:
score = 0
if signals['oi_change_24h_pct'] > 30: score += 3
elif signals['oi_change_24h_pct'] > 15: score += 2
if signals['funding_elevated_hours'] >= 6: score += 2
if signals['book_fragility'] > 0.30: score += 3
if signals['near_oi_cluster']: score += 3
if signals['large_liq_fired']: score += 4
if signals['cvd_diverging']: score += 2
if score >= 8: return 'CRITICAL' # exit all longs immediately
if score >= 5: return 'HIGH' # reduce longs 50–75%
if score >= 3: return 'ELEVATED' # reduce longs 25–40%
return 'NORMAL'
| Risk Level | Score | Immediate Action |
|---|---|---|
| NORMAL | 0–2 | No change; maintain standard position monitoring |
| ELEVATED | 3–4 | Reduce long exposure 25–40%; widen stops |
| HIGH | 5–7 | Reduce long exposure 50–75%; cancel resting longs |
| CRITICAL | 8+ | Close all longs immediately via market order; pause new longs |
CRITICAL override: When
large_liq_firedsignal fires (+4 score), the CRITICAL threshold can be hit with only one other signal active. Do not wait for full scoring — execute exit the moment a confirmed large liquidation event is observed AND any one other signal is active.
Once a cascade is confirmed (price dropping > 1% in < 2 min with rising liquidation volume):
Cascades create re-entry opportunities once OI has been flushed and liquidation pressure exhausts. The post-cascade long is one of the highest-probability setups in perpetual markets.
Post-cascade re-entries use reduced initial size due to residual uncertainty about whether the cascade is fully exhausted:
re_entry_size = base_size * 0.5 # initial leg
# Add second leg when:
# price holds above entry for > 15 min AND
# OI begins rising again (new longs building = recovery confirmed)
re_entry_size_full = base_size * 1.0
Stop-loss: place below the cascade trough, not below entry — the trough is the structural low; a breach invalidates the recovery thesis.
high-funding-carry-avoidance skill's kill-switch
(funding > 0.15% AND drawdown > 1.5%) should already have reduced
exposure before a cascade fires. If it has not, treat any cascade signal
as an immediate override regardless of score.high-funding-carry-avoidance: A prerequisite check. If funding
carry avoidance has not already reduced long exposure in a high-funding
regime, liquidation cascade risk is structurally higher. Run funding
check first; cascade check is the second defensive layer.kelly-position-sizing-perps (risk/): Post-cascade re-entry sizing
must still pass through Kelly/risk-budget constraints. The 0.5× initial
re-entry is a cascade-specific overlay on top of base sizing.{
"event": "cascade_risk_assessment",
"asset": "BTC",
"timestamp_utc": "2026-04-07T22:30:00Z",
"oi_change_24h_pct": 22.4,
"funding_1h": 0.061,
"funding_elevated_hours": 7,
"book_fragility": 0.41,
"near_oi_cluster": true,
"large_liq_fired": false,
"cvd_diverging": true,
"cascade_score": 7,
"risk_level": "HIGH",
"action_taken": "reduced_long_60pct",
"position_before_usd": 15000,
"position_after_usd": 6000
}
Log this record to logs/metaclaw/records/ on every cascade assessment
that results in a position change so it enters the RL replay buffer.
Is cascade_score >= 8 OR (large_liq_fired AND any other signal active)?
├── YES → CRITICAL: market-exit ALL longs immediately. Halt new longs.
│
└── NO → Is cascade_score >= 5?
├── YES → HIGH: reduce longs 50–75%. Cancel resting long orders.
│
└── NO → Is cascade_score >= 3?
├── YES → ELEVATED: reduce longs 25–40%. Widen stops.
└── NO → NORMAL: monitor. No action required.
Post-exit: monitor for cascade exhaustion.
All 5 re-entry criteria met?
├── YES → Re-enter at 0.5× base size. Add second leg after 15m hold.
└── NO → Remain flat. Do not chase recovery.
trades channel and filter
for "liquidation": true in the trade object. HyperLiquid does not have
a dedicated liquidation stream; liquidation fills appear in the standard
trades feed with a liquidation flag.assetCtxs[i].markPrice for
liquidation cluster proximity calculations, not mid from the l2Book.marginSummary.totalRawUsd and marginSummary.totalMaintMargin ratio;
if ratio < 1.3, pre-emptively reduce all cross-margin longs regardless
of per-asset cascade score.