Organize a referendum on the blockchain

Micha Roon
SwissBorg DAO
Published in
3 min readDec 11, 2017

In SwissBorg’s universe every token holder has a vote and the whole system is built around inclusiveness: of asking people for their opinions and encouraging participation in the technical decision making process.

For that purpose, I was in charge of creating a system that fulfils the following requirements:

  • App agnostic. Everyone can participate with their preferred wallet.
  • No double votes. The token count must be frozen in time or based on a specific block.
  • Reward in CHSB, ETH or other ERC20 token. Every participant gets a share of the available reward as soon as they have submitted their vote.

App agnostic

Calling a function on a smart-contract can be done with mist or parity but it is not a user-friendly interface and not a task I’d trust the average user to perform successfully.

The only function which is universally supported and well known by all users is the transfer function. But we don’t want users to actually transfer their CHSB tokens in order to submit a vote.

Double voting problem

If one token = one vote and the voting period lasts for more than one block, then it is tricky to make sure that the tokens are not sent around during the voting period and used multiple times as voting rights. Consider the following process:

  • Alice sends in her vote on a subject
  • Alice then sends all her tokens to Bob
  • Bob can now vote based on his tokens plus those of Alice

Direct reward

In order to reward participants for their vote, every CHSB token holder who participates gets a proportional share of the pot to be distributed for a particular poll.

The participant should not have to wait for all the other participants to have finished voting in order to get their reward. It is so much more gratifying to get a direct payout, well, directly.

The Solution : SwissBorg Referendum & Voting Token

The obvious solution was to both create a specialised voting token: the RSB. and a process that is easy to understand and easy to use:

  • at the beginning of the vote the RSB tokens are distributed to the CHSB token holders. 1 RSB for every CHSB in the user’s account.
  • at the same time a pot of CHSB, ETH or another ERC20 token is setup to reward participants for their opinions.
  • each answer gets assigned an Ethereum address that is published on a web-page.
  • when the participant sends their tokens to the designated answer address, they get a portion of the reward sent to the address used for participating.
  • at the end of the voting period, the unused RSB tokens are burned to avoid accumulation of voting rights.
  • if the reward pot still contains CHSB, ETH or ERC20 tokens at the end of the vote, it could be either kept there and added to the reward sum for the next question or distributed among participants.

The components of the voting system

The system is made up of one oracle, a bunch of smart contracts and a web-page. The web-page only serves to inform the users of the addresses of the smart contracts.

Token distribution

In order to distribute the tokens we use an oracle which loops through all the addresses that hold CHSB tokens and credit RSB tokens to their accounts.

Once the distribution process is done, only smart-contracts are involved.

Smart-contracts to count the votes

The voting system is built around a central smart-contract which holds the CHSB, ETH or tokens to be distributed and one smart-contract for each question.

In order to submit their vote, the users simply send RSB to the chosen address. Once the voting period is over, the RSB balance of each question determines its popularity.

A web page to rule them all

A simple web page containing the questions and a list of addresses for possible answers is setup and the community is informed via the usual social media channels of the availability of the new poll.

Conclusion

This system is tamper proof and simple to use for all. The participants can use a smart-phone app or a desktop browser or even the command line to participate and get rewarded instantly for doing so.

It is the simplest process for alleviating blockchain voting problems and therefore, the first to be implemented by us and available for the first polling in early 2018.

--

--

Micha Roon
SwissBorg DAO

Chief Innovation Officer at Energy Web researching solutions to build the decentralised infrastructure to decarbonise the grid