Total rewards of epoch 1 are not displayed in epoch 2, and so people will not be able to claim epoch 1 rewards in epoch 2!
This happens because there is a bug in the function 'FjordStaking::_checkEpochRollover'.
En fact, once a new epoch occurs, this function correctly updates the new epoch but when there is a change between epoch 1 and epoch 2, the variable 'totalStaked' at the start of the function '_checkEpochRollover' will remain 0 since this one is udated at the end of the function.
When this happens, the lines of codes 699-709 in 'FjordStaking' will not be executed.
When this happens, the 'totalRewards' variable in epoch 2 will result 0, also if there have been some stakes and the epoch rolloved.
Also 'rewardPerToken' will be 0 in epoch 2, and so people will not be able to claim their rewards since 'UserData.unclaimedRewards' will return 0.
(Using foundry)
Manual Review, Foundry
Consider changing the logic of '_checkEpochRollover' causing 'totalStaked' to update sooner.
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.