GammaSwap Docs
Search
K

How to Calculate PnL

Calculating PnL for Trades

Calculating PnL for a Long, Short or Straddle trade

To calculate PnL for a perpetual volatility trade, navigate to the Trade Page and select the calculator icon in the top right corner of the trade tool.
Calculator Icon on Trade Page
Once in the Calculator Interface, select the token you would like the PnL denominated in all the way at the top (WETH, USDC). In our case, we will choose USDC. Then select your Position Type (Long, Short, Straddle). In our example case, we have selected Long. Finally, choose your initial deposit in WETH or USDC. We have deposited 1 WETH as our initial deposit with an exit price of $3,000 USDC. Observe how Time to Liquidation, PnL, Leverage and Theta changes as you move the sliding scale for LTV.
Adjusting the LTV slider
If you adjust the exit price to be higher, notice your Profit & Loss will increase exponentially since your leverage is increasing as the price changes. Notice how your Opening cost increases as well. Opening cost is a combination of rebalancing fees, slippage and origination fees. If the price was to move against you, you would lose capital in the Long Position but you wouldn't be closer to liquidation. If the price moved far enough away from you, you may even profit. This is great for altcoins where the price often can move substantially in one direction (greater than 50% price moves). In the below scenario, the price moved against you from $3,000 USDC to $500 USDC in a long position and you profited from that trade. Your positions are protected on the downside if the price moves far enough away from you.
PnL Calculator Interface