#59031 [SC-Low] periodattimestamp returns incorrect period numbers for non current timestamps
Description
Brief/Intro
Vulnerability Details
function periodAtTimestamp(uint48 timestamp) public view returns (uint256) {
PeriodConfiguration memory periodConfiguration = periodConfigurationAtTimestamp(timestamp);
return periodConfiguration.startingPeriod + _sinceEpoch(periodConfiguration.epoch) / periodConfiguration.duration;
}Impact Details
References
Proof of Concept
Proof of Concept
Example
Previous59034 sc insight islogassets parameter of the logtrace function will always be set to true and can be removed Next59027 sc insight withdrawalsof view function does not account for already withdrawn funds
Was this helpful?