Submitted by WatchPug, also found by hansfriese and IllIllI
Since _blockTimestamp is uint32, subtraction underflow is desired at _twavObservationCurrent.timestamp - _twavObservationPrev.timestamp.
See: https://github.com/Uniswap/v2-periphery/blob/master/contracts/examples/ExampleOracleSimple.sol#L43
Because the solidity version used by the current implementation is 0.8.10, and there are some breaking changes in Solidity v0.8.0:
Ref: https://docs.soliditylang.org/en/v0.8.13/080-breaking-changes.html#silent-changes-of-the-semantics
The timestamp subtraction may revert due to underflow.
Since _getTwav() is used in NibblVault.sol#_rejectBuyout(), if it reverts and there is a buyout, an essential feature of the NibblVault contract will be unavailable, causing users funds to be frozen in the contract.
Change to:
mundhrakeshav (Nibbl) acknowledged, but disagreed with severity
KenzoAgada (warden) commented:
mingwatch (warden) commented:
KenzoAgada (warden) commented:
HardlyDifficult (judge) decreased severity to Medium and commented:
