Trading Interface FAQ

Learn more about the features and functions found on the Perpetual Protocol trading platform. Join our Discord for more discussion! https://discord.gg/mYKKRTn

Why do I see an 'insufficient balance' error?

Be sure to deposit funds to make them available for trading.

Further explanation

Perpetual Protocol uses the xDai network for scaling. This means you must 'deposit' funds from your regular Ethereum wallet (eg. Metamask) to the xDai network. This process is performed entirely within your existing wallet without additional setup. Funds remain in your wallet and under your control at all times.

Why do the funding payments seem to be paid to the wrong side?

Funding payments follow the convention used on other exchanges like FTX and Binance: A negative number in your Position History indicates you received a funding payment, while a positive number in your Position History indicates you payed a funding payment.

The logic is that you make a payment; a positive payment means you end with less money; a negative payment means you end with more money.

How is the Index Price calculated?

The Oracle price (often called 'index price' on centralized or orderbook-style exchanges) generally refers to the price of the underlying asset on the spot market. For Perpetual Protocol, the index price is based on the price feed from Chainlink.

To mitigate frontrunning, we use the TWAP (time weighted average price) from the previous 60 minutes of trading. This may result in the index price shown differing somewhat from the price you see on other major exchanges, especially when the market is volatile.

The price shown in the Perpetual Protocol trading interface is updated when a new price is received from Chainlink. Note, however, that the Oracle price is only used when calculating hourly funding payments.

Timing of updates to the index price is determined by updates in the Chainlink price feed -- a surprisingly complex topic. Deep dive here.

How is the Market Price calculated?

The Market price (also called 'last price') is the current trading price for perpetual contracts of the asset you at viewing, and is the price you can expect to pay/receive when opening or closing a position, respectively (subject to slippage).

It is normal for this price to diverge, sometimes dramatically, from the index price (the open market price referenced by Perpetual Protocol, aka spot price). The Market price is a general indicator of trading sentiment on Perpetual Protocol.

How is the margin ratio calculated?

Margin ratio is calculated by adding your margin size and PnL for the position, and then dividing by the position size.

PnL is calculated using one of two methods, causing the margin ratio to also have two potential values. Learn more here or see the next FAQ on PnL calculation.

How is PnL calculated?

PnL or P&L (profile and loss) shows how much value your position has lost or gained. Until you close your position, these are unrealized profits or losses.

PnL is calculated using the following formula:

PnL=(currentPrice1entryPrice)positionSizePnL = (current Price^1 - entry Price) * position Size
  1. currentPrice will be the greater of two values: 1. current market price as calculated by the vAMM, or 2. the TWAP of the market price. This is done to prevent an attacker from manipulating the price on the exchange and causing liquidations.

What happens when I open a second position?

If you open a second position for a given asset, the new position will be combined with your existing (active) position. E.g. if you have a 100 ETH long position and open a 50 ETH short position, your active position will be updated to a 50 ETH long position (all else being equal).

Note that if you open a 100 ETH long and then a 100 ETH short, you will be left with a dust position due to rounding. Therefore it is best to simply close the position rather than taking an equal, opposite position.

If you want to open multiple positions for the same trading pair, we suggest creating a new account in Metamask, and connecting with this account to the trading platform.

How can I control slippage?

You can set a maximum slippage tolerance on the left side of the trading interface. The slippage tolerance applies when opening or closing a position.

The default is 0.5%, or you can also set your own tolerance. Setting slippage tolerance is especially useful in volatile or high volume market conditions on the Perpetual Protocol exchange, when large numbers/sizes of concurrent trades may result in significant slippage.