Perpetual Futures

PNL Settlement

5min

Sujiko utilises a PNL settlement mechanism that consists of isolated PNL pools for each market.

When a trader opens or increases a position, the average entry price is calculated and stored on-chain. When a trader closes or reduces a position, the average exit price is calculated and used to determine the profit or loss of the closed position.

Realising PNL

Realising PNL occurs when a trader closes an open position. By doing so, the unrealised PNL becomes claimable and allows the trader to withdraw or deposit the associated funds.

A trader's net PNL is the sum of all realised PNL. For instance, if a trader closes two positions, one with a positive PNL and one with a negative PNL, their net PNL is the sum of these two PNLs.

Claiming Realised PNL

To withdraw or trade a PNL, a trader must first claim it.

Each market has its own PNL pool, which includes accumulated funds from realised losses by traders. The PNL pool balance is also topped up through a proportion of trading fees. This mechanism prevents traders from withdrawing more from the platform than exists.

Thus, a trader can only claim a positive PNL if the marketโ€™s PNL pool balance has enough to cover it. Moreover, a trader can only claim a positive PNL up to a daily settlement limit, which is based on the average daily claims made by all traders including a sufficient buffer. If a trader wishes to claim more than the daily settlement limit, they will have to wait until the following day.

Realising PNL vs Claiming PNL

Sujiko's architecture is designed to prevent negative impact events from affecting the protocol. Consequently, there is a difference between closing a position (which realises unrealised PNL = realised PNL) and claiming realised PNL.

Example

  1. Trader has a position open:
    1. Market: MADLADS-PERP
    2. Direction: LONG
    3. Avg. entry price: $1,345.56
    4. Position size: 2 contracts
    5. Market PNL pool balance claim: $1,000
    6. Market PNL settlement limit per day: $5,000
  2. Mark price moves up to $1,650.25:
    1. Unrealised PNL: (Mark price - Avg. entry price) * (order size in contracts) = $1,650.25 - $1,345.56 * 2 = +$609.38
  3. Trader closes the entire position with a market sell trade (realising uPNL):
    1. Avg. entry price: $1,345.56
    2. Avg. exit price: $1,645.99
    3. Realised PNL: (Avg. exit price - Avg. entry price) * (order size in contracts) = $1,645.99 - $1,345.56 * 2 = +$600.86
  4. Trader claims his positionโ€™s realised PNL:
    1. Claim amount is below limit, trader is allowed to claim
    2. Market PNL pool balance after claim: $1,000 - $600.86 = $399.14

Recap

  1. Isolated PNL pool per market: Each market has an isolated PNL pool. Traders can only claim PNL for their position from the PNL pool associated with the market. If the balance in the pool is insufficient to cover the claim, the trader must wait until the PNL pool balance increases.
  2. Daily settlement limits: A trader can only claim up to the daily claimable limit, which is based on the average daily claims made by all traders incl. a sufficient buffer.
  3. Time delayed settlement - If a trader wishes to claim more than the daily settlement limit, they will have to wait until the following day.

๏ปฟ

Updated 25 Mar 2024
Doc contributor
Did this page help you?