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 realised PnL will be [(1,000*(1/10,500)(1/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 open derivatives positions that are settled in BTC).
For inverse contracts like BTCPERP, transaction and position values are determined using inverse price values qty/price.
A position of 1,000 contracts for BTCPERP with index price of $10,000, will be valued at 0.10BTC. Correspondingly, an increase in price to $20,000 will result in a realised PnL of 0.05 BTC = [1,000*(1/20,000)(1/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).
For positions of this size Interdax will require an extra 0.1% of margin (100,000*1e8), if positionMarginMultiplier is 1e8 (0.000001%), in addition to minimalMaintenanceMarginPercentage of 0.005 (0.5%).
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 contracts, 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 is a long position with 10 contracts, and open buy orders for 5 contracts, the maximum absolute position is 15, thus initial margin will be required for 5 contracts (1510).
 If there is a long position of 10 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 is a long position with 10 contracts, 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 has a long position of 100,000 contracts open and there are 1,000 contracts of open buy orders for BTCPERP. The mark price is $10,000.
Let’s say minimalInitialMarginPercentage is 0.01 (1%) in this example and positionMarginMultiplier is 1e8 (0.000001%) per contract.
With a maximum achievable position of 101,000 contracts, initial margin percentage will be 2.001% = (0.01 + (1e8*101,000)) = 0.01101. The absolute value of open orders that results in a position increase is 0.10 BTC (=1,000/10,000).
As a result, initial margin in this case will be = (0.01101*0.10) = 0.001101 BTC.
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 (100*1.01), or sell orders below $9,901 (10,000/1.01).
Liquidations
The availableBalance can be used for balance transfers, withdrawals, or placing new orders (the formula is displayed below).
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 0, meaning that maintenanceMargin>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, traders in long positions pay those in short positions (and vice versa).
The daily interest rate is calculated as:
The calculation for daily interest applies if bid/ask spread is below 20% and is capped to maxInterest on each side.
For example, for BTCPERP maxInterest is 0.5%, suppose the midPrice is 10,001 while the markPrice is 10,000. The daily interest rate is then 0.01%.
If midPrice is 10,060, that will result in a calculated interest rate of 0.6%, but since there is a cap of maxInterest = 0.5%, it is limited to 0.5%. The same happens if midPrice is 9,900 (the interest rate will be capped at 0.5%).
If the daily 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 the position at 0.10 BTC, the interest accumulated in one second is calculated as:
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 manipulation.
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. Order book values are combined together into an index price using a modified Hodges–Lehmann estimator.
The methodology is outlined below:
 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 (formula shown below). 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.
Our 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. Exchanges with deeper order book are given more weight,
 Takes into account the order book and not just the bestbidoffer,
 Provides continuous future transaction price estimation even if the top of the books are not updated.
The index's constituent exchanges 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.