Liquidation happens when the position hits the liquidation price or the available margin drops below the maintenance margin. Solvency check for every position happens every hour when the funding is charged.
Similar to other crypto exchange's liquidation engines , liquidation price depends on the bankruptcy price, which is also used to calculate the maintenance margin.
For Long positions
For Short positions
Above does not hold true for 1x short position, for which both bankruptcyPrice and liquidationPrice are not calculated