The early claim mechanism in the FjordStaking::claimReward
applies a penalty to all unclaimed rewards, regardless of when they were earned.
The early claim mechanism in the FjordStaking::claimReward
applies a penalty to all unclaimed rewards, regardless of when they were earned. This unfairly penalizes long-term stakers who have accumulated rewards over many epochs when they attempt to claim early.
Users who have staked for many epochs and accumulated substantial rewards will have all their rewards penalized if they claim early, even for rewards that have long passed the intended vesting period.
This implementation may discourage users from maintaining long-term stakes, as they risk losing a significant portion of their older rewards if they need to claim early.
A scenario demonstrating the issue:
A user stakes for 50 epochs and accumulates significant rewards.
They make a new deposit in epoch 51.
Two epochs later (epoch 53), they need to claim their rewards early.
All their rewards, including those from the first 50 epochs, will be subject to a 50% penalty.
This penalizes the user for rewards that should have already vested and been claimable without penalty.
Manual code review
Implement a per-epoch reward tracking system and modify the claimReward function to apply the early claim penalty only to rewards from recent epochs.
Here's an example of how it might look like:
This change ensures that only rewards from recent epochs (less than 3 epochs old) are subject to the early claim penalty, while older rewards can be claimed in full.
Note: The _redeem
function and other related functions would need to be updated to work with this new reward tracking system.
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.