getRemainingRewards might fail unexpectedly #117
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
certora
Vulnerability details
getRemainingRewards might fail unexpectedly.
getRemainingRewards calls _getRemainingRewards which calls _getCurrentEpochId:
If block.timestamp < _promotion.startTimestamp, it will revert due to underflow.
Impact
any external call to getRemainingRewards will revert if the promotion is not started yet.
Recommended Mitigation Steps
check in _getRemainingRewards if the promotion started yet, if it didn't then return the entire amount.
The text was updated successfully, but these errors were encountered: