The function notifyRewardAmount redundantly checks amount > periodState.emission both in notifyRewardAmount() and again inside notifyReward(), leading to gas wastage.
Redundant Validation of amount > periodState.emission
The condition if (amount > periodState.emission) revert RewardCapExceeded(); is checked twice—once in notifyRewardAmount() and again inside notifyReward().
This wastes gas by performing the same validation more than once.
Increased Gas Costs: The contract consumes more gas than necessary due to redundant calculations and storage reads.
Manual Review
Since notifyReward() already checks this condition, remove the extra validation in notifyRewardAmount()
-- if (amount > maxEmission) revert RewardCapExceeded();
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.