Contract fails to deliver promised returns, but doesn't lose value
Description
Brief/Intro
Using the FirelightVault::periodAtTimestamp with an input Timestamp corresponding to a configuration period Config so that Config.epoch > block.timestamp the function reverts instead of returning the period number that it should return for the given input value.
Vulnerability Details
The FirelightVault::periodAtTimestamp reverts when called using timestamps that correspond to a configuration period not yet started.
This, because of the function _sinceEpoch that takes the value provided in input by the users and without making any check, it uses it to compute its return value. If the value provided is in the future the result will underflow thus, reverting the call to the _sinceEpoch which will in turn revert the periodAtTimestamp function.
Impact Details
The function does not do what it should but there is no loss of money.
So the severity is low.
Although within the FirelightVault contract the periodAtTimestamp function is called just once by the FirelightVault::currentPeriod using always Time.timestamp() as argument, it is still public meaning that any user could call it.
This function should return the period number for a given timestamp input. However, because of the underflow issue above, if the periodConfiguration.epoch > block.timestamp it revert without returning the period number to the user.