The amountin the notifyRewardAmount function in the BaseGuage.sol comes from the calculation in the GuageController.sol. In the guageController it can be seen that this depends on the weight ratio of that specific guage that determines how much reward it deserves. Now, if this weight ratio is high enough to cause the amount > periodState.emission in the BaseGuage, the rewards will never reach the guage. This will force the users to reduce the weight ratio of that guage: which essentially means that the users are forced to burn/withdraw their veRAAC tokens (to reduce their power and vote again in the GuageController to reduce the weight). This is unintended and can take a long time since the veRAAC tokens are essentially locked for a certain duration.
As mentioned above, the issue arises when the calculated amount in the GuageController exceeds the periodState.emission in the BaseGuage.sol. This allows malicious users to vote for a guage and increase its weight, thus causing the rewards to not be able to come for the guage. This will grief the users.
In the BaseGuage.sol it can be seen that if amount > periodState.emission it will revert.
In the guageController.sol it can be seen that the rewards are calculated according to the weightRatio of the guage
Further to reduce the weight ratio of the guage, the only way is to reduce their votingpower (burn/ withdraw veRAAC token).
Note that the max amount is > periodState.emission of the respective RWA and RAAC guages so this attack is possible
Note: this issue is present in the notifyReward function too in the Baseguage.sol
dos the reward addition into the guage.
manual review
if the amount > periodState.emission cap it to periodState.emission
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.