Phemex employs a fair price marking mechanism. This method is also commonly used by many other crypto exchanges to prevent malicious activities or low market liquidity. The fair price is equal to the underlying index price plus a decaying funding basis rate.
MarkPrice(tNow) = IndexPrice(tNow) x (1 + LastFundingRate x RemainingTimeToNextFunding / FundingInterval)
The Phemex mark price is used to trigger liquidations and to compute unrealized PNL (profit and loss). At each funding time, the mark price will equal the index price.
The last traded price, on the other hand, counts as the current market price. It will not necessarily be the same as the index price or mark price. Please note that when a user closes a position, the realized PnL will be calculated based on the last traded price, which may differ from the unrealized PnL that was displayed. With such a dual-price mechanism, users must closely monitor the differences between mark price and last traded price to avoid unexpected losses.