Defx Docs
Go to WebsiteTrade on Defx
  • About Defx
  • Defx Platform Overview
    • Self-Custodial
    • Central-Limit Order Book (CLOB)
    • APIs & Webhooks
  • Defx Product Docs
    • Orders
    • Margin
    • Liquidation
    • Insurance Fund
    • Auto-Deleveraging
    • Just-in-Time (JIT) Funding
    • Self Trade Prevention
    • Price Oracle
    • Fees
    • Multi-Asset Mode
      • Collateralization & Liquidation Ratios
      • Liquidation in Multi-Asset Mode
    • Glossary
  • Defx Smart Contracts
  • Contract Specifications
  • Defx Developer Hub
    • REST APIs Documentation
      • REST API Postman Collection
    • WebSocket Documentation
      • User Data Streams (Closed Socket)
      • MarketFeed Streams (Open Socket)
  • Referrals
  • Points
  • Using our Testnet
  • Audits
  • Risks
  • Restricted Territories
  • Terms & Conditions
  • Features
    • Trade Smarter: How Defx's Multi-Asset Collateral System Transforms Crypto Trading
    • sUSDe support
Powered by GitBook
On this page
  • Margin Ratio
  • Account Equity
  • Unrealized PnL (Account)
  • Unrealized PnL (Position)
  • Maintenance Margin
  • Net Funding
  • Buying Power
  • Liquidation Price
  • Total Notional
  • Open Interest
  • Max Slippage
  1. Defx Product Docs

Glossary

This section provides an overview of key terms related to the Defx perpetual trading application. For in-depth explanations and additional details, relevant links are included where applicable.

PreviousLiquidation in Multi-Asset ModeNextDefx Smart Contracts

Last updated 7 months ago

Margin Ratio

Defx defines margin ratio at the position level. In ISO mode, a position's margin ratio is the maintenance margin of the position divided by the total margin available. Closer a position's margin ratio is to 100, the position is close to liquidation. It is vital to monitor an account's margin ratio and add margin to the position as necessary in order to prevent the ISO position from being liquidated.


Account Equity

Account Equity refers to the total value of a trading account, calculated by adding any unrealized profits or losses from open positions to the initial account balance. Account Equity represents the current worth of an account if all positions were closed at the market prices, providing a real-time snapshot of the trader's financial standing within the account. It is a crucial figure for understanding one's trading capital health, margin requirements, and potential for new trades.


Unrealized PnL (Account)

Account level unrealized PnL is the sum of PnL across all currently open perp positions. This amount represents both settled and unsettled amounts from all perp positions.


Unrealized PnL (Position)

Unrealized PnL (Position) refers to the profit or loss of an individual trading position that has not yet been settled. This figure is periodically updated to reflect changes in the market price of the asset since the position was opened.


Maintenance Margin

Maintenance Margin is the minimum amount of equity required to keep a trading position open. It ensures traders maintain sufficient collateral to cover potential losses, thereby preventing involuntary liquidation of positions.

For more details, please refer to the section of our product docs


Net Funding

Net Funding refers to the total amount of funding payments a trader either receives or pays over a specific period for holding a perpetual contract position. These funding payments occur periodically to align the perpetual contract's price with the spot price of the underlying asset. Positive net funding indicates that a trader is receiving payments, typically when the perpetual contract price is below the spot price, while negative net funding indicates that a trader is making payments, usually when the perpetual contract price is above the spot price.


Buying Power

Buying Power refers to the maximum amount of leverage a trader can utilize to enter new positions, given their current account equity and margin requirements. It determines the total value of assets a trader can buy or trade. The formula to calculate Buying Power is as follows:

Where:

  • Account Equity is the total value of a trading account

  • Maintenance Margin is the minimum amount of equity required to keep existing positions open

  • Initial Margin Requirement is the margin needed to open a new position


Liquidation Price

The Liquidation Price is the specific market price at which a trader's position is automatically closed by the exchange to prevent further losses that exceed the account's maintenance margin. This mechanism is triggered to ensure that the trader's account does not fall into a negative balance.


Total Notional

Total Notional refers to the total value of all open positions held by a trader, calculated by summing the notional values of each individual position. The notional value of a position is determined by multiplying the quantity of the asset by its current market price. This metric provides a comprehensive view of the overall exposure a trader has in the market.

The formula to calculate Total Notional is:

Where:


Open Interest

Open Interest refers to the total number of outstanding contracts or positions in a particular market that have not been settled or closed. It is a crucial metric in perpetual trading, providing insight into the level of activity and liquidity in the market. Open Interest is calculated by summing all open long and short positions in a specific contract or asset


Max Slippage

Max Slippage refers to the maximum allowable difference between the expected execution price of a trade and the actual price at which the trade is executed. It is crucial for managing execution risk, especially in volatile markets.

For Market Orders, Max Slippage is the highest price deviation a trader is willing to accept when executing a trade at the current market price. This setting helps control the extent of price movement during the immediate execution of the order.

For IOC Orders, Max Slippage determines the maximum acceptable price deviation for the portion of the order that can be immediately filled. Any part of the order that cannot be filled within this price range will be canceled.


(AccountEquity−MaintenanceMargin)/InitialMarginRequirement(Account Equity - MaintenanceMargin)/InitialMarginRequirement(AccountEquity−MaintenanceMargin)/InitialMarginRequirement

For more information on how we handle liquidations and how we calculate the liquidation price, please refer to the section in our product docs.

∑(Quantityi×MarkPricei)∑(Quantity_i×Mark Price_i)∑(Quantityi​×MarkPricei​)

QuantityiQuantity_iQuantityi​​ is the amount of the i-th asset held in the position.

MarkPriceiMarkPrice_iMarkPricei​ is the current mark price of the i-th asset.

Margin
Liquidation
Page cover image