Haven

Haven: Private ZK escrow on Midnight. Shielded tokens, real proofs, nothing exposed on-chain.

Repo

About

## Wave 1 submission

This wave focuses on deploying Haven as a fully functional, end-to-end system with real on-chain shielded token custody on the Midnight preprod testnet, a polished frontend, and production deployment infrastructure.

Smart Contract and Core Protocol :-

The escrow contract was redesigned in Compact 0.23. The deposit circuit mints a real shielded token to the contract via mintShieldedToken, and release/cancel circuits spend that coin via sendShielded to the seller's or buyer's shielded key. The contract stores commitment hashes on-chain rather than plaintext, keeping all sensitive data private. Compiled artifacts were committed for consistent builds.

Coin Index Persistence :-

A critical challenge was making deposited coins spendable across server restarts. The network assigns a Merkle-tree index (mt_index) only after on-chain confirmation. The system queries the Midnight indexer's ZswapLedgerEvent, decodes it with the Ledger SDK, extracts the mt_index, and persists it to Supabase. An in-memory fallback provides additional safety.

Backend API :-

The Express 5 server manages wallet lifecycle, circuit orchestration, and escrow state with a state machine enforcing valid transitions (Created > Funded > Delivered > Released, with dispute/cancel branches). After each deposit, the backend auto-queries the indexer for the coin's Merkle index and persists it. Graceful degradation handles missing database columns.

Frontend :-

A React 19 + Vite 6 dashboard with a dark, glassmorphic UI. Integrates with Midnight wallet via Lace browser extension. Users create escrows, deposit shielded funds, confirm delivery, release funds, raise disputes, and cancel escrows. Includes animated state timelines, privacy toggles, transaction history, and confetti on releases.

Deployment :-

Backend on Render: API server (Node.js) and proof server (Docker), both on Midnight preprod. Frontend on Vercel. Supabase for persistent escrow storage and coin indices.

End-to-End Verification :-

Complete happy path verified on preprod: deploy > deposit > confirm delivery > release. Deposit mints a real shielded token, coin index persists, release spends it to the seller's shielded key. All 90 tests pass.

Live URLs :-

- API: https://haven-api-jce5.onrender.com - Proof Server: https://haven-proof-server.onrender.com - GitHub: https://github.com/Anubhab-Rakshit/haven

From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.