Fix: invariant check in swap
Alexangelj opened this issue · comments
Alexander commented
Description
In swap, the virtual reserves per liquidity are both rounded down:
portfolio/contracts/Portfolio.sol
Lines 475 to 476 in 7862676
However, we are aware of needing to round in the proper direction, and thus we made changes in _getLatestInvariantAndPrice
function to do that. To be consistent, we should further investigate if we need to make the same change here.
This should go along with fixing #339