ZkGas is a social media application where users create communities, polls and walls. A community is a shared space, where community members post/view messages and polls. A poll has a question and a set of answers. Users vote on answers of the polls created by other users. A wall/profile is a dedicated space for a user, where other users post messages which are only visible to the wall creator. While creating communities/polls, a user sets necessary requirements (for example a user must belong to "Asia Pacific" region) to perform the actions (join/vote). For an user to perform an action, he must provide information that will satisfy the requirements/rules. Only on successful validation of the provided information, a user can perform the actions. The validation of the information uses zero knowledge thereby providing complete privacy on the information provided by a user.
Building ZkGas involved a combination of blockchain, web development, and zero-knowledge proof technologies. Here's a breakdown of how it was made:
- To join a community, or to vote on a poll, the creator of the community/poll sets some requirements. The requirements are then converted into a circuit which is made using Noir. The circuit is compiled, and a verification contract is deployed on the Blockchain (EVM compatible). Currently, we have deployed it on Ethereum Sepolia Testnet.
- To join a community, or to vote on a poll, a user has to provide the information proving that he has the information required to satisfy the requirements. After a user enters the information, by using Noir, a zero-knowledge proof is created. The user has to submit the proof to the deployed verification contract on the Blockchain. Only the proof is sent to the Blockchain and no other information provided by the user is stored either at Blockchain or at the server providing complete privacy to the information provided by the user.
It uses Noir for creating the Zero-Knowledge Proofs and verify them through the verification contract deployed on the EVM Compatible Blockchain which helps in preserving the privacy of the user. We integrated Push Protocol for the community chats within a community so that users can interact with each other within a community.