#59054 [SC-Low] periodattimestamp returns incorrect period number
Description
Brief/Intro
Vulnerability Details
/**
* @notice Returns the period number for the timestamp given.
* @dev Return value may be unreliable if period number given is far away in the future
* @dev given that new period configurations can be added after nextPeriodEnd().
* @return The period number corresponding to the given timestamp.
*/
function periodAtTimestamp(uint48 timestamp) public view returns (uint256) {
PeriodConfiguration memory periodConfiguration = periodConfigurationAtTimestamp(timestamp);
// solhint-disable-next-line max-line-length
return periodConfiguration.startingPeriod + _sinceEpoch(periodConfiguration.epoch) / periodConfiguration.duration;
}Impact Details
References
Proof of Concept
Proof of Concept
Previous#59091 [SC-Low] low firelightvault sol implementation contract does not disable initializersNext59034 sc insight islogassets parameter of the logtrace function will always be set to true and can be removed
Was this helpful?