On the afternoon of October 2nd, 2019, I was approached by John Carpenter, Co-Founder of the Global Blockchain Summit (GBS), during a Denver Blockchain Week event. He asked me if Xooa, as a sponsor of the GBS, would like to contribute a project to the conference, perhaps building off one of the Xooa-Managed Smart Contracts. It was a last-second request, but I got back to him quickly with an answer. The Xooa team came up with the idea to develop a project based off of the Voting Smart Contract. But there was a lingering question: Will we be able to accommodate this request with just a day’s turnaround as the Summit would be starting within 24 hours? It sounded unrealistic, but I was confident that we could accomplish this task.
Voting is one of the best use-cases for blockchain technology as it allows a user to vote in a trusted and immutable manner. All votes are registered in the blockchain ledger providing full auditability.
This project was the perfect scenario to showcase Xooa’s capabilities.
Xooa is an enterprise blockchain cloud application platform. Xooa is focused on reducing barriers for enterprise blockchain adoption by making blockchain app development easier and faster, and enabling higher quality projects.
Xooa offers an ideal set of features to make a voting smart contract on the blockchain in record time:
The first thought was to provide users with a signup form on the website and create a new identity for each unique email signup.
Thinking of the user experience, this idea was discarded. Instead, we decided to create a unique QR code for each participant that we could print out and distribute to conference attendees. The QR code will allow the user to navigate to the voting webpage and authenticate it as a unique identity too. Thanks to Denso Wave for inventing this effective solution.
One option was to use the simple REST APIs that Xooa provides to invoke the smart contract and register votes. I could use another endpoint to get the details about the vote, such as options and questions for the referendum. Fetch the data from the APIs and create a form based on that.
Using Xooa Embed Widget
The option chosen was to simply use the embed widget, which Xooa provides, and place it on the voting webpage. Considering its ease of use and the time that was ticking away, this seemed to be the best solution.
We developed the voting webpage by:
And voila! The app was ready. You can find the app at https://github.com/Xooa/voteApp
We containerized the app, created a repository on AWS ECR, deployed on ECS, and linked it with Route53. The app was live at https://gbse2020.xooa.com. Don’t try to open it as this link has been disabled now.
The target was to generate identities for 200 Summit attendees. A simple script was created to call Enroll Voters endpoint 200 times. But, Xooa had throttled the API limit to 50 requests per minute for the shared account. So, the script ran with some delays and stored the identity API tokens in a .csv file.
This is the last piece of the puzzle. We used QR Explore, a simple online tool, to create QR codes in bulk.
The API tokens were appended to the website link, such that the link would look like this: https://gbse2020.xooa.com?token=xxxxx. QR codes were generated for all of these URLs.
Lastly, we printed all QR codes and handed them out at the conference. Attendees would scan the codes using their mobile phone and vote.
To get the tally, we simply had to call the Tally endpoint to see the results of the vote.
Ultimately, this voting platform was successfully launched in time for the GBS and it operated without a hitch. Attendees participated in this vote and simply saw a question with a choice of answers. Meanwhile, a robust blockchain network powered an auditable, immutable ledger that securely recorded every vote in the background.