Closed sherlock-admin3 closed 2 months ago
Per discussed with sponsor, guage restarts are for paused gauges, so for killed gauges, we can simply create new ones using Voter.createGauge
. “Kill” also means the intention to permanently delete the gauge
FlyingBird
Medium
Restarting the gauge after killing it will make some important functions to revert
Summary &Vulnerability Detail
In Voter.sol when calling killGaugeTotally() will delete the gauge from the mapping isGauge " delete isGauge[_gauge];" Then, when restarting the same gauge again it is not set back to true. This value is crucial in setting setExternalBribeFor() for the gauge as it is required to be true
and it is checked also for :
Impact
This bug will cause many functionalities to revert harming both the users and the protocol.
Code Snippet
https://github.com/sherlock-audit/2024-06-velocimeter/blob/main/v4-contracts/contracts/Voter.sol#L394C5-L406C1
Tool used
Manual Review
Recommendation
In restartGauge()