# PnL and closing

Source: https://docs.testnet.mog.xyz/trading/pnl-and-closing/

Markdown: https://docs.testnet.mog.xyz/trading/pnl-and-closing.md

Reviewed protocol version: 11.0.0

Protocol review date: 2026-10-30

Scope: reviewed public documentation. Numerical examples use illustrative or launch settings; they are not live quotes or a guarantee of current deployed parameters. Consult the app for current market and position values.

You can close all or part of a position. Your position size and the price move determine raw PnL; a profitable close applies Mog's **close curve**, then the settlement fee.

## How the close curve works

The close curve helps trading activity build Mog's liquidity. Larger favorable moves settle a greater share of raw profit. The share rises toward 95% at launch. The settlement fee applies afterward.

The curve also limits profit from small, short-lived distortions in oracle prices.

## Why the curve differs by market

Each market has a setting called **c**, the curve's width at 100× leverage and below. Above 100×, your position's width is c × (leverage / 100)^k. The width is fixed when the position fills. k is one setting for every market, 0.25 at launch, so the width is about 1.78 × c at 1,000×. Governance can change k without the 24-hour delay, but only while every market is at rest: every published price update on every market processed. In practice that takes seconds. A change applies only to positions that fill after it. A move equal to the width retains 47.5% of raw profit, half of 95%. A larger move retains more.

A price distortion pays per dollar of size, whatever the leverage, so the width does not narrow below 100×. Above 100×, the same move retains less at higher leverage. Select an asset and a leverage, then move across the plot to explore it. The dashed line is the same market at 100×.

Close curve

`p = a·move/(move + w)`, with `w = c·(max(leverage, 100)/100)^k` fixed at fill, k = 0.25 at launch, and a the cap retention frozen at fill (0.95 at launch). At move = w, p = a/2. Move, c and w are price fractions; 0.0189% = 0.000189. Multiply the fraction by 100 for a percentage.

Illustrative c = 0.000189 (0.0189%); this is not a live market quote or current parameter lookup. Values exclude the settlement fee.

| Favorable move | Retained at 100× | Retained at 1,000× |
| -------------- | ---------------- | ------------------ |
| 0.01%          | 32.87197%        | 21.78425%          |
| 0.0189%        | 47.5%            | 34.19383%          |
| 0.1%           | 79.89907%        | 71.10274%          |
| 1%             | 93.23781%        | 91.91092%          |

A [take-profit or stop-loss](https://docs.testnet.mog.xyz/trading/take-profit/) closes on the same curve. Test settings are labeled; values are before fees. Each position keeps the close curve it filled with.

**View the close formulas**

For a favorable price move $\Delta$ and entry leverage $\lambda$:

$$
w=c\,(\lambda/100)^k,\qquad p=\frac{a\Delta}{\Delta+w},\qquad W=p\Pi
$$

$N$ is position size and $\Pi=N\Delta$ is positive raw PnL. $W$ is profit before the settlement fee. $\Delta$, $c$ and $w$ are price fractions: 0.0189% is 0.000189. $a$ is the cap retention the position froze at fill, 95% at launch. Governance can change $a$ and $c$ for future positions only.

Losing closes realize the loss directly, limited to active collateral. On-chain rounding can slightly reduce calculated amounts.

## Closing a position

A close uses a later [oracle price update](https://docs.testnet.mog.xyz/trading/positions-and-leverage/#from-order-to-fill), so the market can move after you submit. If the price touches your liquidation price first, that closes the position instead.

If an update exceeds the oracle delivery staleness limit, it voids the pending close request. The position remains open unless a recorded barrier touch closes it. Review the position and submit a new close if needed.

A partial close reduces position size and collateral by the same proportion. The remaining position keeps its liquidation price, and its take-profit and stop-loss orders. A remainder below the minimum size, or below 1× effective leverage after rounding, triggers a full close. The close preview shows when this applies.

[Adding margin](https://docs.testnet.mog.xyz/trading/adding-margin/) leaves the profitable-close curve unchanged.

## Your balance after closing

Your remaining cash margin returns to your balance. With enough treasury cash, profit after [fees](https://docs.testnet.mog.xyz/trading/fees/) is available as cash at settlement. Only an unfunded amount enters [the payout queue](https://docs.testnet.mog.xyz/account/payout-queue/).

## During a pause

Mog can pause one market or the whole venue. A new market starts paused, and accepts orders only after Mog lifts that pause. A pause stops new orders, new fills, and new margin requests. You can still close all or part of a position, and the close settles at a later oracle update as usual. Liquidation prices, take-profits and stop-losses keep working. Deposits, withdrawals, and payout-queue payments continue. Pending orders under a pause do not fill. Anyone can void them, and the void returns their collateral and [open fee](https://docs.testnet.mog.xyz/trading/fees/).

## When a market retires

You can request a close during the market’s drain period. Once its final oracle record is posted, new close requests stop. That record settles remaining positions at their barrier or the final mark; a pending close request does not survive retirement.
