About the Project

Inspiration

The healthcare industry is plagued by fraudulent claims and privacy concerns. Insurers need to verify whether a claim is legitimate, but patients and providers are reluctant to expose sensitive medical details. Our team was inspired by the idea that zero-knowledge proofs (ZKPs) can bridge this gap — allowing a claim to be verified without revealing the underlying private data.

What We Learned

  • How zero-knowledge cryptography can be applied in real-world use cases like insurance.
  • How to write and compile Midnight Compact contracts to enforce privacy-preserving logic on-chain.
  • The importance of balancing usability (smooth UX for insurers/providers) with security guarantees (correctness of proofs).
  • Collaboration workflows in a hackathon setting: fast iteration, rapid prototyping, and scoping features that fit within limited time.

How We Built It

  1. Smart Contract Layer

    • We wrote a Compact contract that defines claim verification logic.
    • Public inputs (e.g., claim ID, policy ID, timestamp) are checked, while private inputs (e.g., patient ID, medical codes, invoice amounts) stay hidden.
    • The contract uses ZKPs to confirm validity of claims without revealing sensitive details.
  2. Backend (Node.js + TypeScript)

    • Built an attestation server to issue verification challenges (via email codes).
    • Integrated cryptographic hashing (Poseidon) and proof generation.
  3. Frontend (React / Next.js)

    • A simple portal for providers to submit claims.
    • An insurer dashboard to check verification results in real time.
  4. Deployment

    • Used Docker for containerized services.
    • Tested in Midnight’s testnet with Compact CLI tools.

Challenges We Faced

  • Steep learning curve: none of us had prior experience with blockchain or ZK cryptography.
  • Tooling: debugging Compact contracts and setting up the prover/verifier workflow was tricky.
  • Time constraints: implementing both the cryptography and a clean user experience in a short hackathon timeframe required tough prioritization.
  • Interoperability: ensuring that the backend, contract layer, and frontend could communicate smoothly.

Built With

Share this project:

Updates