In the FjordPoints contract, the setPointsPerEpoch function directly updates pointsPerEpoch, disregarding the points accumulated before this epoch, thereby resulting in lost revenue for stakeholders.
The setPointsPerEpoch code shown below clearly does not account for points accumulated during the current epoch:
Considering that points are tokens with no emission cap, easily increasing pointsPerEpoch means the previous points devalue, making it more likely to lower pointsPerEpoch. If this function is called late in the epoch, it could severely impact stakeholders' returns. Increasing the rate per epoch without settling previous accruals devalues existing points, negatively affecting stakeholders expecting returns based on the previously announced rate.
Manual Review
Implement special handling for the epoch during which setPointsPerEpoch is called, calculating accumulated points based on elapsed time and handling them accordingly during settlement:
By implementing these changes, the contract will fairly account for points during epochs where pointsPerEpoch is changed, thus protecting stakeholder interests and ensuring accurate reward calculations.
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.