Home >web3.0 >How to calculate liquidation of ok contract?

How to calculate liquidation of ok contract?

王林
王林Original
2024-07-03 16:17:18780browse

OK contract liquidation means that the position is forced to be liquidated when the profit or loss exceeds the margin, resulting in a total loss of the margin. The calculation method is: 1. Profit and loss = current price - opening price; 2. Margin rate = margin amount / number of positions; 3. Liquidation conditions: absolute value of profit and loss ≥ margin amount; 4. Liquidation loss = margin amount.

How to calculate liquidation of ok contract?

OK contract liquidation calculation method

  1. Profit and loss calculation

Profit and loss = current price - opening price

  • Positive value means profit
  • Negative value means loss
  1. Margin rate calculation

Margin rate = margin amount / number of positions

  • Margin amount: risk resistance funds
  • number of positions: current contract number
  1. liquidation conditions

absolute value of profit and loss ≥ margin amount

  1. liquidation loss

Liquidation loss = margin amount

When liquidation occurs, the entire margin is lost

Example:

Open 10 BTC contracts, the margin rate is 10%, and the margin amount is US$10,000.

Profit liquidation:

  • Current price: 20,000 USD
  • Opening price: 10,000 USD
  • Profit and loss: 100,000 USD
  • Margin rate: 100%
  • Trigger liquidation

Loss liquidation:

  • Current price: 5,000 USD
  • Opening price: 10,000 USD
  • Profit and loss: -50,000 USD
  • Margin rate: 50%
  • Trigger liquidation

The above is the detailed content of How to calculate liquidation of ok contract?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn