In FjordStaking.sol
, a function FjordStaking::getEpoch
is calculating the epoch or reward distribution. But that function is literally mishandling the epoch calculation and there's an arithmetic overflow also in the calculation although it's at an edge case.
Paste the following test snippet into your epoch.t.sol test file
output:
as we can see epoch rounded back to one.
May raise issues in _checkEpochRollover
function
Manual review
We can use uint256 instead of uint16
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.