Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Governance: Restore negative votes functionality - 250K SA Bounty! #3503

Open
julian-molina opened this issue Jan 5, 2022 · 6 comments
Open
Labels
bounty bug Something isn't working Governance Governance Project improvement New feature or request

Comments

@julian-molina
Copy link
Member

The negative votes feature was disabled during the November distribution due to a bug, and was never restored.

@NAmorim NAmorim added bug Something isn't working improvement New feature or request Governance Governance Project labels Jan 6, 2022
@julian-molina
Copy link
Member Author

Negative votes are important in a distributed governance system so that the community may have a tool to shut down dishonest or undesirable behavior. For instance, bad actors may collude (or create apocryphal profiles) to vote for something that goes against the community, or simply to extract tokens and cash them out.

@julian-molina
Copy link
Member Author

For context, the feature of negative votes was added early on. At some point, we discovered there was a bug when using negative votes that resulted in inflating the token power of the node with the negative setting. Because it was causing a problem during the distribution, the feature was disabled, maybe commenting lines of code.

I do not remember exactly how was it that you turned a vote negative. Maybe @Luis-Fernando-Molina remembers.

@julian-molina
Copy link
Member Author

I'm offering a 250K SA bounty to solve this issue.

@julian-molina julian-molina changed the title Governance: Restore negative votes functionality Governance: Restore negative votes functionality - 250K SA Bounty! Feb 7, 2023
@BastianMuc
Copy link
Contributor

I just spent some time Bounty hunting for this. I found it actually is the easiest earned Bounty ever: The requested functionality already works without any code change. (Why I would actually feel bad about claiming this!).

Negative voting can be achieved by adding a boolean parameter "negative" into the configuration of the voting node. For example, this will constitute a valid negative vote:

{ "percentage": 20, "negative": true }

Particularly when voting a claim down to 0, you needed to wait for a little while for the effect to become visible in the UI. The full removal of vote information displays was not triggered as frequently as simple balance changes. I included some optimizations to this in #4824 , so the effect of negative voting should now get visible faster.

I'll also add a hint to the documentation.

@julian-molina - would you want to re-test if this works as intended and close the issue if confirmed?

@julian-molina
Copy link
Member Author

@Luis-Fernando-Molina had coded the feature so that it would work most likely in the way you suggest. My understanding is that he had disabled something at some point, due to an exploit we discovered. There was no time to fix the exploit so the whole feature was disabled instead. So, I'd need to remember what the exploit was and do some testing.

@julian-molina
Copy link
Member Author

I run some tests and noticed that negative values of token power are ignored in all nodes other than weight votes. This is not how it used to be, but it's how it should be. In fact, the exploit we discovered was related to that. So it seems someone fixed this at some point, and I'm wondering who it may have been, as I don't remember reading about the fix in any POV.

I tried a few scenarios with negative votes and it seems to work as intended when I load the data in the Governance panel.

The one thing I'm missing is to have some indication at the UI that a particular vote is negative. At this point, the % shows as a positive in the light blue label even when it's set as negative in the configuration. Can you maybe make that happen @BastianMuc ?

BTW, if I don't answer here in a reasonable timeframe, please hit me up on Telegram. I'm not getting the notifications, or getting too many coming from GitHub. I completely missed your April 1st post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty bug Something isn't working Governance Governance Project improvement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants