_getPositionNotional() crops the size of the position to the available reserves, which may lead to unexpected profits/losses
Description
_getPositionNotional() fills positions to the amm if it can't find limit orders.
However, if the remaining size of the position is bigger than the available base reserves in the AMM, it crops the size of the position (for short positions), decreasing the current notional.
It does not seem possible to exploit this situation, as some tests were carried out which led to big losses, but the position could not be closed as there was not enough liquidity, nor could it be liquidated as liquidations use the liquidation price and the not the current value of the position.
Recommendation
Revert if there is not enough liquidity to make sure the value of the position is correctly calculated.
Status
Addressed in #0ac12e1