Blockchain in 100 lines of code

Youtube video of above- captions helpful, bad audio

ZDNET article “is blockchain voting on the way/”

State of the Union- Trump’s only true poll.

Binary to decimal converter

Decimal to binary converter

Chris’s page, Class Project. Emerging Web Tech FVCC

Goal: To create a secure online voting system.

What if, all over the world, people could go to a website (like, find a poll in which we would like to participate- and be able to take the poll, and see the poll results? What would we learn? We could also contribute questions for new polls, and those questions could be polled and if enough people were interested in the answer- that question would be included in a future poll. The project wants to be crowd sourced and crowd funded- and completely secure.

In America, we still have the U.S. Constitution which guarantees our right to free speech, freedom of the press, freedom of thought. We have rights and liberties guaranteed by the U.S. Constitution which are being degraded daily by an ever advancing police state, as America becomes more authoritarian, less well educated, more of a war-based/greed-based/extraction-based/oppression-based/addiction-based society, there’s ever more surveillance and we’re confronted with an ever expanding police state with a vast prison system to suppress dissent.

Our government is controlled by two completely corrupt political parties which have usurped the Power of the People by preventing competition for access to the ballot, or the creation of a Party of the People- by creating conflict over “hot-button non-issues”. Today we have the capability via the ubiquitous internet to create Direct Democracy- a Party of the People- Of, By and For the People.  Our candidates can be avatars for their constituencies. They can pledge to represent their Constituency, not the Party, Party Ideology or the Corrupt Big Money behind the Party, financing the party- and be immediately recalled if they become corrupted. The Party Politician, the “middle man”, the “party puppet”, the access point where the system of corruption subverts the Constitution- is no longer necessary to the process.

That is the goal of The Declaration of Independence, the U.S. Constitution and the Bill of Rights can be read by the average American in about one hour. They were written in plain English for the average eighteenth century colonist… farmer, blacksmith, logger, trapper… to understand. That is where we should begin- by understanding our basic Founding Documents. Unfortunately, they have been corrupted over the two and a half centuries since they were written, and the law has become a franchise of the corrupt- but until The People understand their birthright we have no way to know which parts of what we have now are the product of the original idea, and which are product of the corruption.

The website is designed as a forum to discuss the Founding Documents, and to create polls to unite The People around our Founding Documents- to show us we have a common history. They are miraculous, a priceless birthright for our nation. America as a “Divided Nation” is purely the result of the corruption fostered by a deceptive, self serving “two party system” which is an illusion. They’re in collusion. It’s a “divide and conquer” system, and together we can overthrow it- as the Declaration of Independence demands for us to do when the government no longer serves The People- and restore the vision of The Founders for an Eternal Society, one designed to evolve with the times but yet have core principles which are inviolable- and an end to the “cycles of history”- the violent rise and the corrupt fall of civilizations.

The Founding Documents were written before the days of the pony express, when guns took a minute to load, fire and reload by an expert. There were limitless pristine frontiers. Today we communicate at the speed of light, and modern guns can be used as weapons of mass destruction by a child, and our world is becoming polluted. Times have changed, but human nature is the same as it always was- in the time of the Old Testament, The ancient Greeks and Romans, The New Testament, The Dark Ages, the Renaissance, the Enlightenment… the Founders were well aware of historical precedent. Jefferson read the Koran, as well as the Bible. The Native Americans contributed a crucial part of the idea- Liberty. Individual Rights. Cooperation. Tolerance- the magic ingredient missing from European history.  America does not have to be thrown down into the usual “dust bin” of history. We can have an eternal Golden Age.

We have to start now, we should wait no longer.




The weakest member of the team, my individual project was to explore Blockchain, imagine its possibilities and try to understand how it works. I’ve concluded from my studies that creating our own blockchain/digital currency or other blockchain based application is beyond my ability. So, instead I’m proposing to blockchain protect our polling/voting app by “hitch-hiking” our app onto the existing blockchain of the digital currency Etherium.

I considered the possibility of creating our own digital currency, “Libertarium”, which could be sold at par with the US$, and used the same way as I’m proposing to use Etherium. The advantage to that approach is that it would enable us to restrict access to the currency to only those who meet our “registration” requirements, and thus be able to prevent a malignant player from corrupting our poll. But, at our developmental stage that’s beyond our reach.


How to Hitchhike encryption on Etherium’s Blockchain

The challenge is to create secure encryption for our poll app at the least cost, and within the limits of our abilities- and keep it under our control. We explored as an example of a “blockchain voting app”, at Joyce’s suggestion, and examined their code. It was largely proprietary, and concealed. We examined Trump’s 2016 campaign polls, most of which we found to be “dummy” polls, mere propaganda vehicles intended to give poll takers the impression that it was a “real” poll, and might influence policy. But we found there was no data gathered from most of these polls. However, the StateoftheUnion poll href’s to Google Analytics, so we could see that that poll was designed to be able to gather and analyze data. But, results of these polls were never published. Our idea is to give polls, and publish the results.

If 30 questions have four (multiple choice) answers, they can be expressed in binary as  (00,01,10,11). The consecutive answers to a 30 question poll can be expressed in a 60 place binary number, which has a decimal equivalent to MAXIMUM 1,125,899,906,842,623 decimal number- 16 decimal places. 

If Etherium ( the second most popular digital currency) is valued at $210.00 (as of 10/21/2018 ) and it is calculated to 18 decimal places, then a unique 30 question “voted ballot” can be created and blockchain encrypted by “hitchhiking” on a “donation” of Etherium, of (less than) $2.38 (.001126 x $210.00). If it costs $0.031 per Etherium transaction to encrypt the responses, then those who desire their responses to be encrypted can do so at a reasonable price, and why wouldn’t they?

The app takes the 60 place binary number generated by taking the poll and turns it into a decimal number of Etherium which can be deducted from the participant’s Etherium account and added to ours, which has a dollar value less than $2.38 ( $0.00-$2.38, average $1.19), which (minus $0.031) gives us a net of $1.159 per voted ballot. If everyone starts their account with $25.00, and we create 12 polls/year they can expect to spend c $14.40 (1.19x12)/year, so $15.00/year should keep the average account current.

We can use the revenue generated from those taking the polls to finance the project, which includes generation of 12 polls/year,  automatically capturing and displaying the polls results data posted for all to see on the website. Having the process blockchain protected will encourage participation in parts of the world where the U.S. Constitution with our Constitutional Rights to free speech and press do not apply, and people might fear retaliation for participation in our polls- which could be taken to be “subversive” where free speech is not protected.

Class Comments