Issue from previous audit still present: Gauge can have bigger weight than was intended by protocol
The GaugeController contract still contains a function that lets a privileged caller set a gauge's weight directly, bypassing the normal voting mechanism. This could give a gauge more weight than the protocol intended.
Originally disclosed on Code4rena
Submitted by rvierdiiev
M-01 from previous audit is still present. In this issue, the sponsor said they fixed it. I tried to check how it was fixed, but the link doesn’t work for me.
But change_gauge_weight function still exists which makes it possible to reproduce this. Also remove_gauge_weight function is present, that allows to completely remove gauge and i think that fix was to remove change_gauge_weight function.
Impact
Gauge can have bigger weight than was intended by protocol.
Tools Used
VsCode
Recommendation
Remove change_gauge_weight function.
Assessed type
Error
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
What the attacker needed
Access to change_gauge_weight function
The fix
The change_gauge_weight function should be removed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A gauge is a way to direct rewards to a particular pool. Normally, users vote to decide how much weight each gauge gets. Here, a special function lets someone set the weight directly, which could override the votes and give a gauge more influence than it should have.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.