Trading principles on Interdax are designed to give the most flexibility to market participants while keeping it as simple as possible.
The margining system allows users to enter derivatives positions like the Bitcoin perpetual swap, where the gains or losses are instantly settled into the corresponding underlying cryptocurrency without closing positions.
Perpetual Contracts
The value of derivatives positions are determined using mark price at all times, while limit price or fill prices are used only for determining PnL.
For example, if one has 1 BTC in the account initially, and then enters a long position of 1,000 BTCPERP contracts at a price of $9,998 while the mark price is $10,000, then the account balance will immediately become 1.002 BTC (1+(1/1000)*(10,0009,998)), since trades occurred at a price that was lower than the mark price.
Let’s say mark price increased from $10,000 to $10,500, then the balance will become 1.00478 BTC since the PnL will be (1,000*(1/10,5001/9,998)) = 0.00478 BTC, while the position is still open because of instant settlement.
Finally, when the position gets closed at $10,501 while market price is $10,500, that will leave 1.00479 BTC in the account and will remain unchanged from there on (if there are no more derivatives positions open that are settled in BTC).
For inverse contracts like BTCPERP, transaction and position values are determined using inverse price values qty/price. 1,000 contracts of BTCPERP with index price of $10,000, will be valued at 0.1BTC. Correspondingly increase in price to $20,000 will result in a PnL of 0.05 BTC (1,000*(1/20,0001/10,000)).

Maintenance Margin
In order for derivatives positions to remain open, corresponding maintenanceMargin is required.
maintenanceMargin = (minimalMaintenanceMarginPercentage + positionMarginMultiplier * maximumAbsolutePosition) * absolute position value
Maintenance margin is calculated based on a certain percentage (minimalMaintenanceMarginPercentage) and increases proportionally with the positionMarginMultiplier up until the maximum position that can be achieved.
For example, if there is a 100,000 contract (either long or short) position in BTCPERP with a mark price of 10,000, the absolute value of that position will be 10 BTC (100,000/10,000), and for positions of this size Interdax will require an extra 0.1% of margin (100,000*1e8), if positionMarginMultiplier is 1e8, in addition to 0.5% minimalMaintenanceMarginPercentage. Thus maintenance margin for the aforementioned position will be 0.06 BTC = ((0.5%+0.1%)*10 BTC).
If the position increases to 200,000, maintenance margin will correspondingly be increased to 0.14 BTC = ((0.5%+0.2%)*20 BTC). The larger the position, the larger fraction of its value will be required in order to accommodate for risks of liquidating large positions.
If there is not enough balance to cover maintenanceMargin, positions will be liquidated.

Initial Margin
In order for new derivatives orders to be submitted or existing orders to remain open, corresponding initialMargin is required.
initialMargin= (minimalInitialMarginPercentage + positionMarginMultiplier * maximumAbsolutePosition) * absolute value of open orders that result in position increase
The initial margin is determined by the maximum absolute position that can be achieved if some of the open orders are filled. For example:
 If there are 10 contract long position, and open buy orders for 5, the maximum absolute position can become 15, thus initial margin will be required for 5 contracts (1510).
 If there is a position of 10 long contracts and 15 contracts of open sell orders, there is no initial margin required as the absolute position can only decrease in this case.
 Finally, if there are 10 contract long position, 30 contracts of sell orders and 5 contracts of buy orders, the maximum absolute position that can be achieved is 20 (when sell orders for 30 contracts gets filled), thus initial margin will be required for 10 contracts (2010).
Initial margin is calculated based on a certain percentage (minimalInitialMarginPercentage) and increases proportionally with positionMarginMultiplier up until the maximum position that can be achieved.
For example, suppose a trader wants to open a long position of 1,000,000 contracts and there were 1,000 contracts of open buy orders for BTCPERP with a mark price of $10,000.
Let’s say minimalInitialMarginPercentage is 0.01 (1%) in this example and positionMarginMultiplier is 1e8 per contract. With a maximum achievable position of 1,001,000, initial margin percentage will be 2.001% = 0.01 + 1e8*1,001,000, while the value of open orders that result in position increase is 0.1 BTC. As a result, initial margin in this case will be 0.002001 BTC = (0.01+0.002*101,000)*(1,000*(1 BTC/10,000)).
If there is not enough balance to cover initialMargin, open orders will be cancelled.

Trading Bands
The limit price for market orders will be set in accordance with these bands. Limit price will be enforced for new orders and unfilled orders that are left outside of the band will get cancelled.
Trading is not allowed to happen outside of minimalInitialMarginPercentage around current mark price for derivatives. Correspondingly if current mark price is $10,000 and minimalInitialMarginPercentage is 1%, no buy orders can exist or get filled above $10,100, or sell orders below $9,901 (10,000/1.01).
Liquidations
The availableBalance formula is displayed below and can be used for balance transfers, withdrawals, or placing new orders.
As soon as available balance is about to drop below 0 due to mark price changes of derivatives positions instantly reflected in marketBalance, the following actions will be taken:
 All open orders for derivatives positions that affect this particular settlement currency will be cancelled, resulting in hold=0 and initialMargin =0 (since there are no more open orders).
 If availableBalance is still going to be below zero, meaning that initialMargin>marketBalance, all relevant positions with the remaining marketBalance will get liquidated by being taken over into the insurance fund.
For example, consider a scenario when there are open positions and orders for BTCPERP, and availableBalance is going to go under 0 due to losses in a BTCPERP position. In this case, all open BTCPERP orders will get cancelled first. If availableBalance for BTC remains below maintenanceMargin, BTCPERP positions will be taken over by the insurance fund for liquidation. Positions and balances in other assets will remain untouched as well as everything in other subaccounts.
Interest Payments
For perpetual swap products, Interdax continuously calculates and compounds interest payments for each position multiple times per second. When the interest rate is positive, long positions pay to short positions and vice versa.
The daily interest rate is calculated as:
(If bid/ask spread is below 20% and is capped to maxInterest on each side).
For example, if maxInterest is 0.5%, midPrice is 10,001 while markPrice is 10,000, the interest rate will be 0.01. If midPrice is 10,060, that will result in a calculated interest rate of 0.6%, but that will be limited to 0.5%. The same happens if midPrice is 9,900 (the interest rate will be still limited to 0.5%).
If the interest rate is 0.01%, and a user has an open short position of 1,000 contracts of BTCPERP with mark price of 10,000 that values position at 0.1 BTC, interest accumulated in one second will be
As soon as accumulated payments exceed the minimal accounting threshold, they are applied to the user’s balance.
Indices and Valuations
Indices
Interdax has developed a methodology for determining the index prices for bitcoin that is robust to outliers and manipulations. The top five order book levels of each constituent exchange is used as a source of data for the calculations. Any exchange’s API that has not been online for over 30 seconds is excluded from the calculations. The order book values are combined together into an index price using a modified Hodges–Lehmann estimator.
The methodology is the following:
 The best five ask and bid levels are taken from constituent exchanges that have had data available for the last 30 seconds.
 Microprice is calculated for all bid and ask pairs across exchanges. For example, if there are five exchanges, that will give us 25 bids and 25 asks that form 625 pairs.
 The median of microprices is then calculated.
This estimator has the following advantages:
 It is very robust to outliers (up to 29% of market data points can be complete junk or manipulated without impacting the index),
 Liquidity of exchanges is taken into account, thus exchanges with thicker order book are given more weight,
 Takes into account order book and not just the BBO,
 Provides continuous future transaction price estimation even top of the books are not updated.
Exchanges used to calculate the index for BTCPERP are:
Valuations

Methodology
Every single derivative has a valuation markPrice that is based on the corresponding indexPrice .
At the current stage, for all derivatives markPrice= indexPrice, however, it is subject to change depending on market requirements and instrument types.

Propagation
Valuations are propagated only after all account bankruptcies and liquidations are resolved.
Commissions
Commissions and rebates are paid in BTC.
Passive orders (liquidity providers) are always paid 0.025% of the value of the transaction.
Aggressive orders (liquidity takers) are charged 0.075% of the value of the transaction.