Futures Trading

Step 1: Opening a Position

Action: The user opens a perpetual futures position by providing collateral in USDT and selecting leverage. The platform calculates required margin and maximum position size.

Formula:

  • MaximumPositionSize=Collateral×LeverageMaximum Position Size = Collateral × Leverage

  • RequiredMargin=PositionSizeLeverageRequired Margin = Position SizeLeverage

  • InitialMarginRatio=1LeverageInitial Margin Ratio = 1Leverage

Example:

  • Collateral: 1000 USDT

  • Selected leverage: 5x

  • Maximum position size: 1000 × 5 = 5000 USDT

  • Required margin: 5000 ÷ 5 = 1000 USDT

  • Initial margin ratio: 1 ÷ 5 = 20%

Outcome: Position is opened with specified parameters, and the required margin is locked as collateral.

Step 2: Position Management

Action: The user manages their position by monitoring and adjusting risk parameters. The platform continuously calculates position PnL and margin ratios.

Formula:

  • UnrealizedPnL=(CurrentPriceEntryPrice)×PositionSize×SideUnrealized PnL = (Current Price - Entry Price) × Position Size × Side

    • Side = -1 for shorts, 1 for longs,

  • MarginRatio=(Collateral+UnrealizedPnL)PositionSizeMargin Ratio = (Collateral + Unrealized PnL)Position Size

  • LiquidationPrice=EntryPrice×(1±MaintenanceMarginRatio×Leverage)Liquidation Price = Entry Price × (1 ± Maintenance Margin Ratio × Leverage)

    • + for shorts, - for longs

Example:

  • Entry price: 2000 USDT

  • Position size: 5000 USDT (2.5 units)

  • Current price: 2100 USDT

  • Long position PnL: (2100 - 2000) × 2,5 = 250 USDT

  • New margin ratio: (1000 + 250) ÷ 5000 = 25%

Outcome: Position status updated in real-time with current PnL and risk metrics.

Step 3: Fee Calculation

Action: The platform calculates and charges trading fees based on position size and holder status.

Formula:

  • StandardFee=PositionSize×BaseFeeRateStandard Fee = Position Size × Base Fee Rate

  • DiscountedFee=PositionSize×BaseFeeRate×(1DiscountRate)Discounted Fee = Position Size × Base Fee Rate × (1 - Discount Rate)

Example:

  • Position size: 5000 USD

  • Base fee rate: 0,1%

  • Standard fee: 5000 × 0,001 = 5 USDT

  • Additional discounts: 20%

  • Discounted fee: 5 × (1 - 0,2) = 4 USDT

Outcome: Fees are automatically deducted from the user's account.

Step 4: Position Closure

Action: The user closes their position either manually or through automated triggers (take-profit/stop-loss).

Formula:

  • RealizedPnL=(ExitPriceEntryPrice)×PositionSize×SideTotalFeesRealized PnL = (Exit Price - Entry Price) × Position Size × Side - Total Fees

  • ROE(ReturnonEquity)=RealizedPnLInitialMargin×100ROE (Return on Equity) = Realized PnLInitial Margin × 100%

Example:

  • Entry price: 2000 USDT

  • Exit price: 2100 USDT

  • Position size: 5000 USDT

  • Total fees: 8 USDT (entry + exit)

  • Realized PnL: (2100 - 2000) × 2,5 - 8 = 242 USDT

  • ROE: 242 ÷ 1000 × 100% = 24,2%

Outcome: Position is closed, PnL is realized, and funds are returned to the user's available balance.

Step 5: Position Liquidation

Action: The platform automatically liquidates a user's position if the margin ratio falls below the maintenance margin requirement to prevent insolvency.

Formula:

  • Liquidation Price (for longs):Liquidation Price=Entry Price×(1Initial Margin RatioMaintenance Margin RatioLeverage)\text{Liquidation Price} = \text{Entry Price} \times \left(1 - \frac{\text{Initial Margin Ratio} - \text{Maintenance Margin Ratio}}{\text{Leverage}}\right)

  • Liquidation Price (for shorts): Liquidation Price=Entry Price×(1+Initial Margin RatioMaintenance Margin RatioLeverage)\text{Liquidation Price} = \text{Entry Price} \times \left(1 + \frac{\text{Initial Margin Ratio} - \text{Maintenance Margin Ratio}}{\text{Leverage}}\right)

Example:

  • Entry Price: 2000 USDT

  • Position Size: 5000 USDT (2.5 units)

  • Leverage: 5x

  • Maintenance Margin Ratio: 2%

  • Liquidation price for a long position: 2000×(10.200.025)=2000×0.96=1920USDT2000 \times \left(1 - \frac{0.20 - 0.02}{5}\right) = 2000 \times 0.96 = 1920 \, \text{USDT}

  • Liquidation price for a short position: 2000×(1+0.200.025)=2000×1.04=2080USDT2000 \times \left(1 + \frac{0.20 - 0.02}{5}\right) = 2000 \times 1.04 = 2080 \, \text{USDT}

Outcome: If the market price reaches the liquidation price, the platform closes the position at the current market price.

Last updated