Why Liquidation price is above mark price on my ETH perp long?

So I borrowed ETH, sold ETH spot, longed ETH perp (same size for DN and funding farming).

My surprise was seen liquidation price shifting to be above mark price(on a long position) when we are used to see that below.

Now the question is what happens in a SF scenario where ETH hits the liq price 65K?

The UI is wrong here, this issue has been fixed.

You are slightly net long, so the liquidation price should be below market.

You’re long:

  1. You borrowed 2 ETH, so you owe that much.
  2. You have 0.035 ETH spot, which means you’ve sold 1.965 ETH of the 2 you borrowed.
  3. You are net long 2 (perp) - 1.965 ETH - ~0.002 (interest on your ETH borrow) = 0.033 ETH.

If ETH hits the liquidation price, not the one shown here on the UI, but the correct one which should be close to $0, then you just get liquidated. The liquidation engine would by spot ETH, pay back your loan, unwind your perp, close your USDM loans and source new lenders for the borrowers on the other side.