A privacy-preserving survey platform built on Fully Homomorphic Encryption (FHE) that guarantees absolute privacy. Individual responses remain encrypted forever, while still enabling aggregate statistical analysis by survey creators.
Traditional survey platforms pose significant privacy risks:
- Unrestricted Access: Individual responses can be accessed by survey creators or third parties
- Data Breach Risks: Data stored in plain text or simple encryption
- Imperfect Anonymization: Individual data can still be linked back to respondents
- Centralized Trust: Reliance on administrators to maintain privacy
FHEdback leverages Fully Homomorphic Encryption (FHE) from Zama to provide a revolutionary solution:
How FHE Works:
- Responses are encrypted on the client-side before sending
- Data remains encrypted at all times on the blockchain
- Mathematical operations are performed directly on encrypted data
- Aggregate results can be decrypted without accessing individual data
Result: Survey creators get accurate statistical insights without ever being able to view individual respondent answers.
- ๐ Absolute Privacy: Individual answers can never be accessed in plain text
- ๐ก๏ธ High Security: Data is always end-to-end encrypted, reducing data breach risks
- ๐ Statistical Analysis: Supports various statistical operations on encrypted data (sum, average, min, max, frequency)
- ๐ Decentralization: Data stored on-chain, no single point of failure
- ๐ Transparency: Open source smart contracts enable independent audits
- โก Zero-Knowledge Proofs: Response validation without revealing actual values
"Anyone who cares about their data privacy can leverage FHEdback to gather insights without compromising privacy."
- Research Organizations: Sensitive surveys with guaranteed respondent privacy
- Corporations: Employee feedback without risk of individual identification
- Educational Institutions: Safe and private learning evaluations
- Healthcare: Health surveys with HIPAA/GDPR compliance
- Government: Public polling with guaranteed privacy
1. CREATE โ Survey creator defines questions and metadata
Survey contract deployed to blockchain
โ
2. PUBLISH โ Survey published and accessible to respondents
FHE statistics initialized
โ
3. RESPOND โ Respondents fill out survey
Answers encrypted with FHE on client-side
Encrypted data sent to blockchain
โ
4. STORE โ Encrypted answers stored on-chain
Statistics updated homomorphically
โ
5. CLOSE โ Survey closed after reaching target respondents
or manually closed by creator
โ
6. ANALYZE โ Survey creator can access aggregate statistics
Decryption only for aggregates, not individuals
- โ Survey reaches minimum number of respondents as predetermined
- โ Survey creator manually closes the survey early
- โ Individual answers can never be accessed in decrypted form
Frontend Demo:
- Primary: https://fhedback.vercel.app
- Alternative: https://fhedback.mew3.xyz
Network: Sepolia Testnet (Chain ID: 11155111)
Factory Contract - Main Entry Point
Address: 0x82C34294A1D9c8e38B43CE916D0C566416b1d7DC
Status: โ
Active
Network: Sepolia Testnet
Purpose: Factory to create new survey contracts
Explorer: https://eth-sepolia.blockscout.com/address/0x82C34294A1D9c8e38B43CE916D0C566416b1d7DC
Example Survey Contract
Address: 0x1d1eBa567d9797e344AEBed9e29b8966B7084960
Status: โ
Active Survey Instance
Explorer: https://eth-sepolia.blockscout.com/address/0x1d1eBa567d9797e344AEBed9e29b8966B7084960
ConfidentialSurvey_Factory
- Creates new ConfidentialSurvey instances for each survey
- Each survey has a unique contract address
- Factory records and manages all created surveys
- Facilitates tracking and survey management
ConfidentialSurvey
- Individual survey instance with FHE capabilities
- Stores questions, metadata, and encrypted responses
- Manages survey lifecycle (Created โ Active โ Closed)
- Provides encrypted aggregate statistics
For complete technical documentation, please review the README in each directory:
- Complete smart contract implementation
- Survey creation management
- Encrypted response storage
- Data aggregation process with FHE
- Testing & deployment guide
- Web application source code
- Survey creation and publication
- Response submission interface
- Aggregate results visualization
- Setup & development guide
- Access application: Visit fhedback.vercel.app
- Connect wallet: Connect your MetaMask or other wallet
- Create survey: Use the form builder to create a survey
- Share link: Share the survey link with respondents
- View results: Access dashboard to view aggregate statistics
See complete documentation at:
- Smart Contracts: contracts/README.md
- Frontend: frontend/README.md
This section outlines potential enhancements and technical challenges identified during development. These represent areas of interest for future exploration, not committed roadmap items.
Current State: Only supports rating scale questions (1-5)
Potential Additions:
- Multiple choice (single selection)
- Checkbox (multiple selections)
- Yes/No questions
- Text input (open-ended responses with FHE)
- Ranking questions
- Matrix/Grid questions
Challenge: Each question type requires different FHE encoding and aggregation methods.
Concept: Token-based rewards from survey creators to respondents
Considerations:
- Reward escrow during survey period
- Automatic distribution upon submission
- Support for ETH and ERC-20 tokens
- Fair distribution for partial completions
Challenge: If rewards are implemented, bot abuse becomes critical
Potential Approaches:
- On-chain identity verification (WorldID, Proof of Humanity, Gitcoin Passport)
- Minimal staking requirements
- Rate limiting and cooldown periods
- reCAPTCHA integration for high-value surveys
- Balancing privacy with accountability
Current State: Basic survey listing
Potential Features:
- Filtering (category, status, rewards, completion rate)
- Sorting (date, popularity, deadline)
- Search functionality (title, tags, creator)
- The Graph integration for efficient querying
Concept: Optional demographic profiling while maintaining privacy
Approach:
- Encrypted demographic data (age, location, gender)
- Selective disclosure by respondents
- Aggregate-only analysis with k-anonymity
- Example: "Average rating by age group"
Current State: Basic operations (sum, average, count)
Potential Operations:
- Standard deviation and variance
- Median and mode
- Correlation between questions
- Conditional statistics
Challenge: FHE computational complexity and gas costs increase significantly.
Issue: Reported to Zama Team
Problem: BeaconProxy implementation causes FHE decryption failures
Current Workaround: Using direct contract deployment
Impact if Resolved:
- ~80% reduction in deployment gas costs
- Ability to upgrade contracts without data migration
- Standardized interface across all surveys
Status: Awaiting feedback from Zama team on fhEVM compatibility with proxy patterns
Contributions are very welcome! Please:
- Fork the repository
- Create feature branch:
git checkout -b feature/feature-name - Commit changes:
git commit -m "feat: description" - Push to branch:
git push origin feature/feature-name - Open a Pull Request
This project uses MIT License.
- Zama - FHE Technology & FHEVM
- OpenZeppelin - Smart Contract Libraries
- Hardhat - Development Framework
Project Links:
- Repository: github.com/erzawansyah/fhedback
- Live Demo: fhedback.vercel.app
- Website: mew3.xyz
Connect with the Developer:
- GitHub: @erzawansyah
- Twitter/X: @mew294071
- Discord: erzawansyah
- Farcaster: mewww.eth
Built with โค๏ธ using Zama's Fully Homomorphic Encryption