Before reaching out to the Levana team with a bug report, please take a moment to go through this checklist. It covers common issues that users have encountered and will help ensure you've identified a bug in the financial calculations.
- Please make sure you check your arithmetic calculations. It’s especially easy to make mistakes when dealing with leveraged trading, since even a small difference in a decimal point can result in large discrepancies. We recommend putting together a simple spreadsheet containing your values and showing your calculations. This will both ensure that the arithmetic is correct, and make it easier for our team to assist you and investigate any potential errors.
- The term 'entry price' on our platform does not refer to the 'cost basis', but rather to the actual price at which the position was opened. This difference is important, especially if the position has been updated. Consequently, if the current price is close to the entry price, it does not automatically imply that the Profit and Loss (PnL) is near zero.
- Your PnL is made up of two components: price exposure and fees. Price exposure is the gains you make when the spot price moves in your favor, or losses when the spot price moves against you. However, in many cases, fees can contribute a large amount to PnL. You can get a fee breakdown by pressing the “+” button next to the fees. It’s a bit surprising, but remember that negative fees are possible and mean you received funds from the platform. This can happen with both funding fees and DNF when you’ve taken the unpopular side of a market.
- "Collateral" on our platform means current position value, how much you will get if you close the position. Some other platforms use this term differently (e.g. what you opened the position with). Leverage on our platform means leverage of position size to this collateral (current position value), not to the deposited collateral like how it is sometimes shown on other platforms.
- Only prices that land on chain will be used for trigger prices (e.g., limit orders, take profit, stop loss). And only prices from the correct oracle provider for the market in question will be used. This has a number of implications:
- It’s impossible for all price updates, in general, to land on chain. For example, the Osmosis block time is approximately 6 seconds, while the Pyth oracles provide a new price update once every 100ms. That means that, on average, at least 59 out of 60 price updates cannot be included. Generally, the price movements within a single block are small enough for this not to make a difference, but high volatility may lead to cases where an important update cannot be included.
- All price updates that are used for triggers must be updated in an on-chain oracle contract, and must be pushed into the Levana Perps contracts. Levana runs price and crank bots that are responsible for pushing significant price changes, and most actions performed in the web frontend will automatically push a new price into the contract. However, the bots may experience temporary outages while no traders are performing actions, leading to missed updates.
- The chain itself may be unable to process blocks at some times. This could be because the chain is congested (too many transactions to fit into each block), block updates are paused (this happens daily with the Osmosis epoch, for example), or some other kind of bug (like an offline validator).
- Data you see in charts, even charts hosted on the Levana Perps site, may not line up with the on-chain data. We intentionally provide more data points in our charts than is available on-chain to provide for a more intelligent trading experience based on full data. The charts are not intended to be used for checking if a trigger will hit. Our article Caveats about chart data provides more information on this.
- One specific comment on the difference between funding fees and DNF. Funding fees on Levana Perps are similar to other platforms, and the longer your position stays open, the more the fees will accrue. DNF does not work like that. Instead, DNF is a lump-sum payment sent or received on each action for a position (opens, updates, and closes). We display a DNF value indicating what your total DNF payments would be if you closed your position now to give an indication of what your current PnL is. However, any DNF value displayed is impermanent. This means that, if the market balance changes significantly, your DNF amount will likely change significantly too.
If, after reviewing these points, you believe you’ve identified an error in Levana’s smart contract calculations, please provide all information you have available so our team can assist as expediently as possible.