Open hats-bug-reporter[bot] opened 6 months ago
Thank you for the submission.
The view refers to the part of the code that is in the OOS. Therefore, to accept this problem as valid, it must be high.
It is true that if the gauge is destroyed and then restored within the same epoch and one of the users does not change his vote, this will lead to these consequences, but this is not critical, OOS due to inheritance from the Thena & Chronos code
Github username: @deadrosesxyz Twitter username: @deadrosesxyz Submission hash (on-chain): 0xd3c3c88c5cb6a55fdf0ed49567f63c287f9f3a3da257529eda012a8ffbfd64c9 Severity: medium
Description: Description\ Reviving a gauge will lead to overdistribution of rewards
Attack Scenario\ Within the Voter contract, gauges get rewards based on their relative voted balance. In certain scenarios, the protocol can decide to kill a certain Gauge. By doing so, the gauge will lose their rewards.
However, there comes a problem if a gauge is killed and revived
As it can be seen, when the gauge is killed,
totalWeightsPerEpoch
is decreased. It is not increased back up when reviving the gauge. This would mean that after reviving the gauge, the sum of all gauge weights will be higher than the total weight for that said epoch.Impact:
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)