Submitted by gpersoon, also found by cmichel
There are a few underflows that are converted via a typecast afterwards to the expected value. If solidity 0.8.x would be used, then the code would revert.
Its better not to have underflows by using the appropriate typecasts. This is especially relevant when moving to solidity 0.8.x.
From Exposure.sol L178:
From PnL.sol L112:
From Buoy3Pool.sol L87:
Recommend replacing int256(a-b) with int256(a)-int256(b), and replacing int256(-x) with -int256(x)
kristian-gro (Gro) confirmed but disagreed with severity:
ghoul-sol (Judge) commented:
