Voting Contracts, Part 0 — Introduction

Eszymi
Coinmonks
5 min readSep 12, 2023

--

Many things in our environment are influenced by democracy. Starting with decisions of great importance, such as national referendums, and ending with choosing a movie for a get-together with friends. Due to the diversity of situations, we approach the concept of decision-making in various ways.

Let’s take, for example, the situation of choosing a movie. The decision can be made during a gathering when everyone is in the same room. Then, each person can express their preferences, and people try to reach a consensus and find a movie that satisfies everyone. However, this approach may not always work. Imagine if we wanted to make a decision concerning an entire country in the same way. Right from the beginning, we would encounter a significant problem: where would we find a room large enough?!

But even if we managed to find one, imagine what would happen inside. We have all been in arguments before, but certainly not in an argument involving millions of people! (Sounds horrible) The noise would undoubtedly be tremendous, but in reality, nobody would be able to listen to anyone else. That’s why elections of this kind happen differently.

I don’t know about other countries, but where I live (Poland), elections work as follows. First, information is provided about what the vote is about. Then, a date for the vote is chosen. The next step is printing the appropriate number of voting cards and distributing them to predetermined voting locations. Each eligible voter can only vote at one assigned location. If, for some reason, they are far from that location on the voting day, they have the option to notify authorities weeks in advance and choose a different place to vote. So, there is no room for spontaneity. Then, on the day of the vote, you need to show up at the designated location, present your documents, and cast your vote. That’s it. Now, you wait for the votes to be counted by appointed individuals and await the results, followed by disputes and rumors that the election was rigged.

Does it sound simple? Well, no. Is it efficient? Not really. Hmm, is it secure and immune to fraud? Definitely not. So, we have three “no’s,” making it a weak option, but we still use it because we don’t have better alternatives. But is that really the case?

Well, not entirely. The development of blockchain technology creates new possibilities for conducting voting. Imagine that we respond to the questions posed in a referendum using blockchain technology (Nani?!). In this scenario, each response is immutable and permanently recorded in the blockchain, and the votes can be counted by a smart contract. This way, we can avoid suspicions of improper vote counting. This is because the vote-counting program, once placed in the blockchain, cannot be altered, and everyone can verify the logic implemented in it.

Another advantage of conducting voting in this way is greater flexibility. To cast your vote, you only need internet access, not proximity to a specific physical location. Long live mobility!

Another advantage is the cost of conducting the voting. In the traditional form, you have to pay for printing questionnaires, their transportation, compensate the people in the election committees, and those counting the votes. Furthermore, such a form of voting requires significant logistics. However, if voting were to take place in a digital form, these costs would be unnecessary, and it would also be simpler organizationally.

An additional advantage is that a computer program would be responsible for counting the votes, which could have logic implemented. This would allow for introducing new possibilities in voting. Let’s consider, for example, that we are dealing with a company managed by its shareholders. We could propose a solution where, when making decisions regarding this company, each person has a number of votes linked to the size of their holdings. This way, individuals who have more at stake potentially have a greater influence on the company’s future. This example is just a quick illustration of the possibilities.

However, voting via blockchain comes with entirely different challenges. One of them is how to verify who can vote. Imagine we wanted to conduct a referendum in Poland. In this case, only individuals with Polish citizenship who have reached the age of 18 can vote. How can we verify this? How can we be sure that the person behind the sent vote meets these conditions? How can we ensure they only vote once?

Another problem is what to do about people who do not have access to the internet? These individuals should not lose their voting rights. How can this be addressed?

Additionally, to vote, a transaction would need to be performed, which incurs a cost. This is a significant issue because people should not have to pay to make decisions that affect them.

As we can see, this topic is not simple, but it has great potential. Therefore, I believe it’s worth focusing on it. In this series of articles, I would like to present examples of vote-counting programs that could potentially be used for the issues described above. I will start with the simplest implementation and then point out its weaknesses and expand it to eliminate them. As a result, I plan to demonstrate the variety of possibilities offered by blockchain when applied to practical issues. And show how to code it step by step.

I hope you find this post useful. If you have any idea, how could I make my posts better, let my know. I am always ready to learn. You can connect with me on LinkedIn and Telegram.

If you would like to talk with me about this or any other topic I wrote, feel free. I’m open to conversation.

Happy learning!

--

--