-
-
Sleek cyberpunk landing page with unified brand typography, smooth micro-animations, and seamless wallet provider detection.
-
Secure cryptographic handshake using the 1AM wallet's text-encoded signature to verify identity without exposing private keys.
-
Interactive protocol architecture guide explaining local WASM-compiled circuit witness generation and on-chain ledger anchoring.
-
Constructing zero-knowledge proofs client-side inside a sandboxed UI complete with a real-time, terminal-style live kernel log.
💡 Inspiration
We live in a world where proving our identity forces us to surrender it. Whether it's verifying age to access a service or proving financial solvency for a loan, we are constantly required to hand over sensitive raw data (like full birthdates or bank statements) to centralized third parties. These centralized honeypots are massive security risks.
When we discovered the Midnight Network, we realized we finally had the tools to solve this. We built ShadowTrace to eliminate the trade-off between privacy and usability by leveraging Midnight's Dual-State model and zero-knowledge cryptography.
⚙️ What It Does
ShadowTrace is a zero-trust identity primitive. It allows users to prove credentials on-chain without ever exposing their underlying private data.
We implemented a Selective Disclosure architecture where users can dynamically choose what to prove:
- Age Verification: Proving age
>= 18without revealing the actual Date of Birth. - Financial Solvency: Proving sufficient funds without revealing exact balances.
- Citizenship Attestation: Proving jurisdiction without revealing a passport number.
When a user submits their data, ShadowTrace processes it entirely locally in the browser. It generates a 128-byte zk-SNARK proof and anchors only that cryptographic hash to the Midnight Ledger. The raw data never touches a server.
🛠️ How We Built It
We architected ShadowTrace using a strict separation of concerns to align with Midnight's core philosophy:
- The Frontend: We built a high-fidelity, Vercel-style minimalist UI using Vanilla JS and modern CSS. We intentionally kept the client-side prover as lightweight and fast as possible.
- The Smart Contract: We utilized Compact, Midnight's TypeScript-based domain-specific language, to write the zero-knowledge circuits (e.g., our
prove_age_18circuit). - The Web3 Integration: We used the
@midnight-ntwrk/midnight-jsSDK to handle the wallet connection (Lace/Nightly/1AM Wallet) and execute the Compact circuit entirely client-side using the local Private State.
🚧 Challenges We Ran Into
The biggest paradigm shift was understanding the Dual-State Model. Traditional Web3 development taught us that everything goes on-chain. Learning how to keep the Private State strictly localized on the user's device while only pushing the zk-SNARK to the Public State required a complete rethinking of our data flow. Additionally, setting up the Vite/Next.js bundler to handle the heavy WebAssembly (WASM) cryptography required by the Midnight SDK was a technical hurdle we had to overcome.
🏆 Accomplishments That We're Proud Of
- Compact Success: Successfully compiling our first Compact circuit and integrating it into a beautiful, responsive frontend.
- Visual Prover: Building a dynamic state-engine in the UI that visually simulates the complex ZK-proving process so non-technical users can understand what is happening under the hood.
- Zero-Trust Sessions: Designing a "Zero-Trust" session management system that fully purges local state upon wallet disconnection.
📚 What We Learned
We learned that privacy doesn't have to mean bad UX. By leveraging Midnight, we realized that zero-knowledge proofs can be generated seamlessly in the background. We also gained a deep appreciation for the Compact language, which makes writing cryptographic circuits feel as natural as writing standard TypeScript.
🚀 What's Next for ShadowTrace
Our next step is to expand the Selective Disclosure primitives. We want to integrate digital signature verification so that ShadowTrace can natively read e-Passports and government IDs, allowing the ZK circuit to mathematically prove identity directly from an NFC chip. Ultimately, we envision ShadowTrace becoming the default login standard for compliance-heavy Web3 DApps.
Built With
- css
- html
- javascript
- midnight
- next.js
- react
- typescript
- vite
- zero-knowledge

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