The pending rewards amount is calculated incorrectly.
The pending rewards amount is calculated using the following formula:
uint256 pendingRewards = (currentBalance + totalVestedStaked + newVestedStaked) - totalStaked - newStaked - totalRewards;
The variable newStaked
holds the amount of staked FJORD tokens, including the vested FJORD tokens. When a user calls stakeVested
to stake their NFT from Sablier, both the newStaked
and newVestedStaked
variables are incremented by the _amount
.
This leads to the vested tokens being added twice, which are not removed when calculating the pending rewards.
Wrongly calculation of pending reward.
Manual
Remove the vested FJORD tokens one more time from the formula used for calculating pending rewards.
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.