An insurance fund is the exchange's buffer account for liquidation losses. When the risk engine closes a position and the fill is worse than the bankruptcy price, the shortfall does not go to the counterparty and does not come back to the trader. The fund pays it.
01Where the money comes from
Two streams feed it. Liquidation fees, the 0.5% to 2% charged on forced closes, flow in continuously. And when a liquidation closes better than the bankruptcy price, the remaining trader margin above zero, beyond what is returned, is swept to the fund on most exchanges. Major funds publish their balances, and the largest run to hundreds of millions of dollars, with Binance's SAFU fund reported past a billion.
02When the fund is not enough
In an extreme cascade the fund can go negative on a contract. The next defense is auto-deleveraging: the exchange force-closes profitable opposing positions at bankruptcy price until the books balance. Traders hate it because it takes away a winning position at a price that is not the market, which is why exchanges treat ADL as a last resort and publish when it fires.