# Overview

## Margin System

You can have a maximum of one active position per market and per collateral. For example, you can have one MON-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:&#x20;

$$
P/L= Size \* \ Price\ Move\ (%) \pm\ Funding
$$

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](https://docs.pingu.exchange/pingu-exchange-docs/trade/positions/overview#funding).

A 20,000 MON short position entered at $1 will have a loss of 100 MON 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,000 MON position at 10× leverage has a margin of 1,000 ETH. A P/L of 500 MON would correspond to a P/L % of +50%.

{% hint style="info" %}
Profit is paid out from the corresponding stability fund or vault. If an asset vault has insufficient funds to pay out your profit, you will need to wait until there are enough funds in the vault to take profit.
{% endhint %}

## 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:

$$
FR(\Delta) = FF \cdot \max!\Big(-1, \min!\big(1, \tfrac{OI(long)-OI(short)}{MaxDelta}\big)\Big)
$$

* 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,000 MON position at 10×. The margin tied to the position is 1,000 MON. Assuming the liquidation threshold for the market is -96%, if the position's P/L reaches -960 MON, the position can be liquidated.

When a position is liquidated, its margin is transferred to the stability fund 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.&#x20;

$$
UPL > ADLthr \* (Pool Balance + Buffer Balance)
$$

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pingu.exchange/pingu-exchange-docs/trade/positions/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
