_requirePromotionActive() checks for _promotionEndTimestamp > 0, while the check also requires _promotionEndTimestamp >= block.timestamp, since block.timestamp must > 0, _promotionEndTimestamp > 0 is redundant.
Removing it will make the code simpler and save some gas.
Handle
WatchPug
Vulnerability details
_requirePromotionActive()
checks for_promotionEndTimestamp > 0
, while the check also requires_promotionEndTimestamp >= block.timestamp
, sinceblock.timestamp
must > 0,_promotionEndTimestamp > 0
is redundant.Removing it will make the code simpler and save some gas.
https://github.com/pooltogether/v4-periphery/blob/0e94c54774a6fce29daf9cb23353208f80de63eb/contracts/TwabRewards.sol#L254-L257