DemocracyEarth / old_dapp

Liquid democracy smart contract implementation
32 stars 13 forks source link

implement getter for voting, delegating and revoking data and populate graph library #54

Open virgile-dev opened 6 years ago

virgile-dev commented 6 years ago

For ballot X:

Params for delegate() function are : delegate(address from, address representative) Params for vote() function are : vote(address voter, uint ballotId, uint voteOption)

virgile-dev commented 6 years ago

Voting graph bellow ballot:

capture d ecran 2018-04-22 a 13 46 54
virgile-dev commented 6 years ago

Guys one doubt I'm having about this yes / no delegate graph is how we make it work when people have delegated their votes but the delegates haven't voted yet. How do you show that in the current setting ? @AlexJupiter @aecc

aecc commented 6 years ago

In that case it wouldn't have a link between the YES and the repreentative. I think it would look ok and would be easy to understand. We can plot an example once that's implemented to see how the library will handle it

AlexJupiter commented 6 years ago

@virgile-dev Oh good spot. I actually think a third section called “swing voters” or something could be interesting. Imagine this pool of delegates, all who have amasassed a tonne of votes, but haven’t yet decided which way they will vote. It would be a super cool indication of how the “swing voters” could tip the ballot right at the end.

If that’s not clear I’ll try to upload a sketch tomorrow!

AlexJupiter commented 6 years ago

So this is the sketch to explain my comment above: image

I added a Playground section in the inVision Freehand document that we have been working on, so people can iterate on this if they so wish.

To explain in more detail:

This is considering, that when a user delegates, they do not determine how the delegate can be used. I think this is the key difference in this proposal in contrast to what @aecc proposes above.

aecc commented 6 years ago

aha now I understand what @virgile-dev meant, my bad. It looks super to me :), the only comment I have is that I would place the YES/NO before the "unused". YES/NO seems more informative to be displayed first.

aecc commented 6 years ago

working in "getters for all voters to populate possible "representatives" list"

aecc commented 6 years ago

Working on “ getters to get delegation data"

aecc commented 6 years ago

Working on (3)

aecc commented 6 years ago

Working on (4)

AlexJupiter commented 6 years ago

@aecc are you working on (5)?

aecc commented 6 years ago

Hey @AlexJupiter , not at the moment. Probably up next. I'll remove it from In progress meanwhile