liquidation-cascadelisted
Install: claude install-skill iktok90-design/ai-smart-contract-auditor
# 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 mom