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

SurveyWei

SurveyWei enables market researchers on the Optimism blockchain to create surveys and reward respondents for answering questions.

SurveyWei

Created At

Scaling Ethereum 2023

Project Description

SurveyWei is a survey platform to create and participate in secure, decentralized surveys on the Optimism Blockchain. Respondents can earn crypto and get paid for taking surveys; and survey creators build survey and conduct quality market research. Fundamentally, the Market Research industry is broken -- there's rampant fraud, no data integrity, outdated rewards, and no incentives to provide quality data. By using Optimism Attestations, we begin to address these problems by incentivizing respondents to provide quality data and grow their credit score. When respondents answer truthfully and aren't flagged for cheating or fraud, their credit scores strengthen through attestations. When a respondent has earned a high credit score, they're paid out instantly for finishing a survey. Otherwise, they must wait 7 days for their data to be verified by the market researcher. SurveyWei addresses data integrity by saving a hash of every respondent's answers on the blockchain. At any point, a market researcher can verify that the data they’re viewing for their research matches what was originally submitted by the user.

How it's Made

Front end: built using standard react and javascript and deployed using AWS amplify. We use web3-react and Alchemy nodes for integrations with our smart contract. The app reads and writes from firebase and the smart contract we deployed.

Smart contract: coded in solidity and deployed through Remix, first on the Optimism Goerli network, and finally on the Optimism main net. We used Optimism's Attestation contract and developed and interface for writing and reading attestations. This is one of the core features of our platform because we use attestations to build a credit score that strengthens the incentives to participate and provide quality data for market research. There was a slight learning curve with optimism because of network issues and poor support from metamask, but we relied on Coinbase wallet and successfully deployed for our first time on an L2 network.

Back end: The event listener was coded in python using the web3 library and deployed on AWS EC2. We used dynamodb to manage state for the event listener and saved our events in Firebase collections to make front end reads easy. Alchemy nodes were also used in this process. Once the front end triggers a smart contract transaction, and after the events are emitted, the listener grabs the data and saves it in firebase, the complete the loop and make the data available on the front end. This is the first time we ever built an event listener, and it was amazing to gain this experience, learn more about building durable ec2 instances, and build an end-to-end full stack web3 application.

Our backend repo is here: https://github.com/Tgb29/surveywei-contracts

Our front end repo is here: https://github.com/Tgb29/surveywei

background image mobile

Join the mailing list

Get the latest news and updates