Home / Blog / KCEX

Liquidated before your stop fired? Advanced KCEX breakdown of the mark price median and stop spacing

By Updated

Key takeaway

Picture a BTC long on KCEX with a stop parked just above the liquidation price. The candle chart never touches either level, yet position history shows a liquidation. Nothing glitched. Two prices were running and the wrong one was being watched.

KCEX logo, for the post: Liquidated before your stop fired? Advanced KCEX breakdown of the mark price median and stop spacing
KCEX logo.

Advanced tier. For reference, the KCEX BTC/USDT perpetual page showed a last price of 80,379.9 USDT at about 11:04 AM ET on Wednesday, Nov 4. The math below is written as formulas, using the ones KCEX publishes in its help center, so you can plug in your own position.

Stage 1: the three inputs to KCEX mark price

KCEX defines mark price as the median of three values:

  • Funding premium = index x [1 + latest funding rate x (time to next funding / funding interval)]
  • Mid-price basis fair price = index + moving average of [(best bid + best ask)/2 - index]
  • Latest traded price

Median means the middle value. A single wild trade only wins if it lands between the other two, which is why one stray print rarely moves mark.

Stage 2: reading the median

Funding premium = index x (1 + funding rate x time left / interval). With a normal funding rate this leg sits very close to index. Mid-basis leg = index + the averaged gap between book midpoint and index. In a calm book this is also close to index. Now let a market sell sweep a thin book. The last trade prints far below both legs. Sort the three: the swept print is lowest, so the median is the middle leg, not the print. Result: last can drop sharply while mark barely moves, as long as the other two legs agree.

Stage 3: liquidation is a mark event

KCEX uses mark to decide liquidation and to compute unrealized PnL; realized PnL is not affected. The published long formula, fees excluded: Liquidation = (maintenance margin - position margin + entry x quantity) / quantity

With isolated margin at leverage L and maintenance rate m, that simplifies to: Liquidation ≈ entry x (1 - 1/L + m) So the room between entry and liquidation is about 1/L minus m. At 10x that is a little under 10% of entry; at 20x a little under 5%.

Stage 4: the race between stop and liquidation

Put a last-price stop only a sliver above liquidation. Now let a perp premium fade: index and mark slide down to the liquidation line while last is still printing slightly higher. Mark hits the line first. KCEX warns about exactly this: a last-price stop sitting very close to liquidation can lose to liquidation. The engine then takes the position over at the takeover price, which is a different number from the liquidation price, and the average close in position history is that takeover price.

Now move the stop well above the line, a clear percentage of entry rather than a sliver. If it fires, the loss is quantity x (entry - stop) before fees. As long as the stop sits above liquidation, that loss is smaller than the position margin you would lose to liquidation, and you keep control of the exit.

Stage 5: isolated vs cross

In isolated mode the liquidation price stays put as long as entry, size and margin do not change, so you can watch either mark vs that line or margin ratio reaching 100%. In cross mode the estimate moves with every other position's unrealized PnL, so margin ratio is the number to watch.

Common mistakes

  • Treating the last-price candle as the liquidation reference. KCEX lets you switch the chart to mark price above the candles; use it.
  • Placing a stop within a fraction of a percent of liquidation.
  • Reading the close price in position history as your liquidation price.
  • Treating the cross-margin liquidation estimate as fixed.
  • Forgetting the funding leg. With a large funding rate and most of the interval still ahead, the funding premium can sit far enough from index to become the median.

Short FAQ

Q: Where do I see mark price on KCEX? A: In the market overview on the futures page, next to the latest price in the order book, and as mark price candles under Futures Information.

Q: Why is my PnL red right after a fill? A: Unrealized PnL uses mark and your fill is a trade price, so a small gap appears straight away.

Q: Does mark change my realized PnL? A: No. It only affects liquidation and unrealized PnL.

The same median logic applies on $BTC.USDT, $ETH.USDT, $SOL.USDT, $XRP.USDT and $DOGE.USDT. Thinner alt books let last stray further from mark, so the stop spacing on an alt usually needs to be wider than on BTC.

Where do you keep your stop relative to liquidation on KCEX: a fixed percent, or a multiple of the day's range?

Open an account

KCEX referral promo codeKCEX

KCEX fees, review and signup details

Open KCEX

LiquidityFlow may earn a commission if you register through that link. Affiliate disclosure