Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: Implement Delegation app #1
Implements a Delegation app that uses the Staking app to build a staked-based liquid democracy app.
See the current challenges (griefing attacks) in the research forum: https://research.aragon.org/t/open-challenges-for-on-chain-liquid-democracy/161. An open issue is that delegation chain depths are not being recalculated on undelegations.
For now it is just a prototype to measure gas costs and evaluate feasibility of the approach.
Performed some gas analysis on the both delegation and voting (checking overruling costs depending on chain depth).
Voting (assuming the vote is not the first vote for the option):
The analysis has been done on unoptimized code, but the results are promising IMO. The limit for maximum chain depth should be set given the costs for undelegation, because if undelegation goes out of gas trying to undelegate a chain that is too long, it would be pretty problematic.
The maximum hard limit for how deep a chain could be given the current gas limit of 8M is 179, however undelegating a chain of that size would need 6.7M gas (83% of a current block gas). I think a reasonable cap for the maximum cost of undelegating a chain would be 10% of the gas limit (800k gas), which would result in a maximum chain size of 20.