šŸ“„Perpetual Trading Specifications

Equations

Margin

BBOX utilizes a cross-margin model and the concept of Health to evaluate account values.

  • Health(weight) = Weighted Collateral value + āˆ‘((SiƗPiƗWeight)āˆ’SiƗPentry))\sum{((Si Ɨ Pi Ɨ Weight)- Si Ɨ Pentry))}

    or Weighted Collateral value + āˆ‘((SiƗPiƗ(Weightāˆ’1))+Pnl))\sum{((Si Ɨ Pi Ɨ (Weight-1)) + Pnl))}

    or = Weighted Account Value - margin requirements(weight)

  • Collateral value = āˆ‘(SiƗPiƗWeight)\sum{(Si Ɨ Pi Ɨ Weight)}

  • Initial Health = Health(initial weight) ~= Free Collateral to open position

    • If Initial Health < 0, accounts cannot open new positions.

    • Initial weight = 1-initial margin ratio if long, initial margin ratio if short

  • Maintenance Health = Health(maintenance weight) ~= Free Collateral until liquidation

    • If Maintenance Health < 0, accounts can be liquidated.

    • Maintenance weight = 1-maintenance margin ratio if long, maintenance margin ratio-1 if short

  • Account Value = Assets + Unsettled Pnl

Funding Payment

BBOX uses an efficient block-based funding payment mechanism which settles when there are market actions instead of hourly or every 8 hours. The funding rate shown in UI is the hourly rate of the current block for readability.

Fees

  • trading fee = 0.1%

  • 80% earned by LPs and 20% goes to insurance fund to support system health.

Leverage

  • max account leverage: 1InitialMarginRatio\frac{1}{Initial Margin Ratio} = 10x currently.

Liquidation discount

  • liquidator discount (reflected in liquidation price)

    • Long: oracle_priceāˆ—(maintenance_asset_weight+1)2\frac{oracle\_price * (maintenance\_asset\_weight + 1)} {2}

    • Short: oracle_priceāˆ—(maintenance_liability_weight+1)2\frac{oracle\_price * (maintenance\_liability\_weight + 1)} {2}

    • With a 0.9 and 1.1 weight, this means a 5% discount from the oracle price

Last updated