margin
: The collateral allocated to the position.simualated PnL (sPnL)
: The simulated PnL based on index pricing. We want to avoid using order book liquidity here as it’s too volatile and is prone to gaming. We will start with index pricing and implementsPnL
using average bid/ask impact shortly after.pendingFundingPayment
: The next scheduled funding cost the position must pay (or funding credit if negative).minMarginRequirement:
Calculated asminMarginBps * currentNotional / 10000
.currentNotional
: The position’s size (base units) multiplied by the current index price.
side
: 1 for long, -1 for shortmargin_available
- isolated:
isolated_margin - maintenance_margin
- cross:
account_value - maintenance_margin
- isolated:
maintenance_reciprocal
:1 / maintenance_leverage
price
: the indexed oracle price of a given asset
Liquidation Process
- Market Order Close If a position (or set of positions in cross margin) falls below the minimum margin requirement, GTE issues one or more market orders to close out the necessary amount of position(s).
-
Partial Liquidation
- In cases where there isn’t sufficient liquidity to fully close a position at market, GTE will liquidate as much as possible.
- After partial liquidation, if the remaining position no longer violates the margin requirement, the trader keeps that smaller position and any associated collateral.
-
Backstop Liquidation
- If partial liquidation still does not bring the account or position above the margin threshold, the platform’s backstop mechanism (GTL) steps in.
- The remaining position is transferred to the backstop, and the user forfeits the remaining margin allocated to that position.