# If a gauge that a user has voted for gets removed, their voting power allocated for that gauge will be lost

Removing a gauge users voted for permanently locks their allocated voting power; the added gauge-type require blocks vote removal.

- Payout: Contest reward
- Severity: high
- Program: Canto
- Credited: Arabadzhiev
- Disclosed: 2024-04-26
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2024-03-neobase-findings/issues/18
- Library page: https://bugbountylibrary.com/r/c4%3A2024-03-neobase%3AH-01
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:high tech:solidity technique:incomplete-fix technique:regression technique:source-review vuln:business-logic vuln:governance

**Target:** GaugeController.sol vote_for_gauge_weights / remove_gauge
**Root cause:** vote_for_gauge_weights requires gauge_types_[_gauge_addr] != 0 for any nonzero weight, but removed gauges have type 0, so users cannot reset their vote to 0. The prior fix's require(gauge_type >= 0) reverts for removed gauges, reintroducing the loss.
**Steps:**
1. Deploy ve and GaugeController; create lock with 10 ether via ve.createLock.
2. gc.add_gauge(gauge1,0); gc.add_type("",100); gc.add_gauge(gauge2,1).
3. gc.vote_for_gauge_weights(gauge1,10000) allocating all power to gauge1.
4. Governance calls gc.remove_gauge_weight(gauge1) and gc.remove_gauge(gauge1).
5. gc.vote_for_gauge_weights(gauge2,10000) reverts 'Used too much power'.
6. gc.vote_for_gauge_weights(gauge1,0) reverts 'Gauge not added' — vote cannot be cleared.
**How found:** Re-audited a previously reported issue (verwa #62) whose recommended fix was applied; noticed the new gauge_types_ mapping plus require(gauge_type >= 0) reverts for removed gauges (type 0), so the fix no longer works.
**Insight:** When a prior finding's fix is applied, diff the fix against the original PoC: a new validation added alongside the fix (here a gauge-type require) can re-break the exact path the fix was meant to restore.
