A vulnerability exists in the validation process where the owner can front-run transactions to manipulate reward eligibility criteria. The owner can update generationDeviationFactor while the validation process is underway, potentially excluding generators who would have been eligible for rewards.
Reward Calculation and Awarding in finalizeValidation():
This function uses generationDeviationFactor to set a threshold for reward eligibility.
However, the generationDeviationFactor can be updated by the owner via setDeviationFactors() at any time:
If the owner changes generationDeviationFactor mid-execution, it could lower the reward threshold, preventing certain generators from receiving rewards they would otherwise qualify for.
Sceanario
A validator completes the required validations in validate().
validate() then calls finalizeValidation().
During this transaction, the owner updates generationDeviationFactor, impacting the reward eligibility check in finalizeValidation().
Generators who should be eligible for rewards based on the original generationDeviationFactor may be unfairly disqualified.
Manual Review
The contract should cache the generationDeviationFactor value at the beginning of the validate() function. This cached value should then be passed into finalizeValidation(), ensuring that the reward calculations use the same deviation factor, regardless of any mid-transaction updates by the owner.
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.