getRemainingRewards()
Malfunction for unstarted promotions
#102
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
Handle
WatchPug
Vulnerability details
For unstarted promotions,
cancelPromotion()
will revert atblock.timestamp - _promotion.startTimestamp
in_getCurrentEpochId()
.Call stack:
getRemainingRewards()
->_getRemainingRewards()
->_getCurrentEpochId()
.https://github.com/pooltogether/v4-periphery/blob/0e94c54774a6fce29daf9cb23353208f80de63eb/contracts/TwabRewards.sol#L276-L279
Recommendation
Change to:
The text was updated successfully, but these errors were encountered: