project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

OpenSurvey

OpenSurvey is a decentralized and sybil-resistant survey dApp leveraging blockchain and zkProofs. It allows users to publish and answer surveys, aggregate data and reward survey contribution allows users to publish and answer surveys and aggregate data from them

OpenSurvey

Created At

ETHOnline 2023

Project Description

OpenSurvey is an innovative decentralized survey application that prioritizes sybil-resistance while maintaining data quality. It achieves this by harnessing Zero-Knowledge Proofs (ZkProofs) using Sismo.

The application revolves around three core features:

  • Survey Creation
  • Survey Participation
  • Survey Data Analysis

To illustrate its utility, consider the scenario of conducting a political opinion survey. When using the blockchain for our survey, we encounter two significant challenges:

The risk of participants from any location, potentially skewing the results The possibility of individuals employing multiple wallets to manipulate the survey To address these concerns, we implement a two-pronged verification approach.

Users are required to provide a 'ZkProof of Humanity' to thwart sybil attacks, and a 'proof of country' to ensure that external influences from other nations do not affect the survey.

Furthermore, we may also request a 'proof of age' to guarantee that only eligible participants have an impact on the survey results. In this context, we leverage Sismo to facilitate the generation of these ZkProofs.

OpenSurvey also tackles another set of issues related to data storage and aggregation. Traditional blockchain storage is expensive, and querying survey responses from the blockchain can be time-consuming and inefficient.

To overcome these challenges, OpenSurvey takes advantage of two key technologies:

IPFS (InterPlanetary File System) for cost-effective and efficient data storage. TheGraph, a powerful tool for streamlined data retrieval and analysis. In summary, OpenSurvey stands as a powerful and efficient solution that not only ensures data quality and sybil-resistance through ZkProofs but also addresses data storage and access issues by utilizing IPFS and TheGraph.

How it's Made

Survey Creation:

App has a front-end in react, there is a dedicated page for the survey creation

User can Define questions for the survey, there are 3 types for the answer of the survey :

  • Mutiple answer (ex : asking for yes/no)
  • Range of number (ex : asking for age)
  • ZkAnswer

The ZkAnswer is a bit special as it allow the survey creator to ask for a ZkProof and the value from Sismo response will be the value of this answer, this is done with the userSelectable zkProof value from Sismo. This guarentee a better authenticity of the data

Then The survey Creator can ask for zkProofs as condition for submiting the survey.

There is a search bar, that fetch sismo.api to find a datagroup description corresponding to what the user has searched, if he want to search for proof of degree for example, he can search for it

Then the creator can set an amount of tokens as reward, since the app is sybil resistant, there is no issue of this kind of system and it allow some incentive for answering the survey.

Lastly, the user need to submit the survey, first of all, All the survey data is uploaded on IPFS, like questions and sismo group involved

The file CID returned by IPFS will be our id for the survey, it will allow us to fetch all the relative data after that

Then we upload on the blockchain only what we need, the FileCID the number of questions, and sismo group involved to generate the zkProof afterward We emit a event in a smart contract once the survey deployed to be fetched by TheGraph and accessible in the APP

Survey Browser and Participation:

On the app, we use the graph to query the latest survey deployed, then we query the survey data with the ipfs web3.link url

Given this, we already have the data to display to the user,

Then the user can simply answer all the questions

Then he need to generate a zkProof with sismo connect

Then he need to make a transaction to answer the survey on the blokchain, he needs to put the fileCID, his answers numbers and the sismo Response

Once processes in the blockchain, the answer of zkProof answer type will be automatically attributed, and a event with all the answer will be emitted

Survey Data Analysis :

Lastly, For each survey (so each CID) we use theGraph to query all the answer associated and then make charts with It

User can see the charts by toggling a button in the top of the survey

background image mobile

Join the mailing list

Get the latest news and updates