approximateXGivenPrice can fail if priceWad * 1e18 is > type(uint256).max
Alexangelj opened this issue · comments
Alexander commented
This function attempts to divide by the strikePriceWad variable. It uses the divWadDown
method which will multiply the numerator (priceWad) by 1E18. If this overflows the uint256 max, it will revert with an arithmetic error.
Alexander commented
Noted in docs.