Similarly to other large exchanges, Scalpex does not use the last price for triggering liquidation events, in order to avoid unnecessary liquidations in highly leveraged products, which may happen when the price swings relatively to the index price, the market is illiquid or is being manipulated. Instead we use the mark price.
The mark price is the index price including correction, which is used to determine the liquidation level.
This can temporarily vary from the actual perpetual market prices for the purpose of protection against manipulative trading.
Let’s see the mark price calculation. We start with determining a “fair price”. This fair price is calculated as the average of the fair impact bid and fair impact ask price.
The fair impact bid is the average price of a 1 BTC size market sales order or the best bid price – 0.1%, whichever has a greater value.
The fair impact ask price is the average price of a 1 BTC size market purchase order or the best offer price + 0.1%, whichever has a lower value.
Fair Price = (Fair Impact Bid + Fair Impact Ask) / 2
The mark price is derived using both the index price and the fair price, by adding to the Scalpex index the 30 seconds exponential moving average (EMA) of the fair price – index price.
Mark Price = Index Price + 30 seconds EMA (Fair Price – Index Price)
The 30 seconds EMA is recalculated every second, so there are in total 30 time periods, where the measurement of the latest second has a weight of 2 / (30 + 1) = 0.0645 or (6.45%)
The mark price and the fair price is actually where funding comes from.
Funding takes place when the mark price differs significantly from the Scalpex index price. Depending on which side encounters the swing – we keep the Mark Price ~ Index Price in balance with the funding mechanism you can read about below.
Service d'assistance aux clients par UserEcho