killGaugeTotally() disrupts _reset() for newEpoch votes
Summary
Vulnerability Detail
The killGaugeTotally() function is used to completely remove a gauge from the contract by the emergency council. However, once a gauge has been killed, it causes DOS for every tokenID that has used that pool in the previous epochs.
This is due to an omitted check during the _reset() function:
Ch_301
High
killGaugeTotally()
disrupts_reset()
for newEpoch votesSummary
Vulnerability Detail
The killGaugeTotally() function is used to completely remove a gauge from the contract by the emergency council. However, once a gauge has been killed, it causes DOS for every
tokenID
that has used that pool in the previous epochs. This is due to an omitted check during the_reset()
function:In the reset function, the bribe contract is called directly without checks, causing the reset call to revert because
gauges[_pool] == address(0)
:Impact
reset()
either, so they can not withdraw their fund fromVotingEscrow.sol
forever.Code Snippet
Here is a coded POC to demonstrate the issue, Kindly paste the function in the KillGauges.t.sol:
Tool used
Manual Review
Recommendation
An appropriate fix would be to check if the
gauges[_pool]
is set in the_reset()
function:Duplicate of #10