Inspiration
Organizations often need to collect sensitive data such as salary information, employee feedback, or research responses, but participants are hesitant to share honest information when privacy cannot be guaranteed. We wanted to build a protocol where users can contribute confidential data while remaining confident that their individual responses are never exposed.
What it does
Cohort is a privacy-preserving data collection protocol built on Midnight. Each dataset is deployed as an independent confidential smart contract with a predefined schema and participation threshold. Participants anonymously submit their responses, and only cryptographically verifiable aggregate results are revealed once the threshold is met, ensuring both privacy and trust.
How we built it
We built Cohort using Midnight Compact, Zero-Knowledge proofs, React, TypeScript, Vite, and the Midnight SDK. The system consists of a Registry contract that manages datasets, independent Dataset contracts for confidential surveys, deployment tooling, and a frontend for discovering and interacting with deployed datasets.
Challenges we ran into
The biggest challenge was migrating the project to a modern, fully compatible Midnight ecosystem. We resolved compiler and runtime incompatibilities, regenerated proving keys, updated deployment scripts, migrated SDK packages, and adapted the application to the latest Midnight architecture while ensuring the contracts, deployment pipeline, and frontend remained consistent.
What we learned
This project gave us hands-on experience with confidential smart contracts, zero-knowledge proving, private state management, blockchain deployment pipelines, and the importance of maintaining version consistency across an evolving cryptographic ecosystem.
What's next
We plan to support dynamic survey creation instead of fixed schemas, richer analytics, production-ready browser wallet integration, organization-specific permissions, and deployment on public Midnight networks to enable privacy-preserving data collection at scale.
Built With
- compact
- docker
- midnight
- react
- typescript
- vite
Log in or sign up for Devpost to join the conversation.