-
Notifications
You must be signed in to change notification settings - Fork 8
bughuntoor - Killing a gauge will result in a user's votes being unusable for up to 10 days #58
Comments
Hello, Thanks a lot for your attention. Indeed, when a gauge is killed, any user who voted on it will be unable to retract their vote if their last vote was cast within the past 10 days. Therefore, in conclusion, we must consider your issue as a valid. Regards, |
This has the same root cause as #192, but the impact described is different. I think it still warrants medium severity given voting on proposals are time-sensitive and can have a impact on deciding whether certain proposals are executed or not. I'm not sure if duplicating with #192 is the right thing to do given the impact have different severity levels, but I am leaning towards yes. |
Have consulted @Czar102, and agree that #58 and #218 should be duplicates of #192, given it is clear that if impacts result from a single root cause, then they should be duplicated based on sherlock duplication rules. While not the best way of handling things given the impact is vastly different, I believe this is the appropriate decision to make as of now. |
You've created a valid escalation! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
@deadrosesxyz I agree with you, thats why I initially separated them. Unfortunately, the root cause of killing gauges is the same albeit the impact is vastly different, and so @Czar102 has advised me to keep them as duplicates based on current rules and I have his word that sherlock will have better rules in place to separate such issues in the future. |
@Czar102 Could you please kindly elaborate on this? Root cause, impact and fix seem all to be different. |
I see. I also can't notice why #192 would be a duplicate, to me it looks like the issues are triggered at the same time, but they have different root causes and different impacts. |
@Czar102 Since the fix involve would be potentially different, I can agree that they are not duplicates. I believe delaying voting is a medium severity issue since it can be seen as a DoS with no direct loss of funds. |
This seems like a design decision to me, I don't see this exceeding info/low severity. @nevillehuang what do you think? |
@Czar102 the protocol has confirmed this is not a design decision, it is not intended to forcefully lock user from voting for 10 days especially when its time sensitive. This constitutes medium severity for me. |
This lock for up to 10 days is as if the user decided to unstake. Now, if the unstake function allowed an admin to be used as the user, that would be expected behavior and the admin should just take this into account if they are unstaking for the user. Here, the admin unstakes like that for all users. In general, the admin can make an announcement not to stake in a pool 10 days before killing a gauge. This way, the function is properly used, and there is no lock. The fact that the protocol team intends to apply the proposed improvement is not a signal of the severity of the issue. |
@Czar102 Same thought as in this issue comment. Its a bit unreasonable how you have to come in and subjectively explain the supposedly correct intention of the protocol when it clearly deviates from protocol intentions mentioned by the sponsor. Whatever it is, fair game, it is what we signed up for. I implore you as head of judging, me as lead judge and all watsons to work towards providing actual factual comments in the future, with the help of possibly improved contest documentation and resources. |
I am not commenting what the intention of the protocol was, but whether the design of the code is a plausable one. If it is a plausable design choice, then it's clearly not a vulnerability. |
Result: (duplication status doesn't matter) |
Escalations have been resolved successfully! Escalation status:
|
@Czar102 You do you, but I am confused about your stance, you have the final say, and I will respect it. |
Fix looks good. Check fixed when killing gauge |
bughuntoor
medium
Killing a gauge will result in a user's votes being unusable for up to 10 days
Summary
A user may have his votes unusable for up to 10 days, upon a gauge's removal
Vulnerability Detail
Within the GaugeController, users vote for the gauge of their choice. They allocate a power of their voting power which is based on their voting escrow.
In order to not spam-change their votes, users have a WEIGHT_VOTE_DELAY of 10 days. Meaning they cannot change their vote towards a gauge for 10 days.
However, there's an admin function,
kill_gauge
, allowing the admins to kill a gauge. Upon killing a gauge users can remove their votes from said gauge. However, in order to do so, they still have to go through the 10-day timelock, thus meaning their votes are locked and unused/unusable for up to 10 days.Impact
Users voting power may be unusable for up to 10 days
Code Snippet
https://github.com/sherlock-audit/2023-11-convergence/blob/main/sherlock-cvg/contracts/Locking/GaugeController.vy#L640
Tool used
Manual Review
Recommendation
Change the check on #L640 to the following
The text was updated successfully, but these errors were encountered: