liquid-democracy provides a backend for creating a 'liquid/proxy democracy voting' application. It interacts with the ncnt blockchain via their SDK.
- ability to propose a new proposition
- ability to vote for the proposition
- ability to delegate/proxy your vote
- ability to batch delegate/proxy votes based on tags
- ability to retreive votes you have access to
- login via identity service (ex: uport/civic/coinbase) that will be used for tags in addition to wallet
- Description
- Number of votes (this should be the maximum)
- Minimum votes cast for completiton
- Expiry
- Public key for creator
- At least one tag (ex: Global, USA, San Carlos, MIT employee, MIT student etc.)
- Incentive to vote/proxy
- Incentives will work only if or or more [metric + oracle + time period] is included
- Incentives will only be distributed after the time period has elapsed
- Incentives will only be active if the minimum votes are cast for completion
- Vote created to raise taxes to pay for more schools in San Carlos
- Incentive will be maximum .0001 eth distributed if school scores go up faster than the average of the pervious 5 years; as tracked by the sensus beurau. Checked again 1 year after the implementation.
- One year later if the metric goes up, payout everyone that voted/proxied their vote for success .0001 eth
- One year later if the metric goes down, payout everyone that voted/proxied their vote for failure .0001 eth
- One year later if the metric goes up, payout everyone that voted/proxied their vote for failure .0001 eth
- One year later if the metric goes down, payout everyone that voted/proxied their vote for success .0001 eth
Tech stack:
- Javascript, NodeJS, ExpressJS, Serverless, nCentSDK
- Install it using npm:
git clone [email protected]:lostcodingsomewhere/liquid-democracy.git
cd liquid-democracy
npm install serverless -g
npm init -f
npm install
2a. Update some code in src/controllers/create.js to point to your local ncentSDK:
const NcentSDK = require('../../../../../open-source/ncent.github.io/SDK/source/ncentSDK');
2b. Update some code in ncent.github.io/SDK/source/ncentSDK.js to use await/async over Promises
async stampToken(public_key, tokenName, numTokens, ExpiryDate, success, reject) {
// Make a request for a user with a given ID
try {
let response = await axios.post(this._net + '/tokentypes', {
sponsor_uuid: public_key,
Name: tokenName,
totalTokens: numTokens,
ExpiryDate: ExpiryDate,
});
return success(response);
} catch(error) {
return reject(error);
}
}
3a. Deploy locally:
sls offline start
3a. Deploy remotely (must setup serverless framework and aws-cli setup with apikey/secret):
sls login
sls deploy -v
In the event the above does not work, please add an issue.
Feel free to create merge requests
- What is Liquid Democracy?
- Liquid Democracy: True Democracy for the 21st Century
- Google Votes: A Liquid Democracy Experiment on a Corporate Social Network
- Blockchain, liquid democracy and the end of the outsider
- Helios: Web-based Open-Audit Voting
- An Information-Theoretic Model of Voting Systems
- A Mathematical Theory of Communication
- Quadratic Voting: How Mechanism Design Can Radicalize Democracy
- DAOs, Democracy and Governance
- Basic Income and Deepening Democracy