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

Make conviction accumulate over days #28

Closed
sembrestels opened this issue Oct 8, 2019 · 3 comments
Closed

Make conviction accumulate over days #28

sembrestels opened this issue Oct 8, 2019 · 3 comments
Milestone

Comments

@sembrestels
Copy link
Member

Right now it's a constant in the smart contract, but we may want to make it configurable, so conviction votings can last hours, days, or weeks.

@sembrestels sembrestels changed the title Make time units customizable Make customizable units of time Oct 8, 2019
@sembrestels sembrestels added this to the Milestone 2 milestone Dec 3, 2019
@sembrestels sembrestels modified the milestones: Milestone 2, Milestone 3 Mar 24, 2020
@GriffGreen
Copy link

man that gets really confusing... I would stick with one unit... hours, in the backend and do all the math in that one unit always...

But user input should have a major UX focus... I would ask the user an understandable question like:

"How much time does it take to reach 80% of a voter’s max voting power?"

Then have a box where they can put a number... and a dropdown where they can pick minutes, hours, days, weeks, months...
Screen Shot 2020-04-25 at 5 25 57 PM

but for the units of t in all the code... just stick with hours and if someone picks 6 minutes that means 0.1 hours and if someone picks 2 weeks that means 336 hours... and then you do math in the backend to figure out what timestep you actually want and all that.

@sembrestels
Copy link
Member Author

Yes, that's the idea. In the frontend we ask for the halftime (50% seems more appropriate as it's a term commonly used in physics and electronics), and we calculate alpha directly from it with the formula α = (1/2)**(1/t).

@sembrestels sembrestels changed the title Make customizable units of time Make conviction accumulate over days Apr 25, 2020
@sembrestels
Copy link
Member Author

I have changed default alpha to 0.9999599, that has a halftime of ~3 days.

I also made the threshold linearly dependent with the max amount of conviction (which changes with alpha). This way, the value of the threshold as a percentage doesn't change depending on alpha.

The previous threshold formula was:
threshold = (rho * supply) / (beta - (requeted / funds)) ** 2

And now it is:
threshold = (rho * supply) / (1 - alpha) / (beta - (requeted / funds)) ** 2

Any threshold formula available in the future should include this 1/(1-alpha) component to pair with conviction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants