The Insurance Fund grows from liquidations that were able to be executed in the market at a price better than the Bankruptcy Price of that particular position.
Every position has Liquidation Price and Bankruptcy Price.
A Liquidation Price is the price at which a position’s margin level reaches its maintenance margin level, thus triggering liquidation.
A Bankruptcy price is the price at which a position has lost all its initial margin. Bankruptcy price is a price even lower than Liquidation Price.
Therefore, during Liquidation, if DueDEX is able to liquidate the position at better than the bankruptcy price, the additional funds will be added to the Insurance Fund.
But, if DueDEX is unable to liquidate the position at the bankruptcy price, DueDEX will spend some Insurance Funds on aggressing the position in the market in an attempt to close it. If this still does not close the liquidated order, this will then lead to an Auto-Deleveraging event.
Note: DueDEX caps the percentage of Insurance Fund be used to a single liquidation.