Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Liquidation Cascade

ASecurity

Detect cascading liquidations and socialized bad debt — correlated collateral (multiple LSTs/stables), bad debt socialized across unrelated markets, oracle flash-crash triggering mass liquidation, insurance-fund depletion ordering, liquidation incentives too low to clear bad debt, and depeg cascades. Activate whenever a lending/perp/CDP protocol liquidates positions, prices collateral, or has shared-risk pools.

36 stars
0 votes
0 copies
0 views
Added 10/4/2026
blockchaingo

Security Analysis

A100/100

Scanned 10/4/2026

$npx -y skills add iktok90-design/ai-smart-contract-auditor --skill liquidation-cascade --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Liquidation Cascade?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Liquidation Cascade
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/iktok90-design-liquidation-cascade/badge)](https://www.skillsdirectory.com/skills/iktok90-design-liquidation-cascade)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: liquidation-cascade
description: Detect cascading liquidations and socialized bad debt — correlated collateral (multiple LSTs/stables), bad debt socialized across unrelated markets, oracle flash-crash triggering mass liquidation, insurance-fund depletion ordering, liquidation incentives too low to clear bad debt, and depeg cascades. Activate whenever a lending/perp/CDP protocol liquidates positions, prices collateral, or has shared-risk pools.
---

# Liquidation cascade detection

## When this applies

Trigger on any of:

- Lending / CDP / perp markets with liquidation and a liquidation bonus
- Multiple collateral assets that are correlated (stETH/rETH/cbETH, USDC/DAI/USDT)
- A single insurance fund or backstop covering many isolated or pooled markets
- Bad-debt handling that socializes losses across lenders/LPs
- Collateral priced from a feed that can flash-crash or depeg
- Liquidation incentives or close factors set by governance

## Detection patterns

### Correlated collateral, no concentration cap (HIGH)
```solidity
// stETH, rETH, cbETH all accepted, all priced off ETH-correlated feeds
collateralFactor[stETH] = 0.9e18;
collateralFactor[rETH]  = 0.9e18;
```
**Signal:** treating correlated LSTs as independent diversification. A single LST depeg (stETH 2022, or an LRT slashing event) crashes many positions at once, overwhelming liquidation throughput. Cap aggregate exposure per risk-cluster, not per token.

### Bad debt socialized across markets (HIGH)
A loss in one risky isolated market draining a *shared* insurance fund or pool that also backs blue-chip markets. **Signal:** one toxic listing can impair unrelated depositors (the Mango / cross-margin contagion class). Isolate bad debt to the originating market.

### Oracle flash-crash mass liquidation (HIGH)
```solidity
uint256 price = oracle.getPrice(collateral);   // single-block spot, no bounds
if (debt > price * collateral * cf) liquidate();
```
**Signal:** a momentary depeg / wick (or manipulated feed) marks thousands of healthy positions liquidatable in one block; liquidators race, price gaps, and survivors eat bad debt. Use TWAP / deviation circuit breakers before liquidating en masse.

### Liquidation incentive too low → stuck bad debt (MEDIUM)
If the liquidation bonus < gas + slippage to unwind seized collateral, liquidators don't act; positions go underwater and bad debt accrues silently. **Signal:** fixed small bonus on illiquid or volatile collateral.

### Insurance-fund depletion ordering (MEDIUM / HIGH)
Order of loss absorption matters: if the fund pays liquidator bonuses *before* covering bad debt, or if multiple markets draw from it without priority, a run drains it. Define and bound the waterfall.

### Depeg cascade (HIGH)
Stablecoin-collateralized debt where the stable depegs: liquidations sell the depegging asset, deepening the depeg, triggering more liquidations (UST May 2022). Flag self-reinforcing sell pressure with no circuit breaker.

## Severity rubric

| Pattern | Severity | Notes |
|---|---|---|
| Toxic-market bad debt socialized to all depositors | **High** | Cross-market contagion |
| Correlated collateral, no cluster cap | **High** | Simultaneous mass insolvency |
| Spot-oracle flash-crash mass liquidation | **High** | One-block cascade |
| Self-reinforcing depeg cascade | **High** | No circuit breaker |
| Insurance-fund waterfall ordering flaw | **Medium** | Run-depletable |
| Liquidation bonus too low → stuck bad debt | **Medium** | Slow accrual |

## Remediation patterns

1. **Isolate bad debt** per market (Compound III / Morpho-style isolation, Aave isolation mode + debt ceilings); never let a risky listing impair blue-chip depositors.
2. **Risk-cluster caps** — bound aggregate exposure to correlated assets (all LSTs as one bucket), not per-token.
3. **Circuit breakers** — pause liquidations on excessive deviation; use TWAP/median so a single wick can't mass-liquidate.
4. **Right-size liquidation incentives** to gas + realistic unwind slippage on the *actual* collateral liquidity.
5. **Define the loss waterfall explicitly** (insurance fund → socialization → governance backstop) with per-market accounting.

## False-positive notes

- A protocol with hard per-market debt ceilings and isolated collateral already bounds contagion; note rather than escalate.
- Single-collateral, deeply-liquid markets (e.g. WETH-only) carry low cascade risk.
- A bonus that looks low but on a highly liquid asset may still clear — judge against real unwind cost.

## Related

- [[oracle-redundancy]] — flash-crash protection and staleness gating
- [[oracle-manipulation]] — manipulated marks trigger false liquidations
- [[centralization-risk]] — governance-set risk params and pause keys

Attribution

iktok90-designiktok90-design
View sourceSee grades on GitHubMore from iktok90-design →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Nft Standards

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

458250 votes

Nft Standards

Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.

401990 votes

vyper-compiler

Vyper smart contract compiler internals. Use when working on the Vyper compiler codebase — compilation pipeline, Venom IR, semantic analysis, code generation, testing, or contributing. Triggers on vyper compiler development, Venom passes, AST/semantics changes, codegen work, or test writing.

51840 votes

Flash Loan Simulator

Simulate flash loan arbitrage strategies and profitability across DeFi protocols. Use when performing crypto analysis. Trigger with phrases like "analyze crypto", "check blockchain", or "monitor market".

27190 votes

On Chain Analytics

Perform on-chain analysis including whale tracking, token flows, and network activity. Use when performing crypto analysis. Trigger with phrases like "analyze crypto", "check blockchain", or "monitor market".

27190 votes
View all in blockchain →