Overview
Margin System
You can have a maximum of one active position per market and per collateral. For example, you can have one ETH-margined position and another USDC-collateralized position on the same market, but you can't have two USDC-margined positions on the same market.
Each position has its own margin and leverage that you can adjust independently from other positions. One position's profit or loss does not affect your other positions.
Profit and Loss
A position's profit or loss (P/L) is equal to:
For example, a 10,000 USDC long position entered at a market price of $100 will have a profit of 2,000 USDC at $120 (corresponding to a 20% favorable price move), not including funding.
A 20 ETH short position entered at $1,000 will have a loss of 1 ETH at $1,050 (corresponding to a 5% unfavorable price move), not including funding.
Profits or losses are always calculated and paid in the same collateral asset you used for your position, regardless of whether it's a long or a short.
P/L % (percent) is calculated relative to a position's margin. For example, a 10 ETH position at 10× leverage has a margin of 1 ETH. A P/L of 0.5 ETH would correspond to a P/L % of +50%.
Funding
Funding rates are calculated every 8 hours for each market based on the open interest imbalance. If longs exceed shorts, longs pay shorts (and vice versa).
Funding is added or subtracted from a position’s unrealized PnL. Each market has a Funding Factor (FF), the yearly maximum rate when the skew is at its limit.
The formula uses MaxDelta to better reflect pool risk:
Rates are capped at ±FF
A MinFactor ensures a minimum funding even when OI is balanced
Rates are smoothed with an EMA to avoid sharp swings
Dynamic fees and rebates will further align incentives
Positive FR: longs pay shorts. Negative FR: shorts pay longs.
Liquidation
A position can be liquidated once its P/L drops below the market's liquidation threshold.
For example, a user submits a 10 ETH position at 10×. The margin tied to the position is 1 ETH. Assuming the liquidation threshold for the market is -96%, if the position's P/L reaches -0.96 ETH, the position can be liquidated.
When a position is liquidated, its margin is transferred to the liquidity pool and the position is closed. There are no liquidation fees and no other positions in your account are affected.
Auto-Deleveraging (ADL)
When unrealized profits (UPL) exceed a defined threshold, ADL is triggered. Each asset has its own ADL threshold.
A Keeper ranks all positions by UPL and starts closing the most profitable ones on the dominant side (long or short) until the threshold is no longer breached. This ensures solvency and prevents excessive imbalance in the pool.
Last updated