Derivative DEX Introduction

Published on Jul 13, 2023Updated on Apr 12, 20245 min read

The OKX Derivative DEX is a decentralized exchange built on the Ethereum Layer 2 network, featuring self-custody of funds. It integrates ZK-Rollups technology to ensure that transactions are settled on a Layer 2 network. OKX Derivative DEX employs Zero-Knowledge Proof (ZKP) technology to ensure user privacy and asset security. Assets are transferred straight from the wallet to custody via smart contracts, without any involvement from centralized third parties.
Currently, it supports the cross margin trading mode of the USDC-margined contracts, where all contracts share margins, offsetting gains and losses against each other, with settlement conducted in USDC.

1. USDC-margined Perpetual Contracts

USDC-margined perpetual contracts (OKX DEX Perpetual) are cryptocurrency contracts settled in USDC, and each contract representing a certain amount of cryptocurrency (take BTCUSDC contract for example, each contract represents 0.01 BTC). Investors can buy long or sell short to profit when the price rises or falls. Contract leverage ranges in between 0.01 to 20 times.
Taking BTCUSDC contract as an example:
Click on the image to view the full spreadsheet

Key Features Specifications
Underlying Asset BTC/USDC Index
Settlement Currency USDC
Contract Size 0.01 BTC
Index Price USDC equivalent for 1 BTC
Tick Size 0.1
Leverage 0.01-20x
Trading Hours 24/7
Funding Time Funding fees are collected on an hourly basis
Trading Fee Trading fee details (Click for more information)

2. Product Features

1. USDC-margined Contracts
USDC-margined contracts (OKX DEX Perpetual) are contracts settled in USDC. A typical user relies on fiat currency, which meets their requirements for low trading costs and simple calculations.

2. Cross Margin
Currently, OKX DEX Perpetual only supports Cross Margin.
All contracts share margin and offset each other's profits and losses to enhance capital utilization.
For example, if a user trades BTC/USDC and ETH/USDC perpetual contracts, the two positions shall share the margin and offset each other's profits and losses. If a single position generates USDC profit, it can be shared with other positions as margin, and enhance greatly on capital utilization.

3. Buy/Sell Mode
Under the buy/sell mode, each contract has only one position and it's either long or short. If a user has a long position with a positive quantity, a maker sell order will close part of his/her position. Likewise, if he/she has a short position with a negative quantity, a maker buy order will close part of his/her position.
For example, if a user holds a long position of 1 BTC and trades on BTC/USDC perpetual contracts, his/her long position shall become 0.5 BTC after a maker sell order of 0.5 BTC has been executed.

4. Expiration Date
Perpetual Contracts do not have expiration date, and thus never expire.

5. Index Price System
USDC-margined contracts are denominated in the underlying USDC index price. In order to ensure that the spot index price accurately reflects a fair spot price (that is open and transparent), it shall be calculated as weighted averages of prices taken from at least 3 mainstream exchanges by Stork (a trusted third-party oracle accessed by OKX DEX Perpetual), with additional measures for exceptional circumstances. We will ensure the index price fluctuates within a normal range even when its price is extremely volatile in a single exchange.

6. Limit System
OKX DEX Perpetual makes flexible adjustments to the price range for orders placement according to the spot price and the contract price from past minutes in order to prevent any malicious act by illicit investors, without affecting investors' usual order placement.

7. Mark Price System
OKX DEX Perpetual is adjusted based on a contract liquidation mechanism, which takes reference from the mark price for liquidation judgment in case of extreme price fluctuations, preventing investors from liquidation due to any single trade with abnormal filled price. This is to further reduce the probability of any malicious act by illicit investors. Meanwhile, OKX DEX Perpetual's mark price shall be obtained from Stork, a trusted third-party oracle, which will calculate the mark price based on the index price and the contract's best ask/offer price.

8. Tiered Maintenance Margin Ratio System
Maintenance Margin Ratio refers to the minimum margin rate required to maintain a user's current position. When the margin rate is lower than the maintenance margin ratio with closing fee rate, it may trigger a full liquidation or partial liquidation. OKX DEX Perpetual has a tiered maintenance margin ratio system, where user is limited to a certain leverage in case of a larger position and higher maintenance margin ratio.

9. Funding Fee System
Since there is no expiration date, perpetual contracts require a funding fee mechanism to anchor the contract price to the spot price. The funding fee is charged on an hourly basis and the user is only required to pay or receive a funding fee if the position is held at that moment. No funding fee is required when a position closes before the fee is charged.