Inspiration
We wanted to give users more control over the value created by their data. Instead of sending personal data to companies, MidVault lets users keep their data on their device and earn from verified aggregate insights.
What it does
MidVault is a privacy-focused data marketplace built on Midnight. Users can vault their data, choose what they consent to share, and earn when companies query aggregated insights.
Companies pay for queries and receive a ZK-verified result without getting access to individual user records.
How we built it
We built the project using Midnight's shielded data and zero-knowledge capabilities.
- Midnight Compact for the ZK circuits and smart contracts
- Next.js + TypeScript for the frontend
- Midnight DApp Connector for wallet integration
- Tailwind CSS for the UI
User data is processed locally, while the blockchain handles commitments, queries, proofs, and payments.
Challenges we ran into
The main challenge was designing the system so that useful aggregate results could be produced without exposing individual records.
We also had to work through the details of consent handling, ZK circuit design, payment distribution, and connecting the frontend with the Midnight network.
Accomplishments that we're proud of
We built a working flow from data vaulting to querying and payment. The project demonstrates how users can maintain control of their data while still receiving value from it.
We're also proud of implementing consent controls, aggregate ZK proofs, and automatic payment distribution in one application.
What we learned
We learned more about Midnight's privacy model, Compact, shielded data, and zero-knowledge circuits. We also learned that privacy needs to be considered across the whole application, not just inside the smart contract.
What's next for MidVault
Next, we want to support more types of queries such as averages, distributions, and correlations. We also plan to add automated data connectors, a company query builder, DAO-based query pricing, and eventually a mobile app.
Built With
- compact
- midnight
- nextjs
- typescript

Log in or sign up for Devpost to join the conversation.