1Hive / Hive-Democracy

This repository contains the Hive Commons implementation of liquid democracy that is used for community governance and dispute arbitration.
19 stars 2 forks source link

Move computation/tabulation securely off-chain. #4

Closed lkngtn closed 6 years ago

lkngtn commented 7 years ago

3 Introduces a mechanism to modulate allowed chain depth and minimum balance during the tabulation process which is important but represents a compromise between an ideal implementation that allowed for infinitely small balances and infinite depth delegation chains. To improve on that it is important to consider ways to reduce the cost associated with those variables by moving tabulation onto a more cost-efficient platform and then securing returning the result to the blockchain.

Possible solutions:

Realistically, in order to scale to large populations of voters while keeping the balance low and the chain depth high, one of these solutions may be necessary.

timschloe commented 7 years ago

I guess I'm being naive... but couldn't I set my local app to follow the voting behavior of other users (and they set their apps to follow yet others), so that the whole delegation ends up locally, without the need to be on-chain?

There might be other issues that need golems, but delegation does not seem to be necessarily computationally intensive...?

lkngtn commented 7 years ago

I think the issue with the approach you suggest is that you introduce an situation where everyone needs to send a transaction to vote for every issue (and pay gas) and there is a reason for most people to wait until the very end in case there is a change to delegation or voting in their chain (so most votes will occur at the very end of the voting period) which makes discussion leading up to a vote more difficult. In addition, a user needs to either run their own application that monitors delegate chains or trust a server to do so for them and notify them when they need to take action or they need to trust this service with their keys in order to vote--this increases the cost to participate for voters which I think will have a negative impact on participation.

By moving the delegation part off-chain as you suggest, it becomes easier to tabulate votes on-chain, which is nice, but I think you probably lose too much in the process. I'm certainly open to exploring the idea more though, and I think that there is definitely cases where pushing some of the functionality to client side makes sense.

With delegation on-chain there is a limit to the depth of the chain and complexity (when you consider topic hierarchies) which limit what can be tabulated. I think an offchain-client side interface could be used to help facilitate users changing their votes if their delegate chain gets too long and therefore their vote won't be counted, I also think that additional/more complex topic delegation relationships could be done client side. I think this offers some of the benefits you are talking about, without as much downside.

lkngtn commented 6 years ago

The progress on Liquid Democracy in Aragon's Liquid Democracy working group is going well. Closing issues in this repo prior to archiving so that effort can be more easily coordinated in the working group.

This particular issue is related to https://github.com/aragon/nest/issues/6