What is a perpetual contract
The perpetual contract offered by Gate.io is a financial derivative suitable for virtual currencies.
The biggest difference between perpetual contracts and traditional futures is that there is no delivery date, and users can hold positions indefinitely. So it’s closer to spot trading.
Gate.io’s perpetual contracts currently support BTC and USDT.
What is demo trading
Demo trading is Gate.io feature that allows users to trade perpetual contracts in demo trading mode using demo gold. The trading page and operation method are the same as those of real trading, and marked ‘simulated trading’.
There are no actual fees incurred during the simulated trading process. The funds used in the simulation are given by the platform system, and 0.1 BTC or 3,000 USDT can be transferred daily through ‘fund transfer’, which does not affect the actual assets of the account.
The balance of the futures account cannot be transferred out to the spot account in demo trading.
The type of contract
First, explain the concept of currency types in contract trading:
Base currency, the trading target
Quote currency, used for pricing
Settle currency, account wallet
According to different currency combinations, contract types can be divided into the following two categories:
Regular Perptual Futures: The quote currency and settlement currency are the same. For example, the EOS_BTC contract (currently not open), where EOS is the base currency and BTC is the quote and settlement currency. The price is the amount of BTC that one EOS is worth. It is the simplest type, similar to the concept of spot trading, and the easiest to understand.
Inverse Contract: The base currency and settlement currency are the same. For example BTC_USD (opened). The reason for the inverse contract is that you don’t want to maintain a wallet with fiat currency (USD) and at the same time be able to trade the currency (BTC) in the wallet. That is, the relationship between buying and selling BTC with USD is reversed, and USD is still used to mark the price.
How to calculate the value and profit and loss
The calculation of position value and profit and loss varies according to the above contract types.
Inverse Contract:
- Value: position size × contract multiplier × price
- PNL: position size × contract multiplier × (close price - open price)
Inverse Contract:
- Value: position size / price
- PnL: position size × (1/entry price - 1/closing price)
The unit of position size is the lot. Long is positive, short is negative.
What is long and short
If you expect the market to rise, you go long (buy). If the market indeed rises, you profit; otherwise, you incur losses. Shorting (selling) is the opposite. Users can only have one position in the same contract.
What is leverage
Leverage allows for larger trades with the same principal. Leverage can magnify both gains and losses.
What is Initial Margin
Initial Margin is the minimum amount required to open a position.
The initial margin of the order is (order value/leverage) + opening fee + closing fee.
The initial margin for a position is (Position Value/Leverage) + Closing Fee.
What is Maintenance Margin
Maintenance Margin: The minimum amount of money you need to maintain an existing position.
The maintenance margin for a position is (position value × maintenance margin ratio) + closing fee.
Generally speaking, the maintenance margin ratio is half the last half of the maximum leverage. For example BTC_USD maximum leverage is 100 times, the maintenance margin ratio is 0.5%.
What is liquidation
If your margin balance in this position falls below the maintenance margin level, your position will be liquidated. The margin balance includes the unrealized profit and loss.
The unrealized profit and loss is the floating profit and loss calculated using the mark price as the closing price.
The mark price at which the liquidation is triggered is the liquidation price.
The forced liquidation process will be completed by the market itself, the insurance fund, and the automatic deleveraging system in turn.
Under a contract, the margin level is fixed. The initial margin is related to leverage. The higher the leverage, the lower the initial margin, and the closer it is to the maintenance margin, the easier it is to be liquidated. On the other hand, the higher the leverage, the greater the profit ratio. Risk and return are directly proportional.
There are 5 prices involved in the liquidation process:
- The opening price, the average opening price of the position
- Liquidation price, when the mark price reaches this price, the margin balance (including unrealized profit and loss) falls to the maintenance margin, which in turn triggers the forced liquidation
- The market mark price
- The bankruptcy price, which is also the order price of the liquidation order. That is, if the position is closed at this price, the closing loss is equal to the margin
- The transaction price of the liquidation order, the actual average transaction price of the liquidation order
These 5 prices and other details of the liquidation can be queried in the liquidation details page in “Liquidation History” - > “(Forced Liquidation) Records”.
For an example of a forced liquidation, let’s assume:
BTC_USD contract, the maintenance margin ratio is 0.575% (0.5% of the original maintenance margin ratio plus 0.075% of the closing commission)
The user’s position is 10,000 conts, the opening price is 5,000 USD/BTC, and the margin is 0.04 BTC.
It can be calculated: the value of the position is 10000⁄5000 = 2 BTC
The actual leverage is 2 BTC/ 0.04 BTC = 50 times
The maintenance margin is 2BTC × 0.0055 = 0.011 BTC
The liquidation price is 4930.15 USD/BTC
The bankruptcy price is 4905.64 USD/BTC.
Now, assuming the market mark price falls below the liquidation price, causing liquidation. The system will place a liquidation order at the bankruptcy price.
There are several possibilities for the actual transaction price of the liquidation order:
- If the current market maker order is tightly anchored to the mark price, the actual transaction price of the liquidation order is also near the mark price, assuming 4930 USD/BTC, which is slightly better than the bankruptcy price, then the liquidation loss is about 0.0284 BTC, the handling fee is about 0.00153 BTC, and the excess margin is about 0.04 - 0.0284 - 0.00153 = 0.01007 BTC will be deposited into the forced liquidation insurance fund.
- If the current market order is much lower than the mark price, or even lower than the order price, resulting in the liquidation order not being fully filled immediately (the “Remaining” field in the liquidation details page is not 0), then the liquidation order will be suspended. Wait for the market to rebound or be eaten by insurance funds. At this time, the transaction price of the liquidation order is equal to the bankruptcy price, and the closing loss plus the handling fee is equal to the margin.
- If the current market pending order is much higher than the mark price, or even higher than the opening price, assuming that the transaction price of the liquidation order is 5010 USD/BTC, then the liquidation profit is about 0.004 BTC, but since it is a forced liquidation, this part of the profit and the user’s margin will be charged into the forced liquidation insurance fund.
In addition, in addition to the forced liquidation caused by the change of the market mark price, there is also the possibility that the margin will be reduced due to the funding fee, which will lead to forced liquidation.
Taking the above position as an example, assuming that the contract market mark price remains unchanged and equals the opening price, which is 5000 USD/BTC, but the market transaction price is consistently higher than the mark price, resulting in a high funding rate, assuming an average of 0.001.
Assuming this user holds the position for a longer period, the position will be charged 15 times with a funding rate of approximately 2 BTC × 0.001 × 15 = 0.03 BTC in total. As a result, the user’s actual margin will drop to 0.04 - 0.03 = 0.01 BTC.
Recalculating the liquidation price with the new margin to be 5003.73 USD/BTC, which is higher than the mark price of 5000 USD/BTC, triggering a liquidation.
At this point, although the mark price has not changed relative to the opening price, the position is still liquidated due to the decrease in margin.
What is Mark Price
Gate.io the mark price is used to determine the user’s forced liquidation, rather than the intraday trading price.
The mark price is based on the weighted price of the external market, plus a decreasing funding basis over time.
Why Use Mark Price
Using the mark price can prevent malicious market manipulation and unnecessary liquidation. In addition, using the mark price can help anchor the trading price inside the order book to the external spot trading price. For example, if the external spot price is 5000, and the internal price is around 5010, it is easier to be liquidated when going long (opening a position at 5010 price). Therefore, it encourages users to go short, thus lowering the internal price closer to the external spot price.
What is the insurance fund
Forced liquidation is an order to close a position at the bankruptcy price. The bankruptcy price is the mark price when the position margin balance (including unrealized profit and loss) is only equal to the closing fee.
If the actual average transaction price is better than the bankruptcy price, then the remaining amount (i.e. the less loss-making part) will be added to the insurance fund.
If the liquidation order is still not digested by the market after the mark price breaks through the bankruptcy price, the insurance fund will be used to digest the liquidation order.
What is ADL?
In the forced liquidation, if the insurance fund is still not enough to absorb the liquidation order, the automatic deleveraging system will be enabled, and the user with the highest return will be selected from the users who hold the opposite position to reduce the position to eat the outstanding liquidation order.
The profit ranking is based on “Unrealized PnL x Leverage” (Note: If the user is in cross margin mode and there is no cross leverage limit, then the maximum leverage of the user’s position will be used).
If the user is auto-deleveraging, all unfilled orders will be cancelled first.
Gate.io webpage has a ranking indicator for the user in the ADL system. The more lights you have, the higher you rank and the more likely you are to be auto-deleveraging. If a user wishes to avoid being auto-deleveraged, he or she can close the position first and then re-open the position.
Isolated and cross
In isolated margin mode, the position margin is fixed. It starts as the initial margin, and then changes the amount of margin by adjusting the leverage, risk limit, deposit and withdrawal margin, etc. When the account margin balance is lower than the maintenance margin, the forced liquidation will be triggered. The amount of position margin is the maximum loss of the user.
In cross margin mode, all balances in the user’s account are used as margin. Users can set positions under multiple contracts to cross margin mode, and these positions share the account balance as margin. However, the unrealized profit and loss of profitable positions cannot be used as margin for other positions.
What is the risk limit?
Maintaining the margin level means leaving room for the exchange to complete forced liquidation. The lower the margin level, the smaller the space, and the higher the liquidity requirement for the exchange. In addition to exchange liquidity, there is also the factor of the number of positions subject to forced liquidation. The smaller the number, the easier the forced liquidation. A large number of forced liquidations itself will cause significant impact on the market, even directly causing dumping beyond the maintenance margin ratio. To reduce this impact, we limit the number of positions held by users, that is, the risk limit. If users want to hold more positions, they can increase the risk limit, but this will also increase the maintenance margin ratio (correspondingly, the initial margin ratio needs to be increased, that is, reducing the allowed leverage ratio).
What are the types and characteristics of delegations
What are the restrictions on the order price?
The deviation between the order price and the current mark price cannot exceed 50%. (The maximum allowable deviation ratio for the specific order price needs to be within 《Order Price Limit Description》
If the order is to reduce position, the order price cannot surpass the liquidation price.
If the order is to increase the position, the order price cannot surpass the forced liquidation price.
If the trade is executed at this price, it will not be immediately liquidated. This situation usually occurs when there is a significant deviation between the market price and the mark price. If the user still wishes to execute the trade at this price, they can try reducing the leverage and retry.
The final interpretation right of this product belongs to Gate.io.