Skip to Content
Velocity ProtocolTradingProfit & Loss (P&L)

Introduction to Profit & Loss

This guide explains how to track your Profit and Loss (P&L or PnL) on Velocity to understand the performance of your open positions in perpetual markets.

What is P&L?

P&L reflects the potential profit or loss on your open positions. It’s a dynamic value that changes based on the current market price of the underlying asset compared to your average entry price. In simpler terms, it indicates whether your positions are currently trending towards profit or loss.

A user’s current position on Velocity is the cumulative sum of all their filled orders (increasing, reducing, or closing) over time. All trading lots, per market and per subaccount, are combined into a single position to determine P&L. The P&L in the table above is calculated as the difference between the position’s Entry Price with the current mark price (can toggle to oracle price) multiplied by the Size (view can be switched between $ and %).

P&L in the Positions tab is unrealised P&L (uP&L) and as such doesn’t represent actual withdrawable amount (claimed and settled P&L).

Types of P&L

  • Unrealised P&L (uP&L): Potential profit or loss on open positions based on current market price vs. your entry price. It fluctuates with the market.
  • Settled P&L: The portion of your realised profit or loss that has been transferred out of the perpetual market and applied to your USDT balance. This can happen independently of closing the position.
  • Claimable / Unsettled P&L: Claimable P&L represents the portion of unsettled P&L that is available to be claimed at this moment. It is possible to have unsettled P&L that is not claimable due to insufficient funds in the P&L Pool, invalid oracle, or other reasons.

Example:

Open a position

You open a position (e.g., buying BTC-PERP) creating unsettled P&L of $0 (no initial change). Unsettled P&L reflects the potential profit or loss based on the current oracle price compared to your average entry price. Note: Immediately after you place a position, unsettled P&L can appear as positive or negative due to market trading above or below oracle price.

Price movement affects unsettled P&L

As the price moves, the difference between the current oracle price and your cost basis creates claimable / unsettled P&L. This is the potential profit or loss on your open position.

Settling P&L doesn’t require closing the position

A settlePnl action can move your currently unrealised P&L out of the perpetual market and into settled P&L at any time, on a fully open position, no closing or reducing required. Your position itself is unaffected; only its cost basis is adjusted so the position’s exposure stays the same even though a portion of its unrealised P&L has been realised and settled. This can be done by you, your delegate, or in some cases a third party.

Closing the position also locks in P&L

Separately, when you close (or reduce) the position, the closing price is used to calculate your realised P&L, the actual profit or loss you lock in based on the difference between the closing price and your cost basis. Note: realising P&L this way does not settle it automatically. It only converts unrealised P&L into realised P&L that still sits unsettled in the perpetual market until a settlePnl action moves it out.

What is the difference between Settling P&L and Realising P&L?

The key difference lies in the availability for withdrawal:

  • Realised P&L doesn’t automatically guarantee immediate withdrawal. You need sufficient settled funds in the Market’s P&L Pool, which comes from accumulated settled losses from other users.
  • Settled P&L is the realised profit that’s already been processed and added to the pool. This is the portion you can withdraw immediately.

P&L Settlement and Withdrawal

  • Settling P&L moves profit/loss from a perpetual market to your USDT balance.
  • Requires claiming settled P&L before withdrawal.
  • P&L pool liquidity determines if settled P&L pool is claimable immediately.

Withdrawing realised P&L requires settling/claiming it first. Closing your position realizes your P&L, but it doesn’t automatically make it available for withdrawal.

How settlePNL Affects Your Position

Calling settlePNL settles a position’s negative unrealised P&L and sends it to the P&L Pool, but the position itself is unaffected. Instead, the position’s Cost Basis is adjusted so the position stays unchanged even though a portion of its unrealised loss has been realised and settled.

Velocity Perpetuals P&L Settlement Mechanism

Claiming Settled P&L

Claim settled P&L from your balances , either for specific positions or all at once.

Users can claim positive P&L when:

  1. the open position has been closed or reduced (i.e. your uP&L has been partially or wholly realised); note: this step is only necessary when the P&L pool balance is limited

  2. the market’s P&L Pool has available balances to claim; and

  3. their Cost Basis is below the Entry Price for longs or above the Entry Price for shorts.

Automatic P&L Settlement

Settling a negative unrealised P&L on someone else’s behalf requires that account to meet its settle-P&L maintenance margin requirement, and, when the market’s oracle is stale for margin purposes, only the position owner or their delegate can settle it. Settling a positive unrealised P&L on someone else’s behalf is allowed when the market’s P&L Pool has excess funds available, when the caller is the position owner or their delegate, or when the account is being liquidated and no longer holds a base position in that market. A market’s own status and pause settings can also block settlement either way.

Settling the P&L will improve the accounts health.

Last updated on