Inspiration
I kept thinking about how every "check your eligibility" flow online works the same broken way — you upload your payslip or bank statement to some server, and just trust that they'll handle it right. I wanted to see if I could build one that skips that trust step entirely. Not "we promise to protect your data," but "we literally never see it."
What it does
You chat with an AI agent about what you're checking eligibility for — say, a loan with a ₹50,000 income threshold. It asks you a couple of natural questions, and when it has what it needs, it runs the check through a Midnight smart contract instead of just comparing the numbers itself. The contract takes your income as a private input and spits out one thing: true or false. Not your income, not even to me.
To make that actually visible instead of just a claim, I built the demo as two panels side by side. Left side is your private chat. Right side is what would really leave your device — and your income shows up there as a black redacted bar, never the real number. Only the proof call and the final result show up.
How I built it
- Wrote the contract in Compact (
prooflend.compact) — it takes a public threshold, pulls your income in as a private witness, and only discloses the comparison result viadisclose(). - Paired it with a witness file (
witnesses.ts) that reads the income from local state only. - Built the frontend in React with Grok powering the conversation, and animated the proof steps so you can actually watch it happen.
Challenges I ran into
Honestly, the Midnight tooling gave me a rough weekend. The browser IDE I was using to compile the contract went down mid-hackathon, and setting up WSL2 locally hit a "catastrophic failure" I couldn't fully fix in time. Rather than burn the rest of the weekend fighting my environment, I focused on getting the full flow — contract logic, privacy model, and demo — working and understandable end to end. The contract is written and ready to compile the moment I get stable tooling access.
What's next
- Actually compile and deploy the contract on Midnight testnet
- Swap the simulated proof for a real call through Midnight.js
- Add more than one eligibility factor — age, location, etc.
- Hook it up to a real data source instead of manual input, same privacy guarantee
Built with
React, Midnight, Compact, Grok API, lucide-react, IBM Plex fonts
Built With
- compact
- grok-api
- ibm
- lucide-react
- midnight
- plex
- react
Log in or sign up for Devpost to join the conversation.