Skip to content

Commit

Permalink
CVF-1, CVF-23 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak authored Nov 3, 2024
1 parent fadb39f commit 53b487f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Doppler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ contract Doppler is BaseHook {
if (_startingTime >= _endingTime) revert InvalidTimeRange();
// Inconsistent gamma, epochs must be long enough such that the upperSlug is at least 1 tick
// TODO: Consider whether this should check if the left side is less than tickSpacing
if (int256(FullMath.mulDiv(FullMath.mulDiv(_epochLength, 1e18, timeDelta), uint256(int256(_gamma)), 1e18)) == 0)
{
if (
_gamma <= 0
|| FullMath.mulDiv(FullMath.mulDiv(_epochLength, 1e18, timeDelta), uint256(int256(_gamma)), 1e18) == 0
) {
revert InvalidGamma();
}
// _endingTime - startingTime must be divisible by epochLength
Expand Down

0 comments on commit 53b487f

Please sign in to comment.