Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Accord Voting Standard
namespace org.accord_voting.decision
asset Decision identified by identifier {
// what is a decision's job, function, place in the system, how will it be used?
o String identifier
o String decisionValue // what the actual decsion is. maybe bytes or raw data instead?
o String election // explicitly define where the decision came from
o Boolean isVoid optional
o Boolean isPrivate optional
}
namespace org.accord_voting.vote
import org.accordproject.organization.Organization from github://accordproject/models/master/organization.cto
import org.accordproject.person.Person from github://accordproject/models/master/person.cto
asset Vote identified by identifier {
// what is a vote's job/function, how will it be used in the system?
o String identifier
o String voteID
--> Person voter // <Person> should be <Entity>. Needs to be abstract to accomodate individual citizens, NGOs, gov'ts, and smart contracts.
--> Person proxy optional // Someone who has been authorized to cast vote on original voter's behalf
o String voteValue // What the actual vote is. maybe bytes or raw data instead?
o String election optional // Explicitly define which election vote can be used in
o Boolean isPrivate optional
o Boolean isVoid optional
}
@mttrbrts

This comment has been minimized.

Copy link

@mttrbrts mttrbrts commented May 2, 2018

Looking good!

What's the difference between the Vote's identifier and voteID?

Also, it might be helpful to represent the election as an Asset too so that you can include a uni-directional relationship to it from both a Decision and Vote?

@kibagateaux

This comment has been minimized.

Copy link
Owner Author

@kibagateaux kibagateaux commented May 3, 2018

Still working on naming conventions. voteID was supposed to be for the the voting system it originated from and identifier would be a vote type e.g. ballot, caucus, committee. I will probably remove voteID because I am making assets for protocols so that will be a relationship instead --> VotingProtocol votingProtocolIdentifier.

I haven't made an election asset yet I don't think "election" is the right word since these can be activated by token curated registries or other mechanisms. If you think it is important to have I can make it and we can work out the name later but I think it will take a different form if you think about it as more than just an election.

@iamchrissmith

This comment has been minimized.

Copy link

@iamchrissmith iamchrissmith commented May 4, 2018

Agree, looks good. Couple more naming suggestions:
In each you have a Value (voteValue and decisionValue). If I understand the comments, these fields might be better identified as voteResult and decisionResult. The word Value, for me, evokes more of a weighting that might be used when comparing this vote or decision against another.

What does isVoid on Vote describe? Would that be for cancelled elections?

@kibagateaux

This comment has been minimized.

Copy link
Owner Author

@kibagateaux kibagateaux commented May 10, 2018

Agree result is better than value, that will be updated. isVoid means that the votes can't be used to calculate a decision anymore which could have many use cases - a cancelled election, that particular vote is found to be fraudulent, if you want to give everyone a chance to cast a vote to gather data but don't want everyone's vote to count towards the actual result, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment