VELA Knowledge Base
  • Exchange
    • Platform Overview
    • Account Setup
      • Deposit & Withdraw
      • 1-Click Trading
    • Staking
      • $VLP
      • $VELA and $esVELA
      • Rewards
      • Hyper VLP
        • Hyper VLP Legacy
        • Hyper VLP 2.0
    • Trading
      • Positions
        • Profit, Loss, and ROI
        • Increase Collateral/ Leverage
        • Add to Position
        • Triggered Orders
        • Edit Triggered Orders
        • Close Position
      • Chart Trading
      • Mobile
    • Platform Mechanics
      • Fees
      • Price Feeds
      • Risk Mitigation
    • Tokenomics
    • Restricted Countries
  • Community
    • Grand Prix Trading Competition
      • Credits
      • Missions & Streaks
      • Nitro Boost
    • Social Features
      • Referrals
      • Share Trade
      • Leaderboards
      • AstraBit Guide
      • Previous Events
        • Pirate's Loot Trading Competition
    • NFTs
  • Support
    • Resources (Links)
    • Brand Kit
    • Gnosis Safe Management
  • Developers
    • APIs
      • The Graph API
      • Trade Bots API
      • Market Maker API
    • Asset Pairs and VelaId
    • Contracts
      • Arbitrum Mainnet
      • Arbitrum Testnet
      • Base Mainnet
      • Base Testnet
    • Contract Functions
      • Vault
      • Position Vault
      • Liquidate Vault
      • Order Vault
      • Price Manager
      • Settings Manager
      • Multicall
    • Audit
Powered by GitBook
On this page
  • Realized Profit and Losses
  • Unrealized Profit and Losses
  • Return on Investment (ROI)
  1. Exchange
  2. Trading
  3. Positions

Profit, Loss, and ROI

Realized Profit and Losses

Realized Profit and Loss (rPnL) are used to convey a position's total profit/ loss that has been resolved (paid or received). This includes all accumulated paid fees, such as the Open Position Fee, and is calculated as follows for each i ii of all NNNpartial closes.

rPnL=paidFees+∑i=1N{(closePricei−avgEntryPricei)×posQtyiif LONG(avgEntryPricei−closePricei)×posQtyiif SHORTrPnL = paidFees + \sum_{i=1}^N \begin{cases} (closePrice_i - avgEntryPrice_i)\times posQty_i &\text{if } LONG \\ (avgEntryPrice_i - closePrice_i)\times posQty_i &\text{if } SHORT\end{cases} rPnL=paidFees+i=1∑N​{(closePricei​−avgEntryPricei​)×posQtyi​(avgEntryPricei​−closePricei​)×posQtyi​​if LONGif SHORT​

Unrealized Profit and Losses

Unrealized Profit and Loss (uPnL) track the profit or loss of an open position, taking into account all unpaid accrued fees

uPnL=accruedFees+{(markPrice−avgEntryPrice)×posQtyif LONG(avgEntryPrice−markPrice)×posQtyif SHORTuPnL = accruedFees + \begin{cases} (markPrice - avgEntryPrice)\times posQty &\text{if } LONG \\ (avgEntryPrice - markPrice)\times posQty &\text{if } SHORT\end{cases} uPnL=accruedFees+{(markPrice−avgEntryPrice)×posQty(avgEntryPrice−markPrice)×posQty​if LONGif SHORT​

Note: Paid fees and/or accrued fees can be either negative (losses to trader) or positive (profits to trader) which occurs in cases where the funding rate is negative (ie: Short position when LongOI > ShortOI).

Return on Investment (ROI)

Return on Investment is used to establish how profitable a given trade is, and is a key metric in showcasing a trader's ability during competitions. We use the following calculation to determine position ROI for rPnL where max collateral is determined by the greatest number the collateral has reached for the position up until the time of each partial iii rPnL.

ROI(rPnL)=∑i=1NrPnli/maxCollateraliROI (rPnL) = \sum_{i=1}^N rPnl_i/maxCollateral_iROI(rPnL)=i=1∑N​rPnli​/maxCollaterali​

The ROI for uPnL is simply calculated as follows:

ROI(uPnL)=uPnL/positionCollateralROI (uPnL) = uPnL/positionCollateral ROI(uPnL)=uPnL/positionCollateral
PreviousPositionsNextIncrease Collateral/ Leverage

Last updated 1 year ago