Abstract
This paper presents an innovative approach to blockchain voting through the development of a smart-contract tool designed for the TON (Telegram Open Network) blockchain. Developed by XPTeam for the TON contest running from June 2nd to June 25th, 2023, the 0 Gas Vote project leverages the new ECRECOVER opcode in TON’s TVM (TON Virtual Machine) to enable whitelisted users to cast votes without incurring gas fees, traditionally a barrier to participation in decentralized voting mechanisms.
Introduction
Blockchain technology offers a transparent, secure, and immutable way to conduct elections and polls, promising to revolutionize the traditional voting systems plagued by inefficiencies and vulnerabilities. However, the associated gas fees for transactions on blockchain networks often deter widespread adoption. Addressing this challenge, the 0 Gas Vote project introduces a method allowing users to participate in voting activities on the TON blockchain without bearing the cost of gas fees, thus enhancing accessibility and participation.
Methodology
The core of the 0 Gas Vote system is a smart contract deployed on the TON blockchain, which utilizes the ECRECOVER opcode to validate voters’ signatures without spending gas. The process begins with the setup of the voting parameters within the smart contract, including the ballot ID, voting model, and a whitelist of eligible voters’ public keys.
Voters generate a pair of keys and provide the public key to the administrator, who then whitelists the voters by recording their public key hashes on the smart contract. To cast a vote, a voter signs a predetermined message (either for or against the proposal) with their private key. The signature, along with the voter’s choice, is sent to the administrator, who then submits it to the smart contract.
The smart contract, leveraging the ECRECOVER opcode, verifies the signature against the voter’s public key hash stored on the blockchain. Upon successful verification, the vote is recorded, and the tallies for or against the proposal are updated accordingly.
Results and Discussion
The implementation of the 0 Gas Vote system was tested during the specified contest period, with the deployment and operation of the smart contract documented in detail. While the innovative use of ECRECOVER promises a gasless voting experience, the project encountered a significant obstacle with the opcode returning only a status 0 for any hash, v, r, s combination, indicating a potential flaw in the TON TVM’s handling of the opcode.
Despite this setback, the project showcases a pivotal step towards enabling gas-free transactions on the TON blockchain, potentially transforming how voting and governance can be conducted in decentralized systems. The resolution of the ECRECOVER opcode issue remains a critical next step for the project.
Conclusion
The 0 Gas Vote project represents a significant advancement in blockchain voting technologies, addressing the critical barrier of gas fees. By allowing voters to participate without incurring transaction costs, the project opens new avenues for democratic participation in blockchain governance. Further research and development are required to overcome the technical challenges encountered, underscoring the importance of continuous innovation in the blockchain sector.
Contacts and Additional Information
For further details on the 0 Gas Vote project, interested parties can reach out via Telegram: UltraNihilist and YANMSK. A video demonstration of the project is available here.