“The ballot is stronger than the bullet.”
— Abraham Lincoln
“Just because you do not take an interest in politics doesn’t mean politics won’t take an interest in you.”
— Pericles
Purpose
Because voting right is the basis of all decisions, we have introduced a free[^1] online Dapp based on Tezos blockchain that guarantees immutable results and free access/interaction.
Also, we wanted to share and explain the how we can build a Dapp on top of Tezos.
Use cases we propose today
Tezos bakers (i.e Tezos capital power )
This template has been designed for bakers.
Only bakers with capital power at the beginning of a voting period will be able to participate using their Tezos voting power. The more XTZ you have, the more weight you get on the final result.
The goal is to provide an alternative voting mechanism that is not the only one used internally for Tezos protocol Amendment. With this tool, anyone is able to create a poll on any topic. The voting result is just informative and not executive.
Permissioned Simple poll
This is a basic simple poll with 1 question and n options. We can only vote once. Electors are part of a whitelist managed by the creator of the poll. We consider that this template has a censorship as only the poll owner can decide who can vote.
Templates in scope
As elections can be as diverse as on the web, we decided to propose different voting templates that will be added at a later date.
A template is a mix of different criteria where final poll results can diverge and profit a particular crowd or strategy. Here below is an example of some combinations.
Criteria :
- name : template name
- creation : how many questions / how many options, during creation time
- vote : number of option choices a user can vote on
- voting power : function to calculate a final result. It can be based on :
- Tezos Capital Power = number of XTZ you own at the beginning of a Tezos Voting period
- Proof of Existence = a proof that you are a specific human identity
- Whitelisted Identity = be part of whitelisted users
- special : sometimes the algorithm more complex than a single variable input
- periodicity : defines the from/to date where voting is allowed
- Tezos based : it starts/ends with a Tezos voting period
- free : can choose any arbitrary dates
- no censorship : it can be ALL or some specific electors
- privacy : option to hide ballots or make them visible to all. Also, we can apply this to the results until the end date is reached.
Summary table
Name | creation (#question,#options) | vote (# choices) | voting power (function) | periodicity | no censorship | privacy |
---|---|---|---|---|---|---|
Tezos bakers | 1 , n | 1 | Tezos Amendment cycle | (not yet available) | ||
Free Simple Poll | 1 , n | 1 | =>1 | FromDate , ToDate | (not yet available) | |
Permissioned Simple Poll | 1 , n | 1 | =>1 | FromDate , ToDate | (owner whitelist) | (not yet available) |
Borda-Fibonacci | 1 , n | n | =>voteAllocation | FromDate , ToDate | (not yet available) | |
Samarkand | 1 , n | n | Samarkand()=>voteAllocation | Tezos Amendment cycle | (not yet available) |
Play with the Dapp
The app is available on all networks :
Look at the README to know more : GitHub - marigold-dev/tzvote: Dapp for delegators to vote on Tezos governance. Goal is for delegates to understand what delegators want and avoid to just chose pass or vote against the crowd
How the Dapp works ?
Architecture
Unlike web2 application, you don’t need to deploy a Certificate Authority/Identity provider. You just need to have a Tezos wallet and create an account.
Also, infrastructure robustness relies on the existing public blockchain nodes. Downtime is less than classical Cloud applications
Below, few components are required to develop the application (minimum is to deploy a smartcontract and have a web client). Btw, it is using classic javascript/typescript programing
- The Client : a simple React app with Taquito SDK. The client allows the user to interact with his wallet. Also, we use tzkt indexer to fetch deployed smart contracts. We could have fetched data directly to the RPC node but tzkt provides caching and a rich API
- The Smart Contract : voting sessions templates are embedded on the client side, so the users can deploy their own contract to the node.
- The Oracle : access to Tezos current voting period inside the Smart contract is not feasible, therefore we deploy another contract called Oracle and an offchain scheduler which regularly polls the RPC node to get this data and push it to the Oracle storage
- The Indexer : The indexer is used for caching and providing a rich API. For example, fetching all similar contracts from a template of reference
Conclusion
What you have seen is just the beginning of a larger scope of voting templates to come. What we learned so far ?
- a simple voting app can provide high degree of transparency and reduce community friction. Also, a large variety of templates might fit every need.
- providing web3 authentication using wallets over web2 reduce censorship and availability of service
- developing a Tezos dapp is nothing difficult and is very cheap[^1]
Do not forget that Tezos is a blockchain that can improve itself over time by using a formalized process of upgrade to its protocol, so called “self amendment”. As World is evolving, people are evolving, decisions have to be taken though election mechanism.
I hope you enjoy TzVote!
Other, free-to-use, tools and applications will be offered to the Tezos community by the Marigold team soon.
Stay tuned
If you want to know more about Marigold, please follow us on social media (Twitter, Reddit, Linkedin)!
- Marigold do not charge any fee on this application. User pays normal gas