Oracle.sol: observe function has overflow risk and should cast to uint256 like Uniswap V3 does
Looking at the `Oracle.observe` function, the `secondsPerLiquidityCumulativeX128` return value is calculated as follows:\\n```\\nliqCumL + uint160(((liqCumR - liqCumL) * delta) / denom)\\n```\\n\\nThe calculation is done in an `unchecked` block. `liqCumR` and `liqCumL` have type `uint160`.\\n`delta` and `denom` have type `uint56`.\\nLet's compare this to the Uniswap V3 code.\\n```\\nbeforeOrAt.secondsPerLiquidityCumulativeX128 +\\n    uint160(\\n        (uint256(\\n            atOrAfter.secondsPerLiquidityCumulativeX128 - beforeOrAt.secondsPerLiquidityCumulativeX128\\n        ) * targetDelta) / observationTimeDelta\\n    )\\n```\\n\\nThe result of `atOrAfter.secondsPerLiquidityCumulativeX128 - beforeOrAt.secondsPerLiquidityCumulativeX128` is cast to `uint256`.\\nThat's because multiplying the result by `targetDelta` can overflow the `uint160` type.\\nThe maximum value of `uint160` is roughly `1.5e48`.\\n`delta` is simply the time difference between `timeL` and `target` in seconds.\\n```\\nsecondsPerLiquidityCumulativeX128: last.secondsPerLiquidityCumulativeX128 +\\n    ((uint160(delta) << 128) / (liquidity > 0 ? liquidity : 1)),\\n```\\n\\nIf `liquidity` is very low and the time difference between observations is very big (hours to days), this can lead to the intermediate overflow in the `Oracle` library, such that the `secondsPerLiquidityCumulative` is much smaller than it should be.\\nThe lowest value for the above division is `1`. In that case the accumulator grows by `2^128` (~3.4e38) every second.\\nIf observations are apart 24 hours (86400 seconds), this can lead to an overflow: Assume for simplicity `target - timeL = timeR - timeL`\\n```\\n(liqCumR - liqCumL) * delta = 3.4e38 * 86400 * 86400 > 1.5e48`\\n```\\n
Perform the same cast to `uint256` that Uniswap V3 performs:\\n```\\nliqCumL + uint160((uint256(liqCumR - liqCumL) * delta) / denom)\\n```\\n
The corrupted return value affects the `Volatility` library. Specifically, the IV calculation.\\nThis can lead to wrong IV updates and LTV ratios that do not reflect the true IV, making the application more prone to bad debt or reducing capital efficiency.
```\\nliqCumL + uint160(((liqCumR - liqCumL) * delta) / denom)\\n```\\n