openNotional
and positionSize
are the value of the position you want to open in quote asset (USDC), and the size of the position in base asset, respectively (both are after leverage).quoteAssetReserve
and baseAssetReserve
are the x and y in the AMM formula. These values can be obtained for each vAMM on Perpetual Protocol using the perp-cli
tool.perp amm BTC
will give you the values needed to calculate the price impact for BTC.