code-423n4 / 2021-10-tracer-findings

0 stars 0 forks source link

calculateNextBeaconPeriodStartTime casts timestamp to uint64 #39

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function calculateNextBeaconPeriodStartTime accepts _time as a type of uint256 but later explicitly casts it to uint64. While this function is not used internally, it behaves incorrectly when passed a value that uint64 does not hold (for such values it will return a max value of uint64). I don't see a reason why you can't directly accept uint64 here.

Recommended Mitigation Steps

Change parameter type to uint64.

itsmetechjay commented 3 years ago

Withdrawn by warden. Per pauliax: "Submitted this to the wrong contest. Should be for PoolTogether"