When an user stakes, the value is correctly updated in 'FjordStaking::DepositReceipt', but it is not updated also in 'FjordStaking::UserData'.
In the last line of the function 'FjordStaking_redeem', we can see that 'ud.totalStaked' is calculated by adding 'deposit.staked' + 'deposit.vestedStaked'.
The problem here is that this happens at the start of the function and 'deposit.staked' is updated at the end of the function,
so when users stake, 'ud.totalStaked' will stuck at the old value while 'deposit.staked' is correclty updated.
If 'FjordStaking::userData' and 'FjordStaking::deposits' have different values, this could lead to data collision problems.
Manual review, Foundry
Consider adding a logic that allows to updates 'FjordStaking::deposit' soneer that 'FjordStaking::userData', and remember to not update again 'FjordStaking::deposit' within the same transaction.
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.