Idea
The Easy Vote project was conceived based on the personal need of RSquad Lead Programmer Roman Nguyen. Initially, this idea served to simplify interaction with the Free TON Governance interface, which has limited functionality compared to the mobile version. For example, the original Free TON Governance functionality did not imply the possibility of batch voting and sorting of contests by filters, which increased the number of routine interactions. To solve this problem and save their own time and the time of other juries from the RSquad team, Roman Nguyen set about creating EasyVote.
On the very first day, a prototype version was created. Later, Pavel Ananyev joined Roman Nguyen, and the process of creating a more thought through version of EasyVote began.
The tasks the developers faced were divided into:
• Creating an intuitive web interface;
• Providing interaction of the interface with the blockchain;
• Ability to check if the user has a role of jury by the public key;
• Access to voting by presenting the seed phrase;
• Providing complete protection of user data.
Interface capabilities
Since the emphasis was on functionality, it was decided to use the Ant Design UI library for design. All tables, lists, and other visual elements were implemented on it.
Easy Vote is a web page providing the functionality of voting for or against an idea within a competition. In the interface, the user sees a list of all competitions. By clicking, a list of submitted solutions is displayed inside each competition. Further, the structure is divided into a list of jury votes for each decision.
To see the list of competitions in which the user has the role of jury, he also needs to enter the public key in the form line. The Provide public key button opens a window for entering both the public key and the seed phrase. At the same time, when entering a seed phrase, the user receives both a public and a private key, which immediately gives him access to the voting option. After submitting the form data, a modal window opens with a proposal to save the public key in local storage so as not to enter again after a reboot. This solution speeds up the authorization of the user as a jury given frequent use of the system. The list of competitions can be ranked as desired, divided into different parameters using search filters:
• Filtering by the name of the competition;
• Filtering by status;
• filtering by sub-governance;
• filtering by competitions where the key owner is the jury.
To take part in the vote, the user enters the seed phrase into a special form at the stage of entering the interface or when trying to vote.
Security
Easy Vote is a serverless application that is purely a web client. The program that is running in your browser without accessing remote servers. Nothing is done on third-party resources.
Also, nothing is saved in the browser since this is a pure client application. It does not store anything without the knowledge of the user, except for the key, and then only at the request of its owner.
The program is integrated only with the blockchain using the TON-SDK. The project does not include metrics, trackers, cookies, etc., for ensuring security. The program does not send any other XHR requests, which can be easily checked by an inspector.
Our system requires the input of sensitive information. The seed phrase gives the key to access the money in the wallet. The process is very sensitive and the safety requirements, in this case, are increased. Therefore, the system is designed in such a way as not to store anything superfluous.
User’s data — his seed-phrase is not stored in the system. It reads all the information in the FreeTON blockchain system online. For the sake of safety we had to abandon feedback on user actions. We do not know, for example, how many users visit the resource.
Technical details
The implementation of interaction with the blockchain is done using the ton-client-js library. The software solution was done in JavaScript and TypeScript. During the development process, the RSquad team used the React framework, the capabilities of which were optimal for the task of the project. Redux was used as a state container, allowing both to store and manage data.
The sequence of transferring information through the nodes was quite simple: when receiving data from the blockchain, they are sent to the store, from where the components receive them and display the data on the screen.
The filtering of contests occurs on the client-side, so the list of contests is requested once and the filtering works with it.
Active contests — the list was manually hammered from gov.freeton into a json file. The competition data comes from the blockchain at the address specified in the json file. There is a request to receive its submissions (also from the blockchain) for display on the screen. When you click on the competition, competition dates, time to finish, and status are also displayed.
Address with a link to ton.live — a link to the description of the competition on the forum.
SendAllvotes button — used to send all votes, making batch voting possible.
Submissions is a table with data, where you can also expand rows by clicking. If a public key is specified, and the owner is in the jury, the contest is in the voting status the voting form is displayed. If the public key is not specified, the form is shown if the contest is in the voting status.
If the owner of the key has already voted for submission — instead of the form, his vote is shown — rating, comment.
When expanded, a table with all votes is shown — score, jury data, comment.
Voting form — when entering data into the voting form, the “vote” button becomes active. When you click on it, the user is prompted to re-enter itif the user has not entered the seed phrase. If the seed phrase is entered, then the sending of data begins.
Send all votes — when using this button, a similar process occurs, only in batches. It is important to note that only correctly completed voting forms are sent.
Upload JSON file button — used only in a specific format with votes for submission. The corresponding voting forms are filled out. Sending is done similarly, but even more automated.
Donate modal — to support developer activities. If you are satisfied with Easy Vote and want to support the project, click on the Donate button. You will receive a wallet address to which you can transfer gratitude.
Summarizing all the above, I would like to add that all this work was done only to make interaction with Free TON Governance easier and more accessible for each user, and the security of the information entered was not exposed to any risk. The Free Vote platform remains free and open to everyone.
You can use the Easy Vote platform by clicking on the link: Easy Vote — platform that makes Free TON jury’s life easier (rsquad.io)