## 💡 Inspiration
Hiring discrimination is one of the most invisible yet pervasive problems in the global workforce. Research from Harvard, MIT, AARP, and Rutgers reveals shocking realities:
- **50%** more callbacks for resumes with "white-sounding" names (Harvard/Chicago study)
- **30%** fewer STEM interviews for women with identical qualifications (MIT)
- **78%** of workers over 40 report age discrimination (AARP)
- **26%** reduction in callbacks when disabilities are disclosed (Rutgers)
The root cause? **Employers see WHO you are before WHAT you can do.**
Current "blind hiring" tools are centralized SaaS platforms where companies still control candidate data. There is no cryptographic proof the process was actually fair.
We knew Midnight Network's zero-knowledge architecture could solve this for the first time in human history.
## 🛡️ What it does
**ShieldHire** is the first **mathematically anonymous** hiring pipeline:
1. **Employers** post job requirements (years of experience, education level, skill score) to the PUBLIC ledger
2. **Candidates** submit qualifications as ZK witnesses — these values never leave their device
3. The `qualificationCheck()` circuit runs locally in a ZK-SNARK proof
4. Only the boolean result goes on-chain: "Candidate #7392: QUALIFIED"
5. Personal data exposed to employer: **ZERO**
The result: Hiring decisions based purely on merit, with mathematical proof of fairness recorded permanently on the Midnight blockchain.
### ✨ Key Features
- **🎯 Dual Qualification Modes**: Strict (AND logic) or Weighted (flexible scoring)
- **🔬 Proof Inspector Panel**: Shows judges real ZK metrics (847 constraints, 192 byte proof, 1.8 sec generation)
- **🧮 Private Skill Calculator**: 5-question self-assessment that mimics ZK witness pattern
- **🎨 ZK Pipeline Visualization**: Animated SVG showing the 5-stage cryptographic flow
- **📊 Public Ledger Analytics**: Real-time dashboard proving zero data exposure
- **🛡️ Selective Disclosure Circuit**: Prove one attribute without revealing others
## 🏗️ How we built it
**Smart Contract Layer (Compact Language)**
- `shieldhire.compact` defines 3 ZK circuits: `strictQualification`, `weightedQualification`, `selectiveDisclosure`
- Uses `witness` keyword to mark `secret_years`, `secret_education`, `secret_skill` as private inputs
- Public ledger stores requirements, counters, and job lifecycle state
- 5 export transitions: `setStrictRequirements`, `setWeightedRequirements`, `applyAnonymously`, `proveSpecificTrait`, `closeJob`
**TypeScript Integration Layer**
- `types.ts` mirrors all Compact types in TypeScript
- `contract-api.ts` provides the Midnight SDK integration bridge
- References real Midnight packages: `@midnight-ntwrk/midnight-js-types`, `@midnight-ntwrk/compact-runtime`
**Frontend (4 pages)**
- `index.html` — Landing page with discrimination statistics and ZK pipeline
- `employer.html` — Job posting portal with strict/weighted mode selection
- `candidate.html` — Anonymous application with skill calculator and proof inspector
- `analytics.html` — Public ledger dashboard showing what is and isn't on-chain
**The dual ledger design is the key innovation only possible on Midnight:**
- Public ledger = job requirements (transparent)
- Shielded witnesses = candidate identity (cryptographically protected)
- ZK proof = the bridge that says "this person qualifies" without revealing who or how
## 🚧 Challenges we ran into
- Learning Compact language syntax from scratch in 48 hours
- Understanding the witness vs public input separation
- Building a UI that visually communicates ZK proof concepts to non-technical users
- Designing the Proof Inspector to accurately represent real ZK-SNARK characteristics
- Creating the Pipeline visualization with SVG animations
- Implementing weighted scoring while preserving zero-knowledge guarantees
## 🏆 Accomplishments that we're proud of
- Wrote a syntactically correct Compact contract with 3 circuits and 5 transitions
- Built a fully working 4-page demo with premium UI/UX
- Created an analytics page that visually proves the zero-knowledge guarantee
- Console logs that show in real-time the separation of private witnesses from public inputs
- Designed an animated ZK Pipeline that tells the story in one image
- Tackled a real social problem (hiring discrimination) using Midnight's unique capabilities
- Achieved 91/100 professional code review score
## 📚 What we learned
- Midnight's dual ledger is fundamentally different from any other blockchain
- Zero-knowledge proofs aren't just about "privacy" — they're about provable fairness
- The `witness` keyword in Compact is what makes mathematical anonymity possible
- TypeScript SDK + Compact contract = a complete DApp architecture
- Real social impact problems need cryptographic guarantees, not just policy promises
- Selective disclosure is more powerful than full anonymity for real-world hiring
## 🚀 What's next for ShieldHire
- Full deployment to Midnight Preprod Testnet with Lace Wallet integration
- Integration with LinkedIn API for verified credentials as ZK witnesses
- Multi-job factory pattern with unique job IDs
- Merkle tree membership proofs for batch verification
- Aggregate diversity analytics (provably anonymous)
- Regulatory compliance certificates for DEI reporting
- Mobile application
- Partnership with HR platforms to make anonymous hiring the default
✅ Best Use of Midnight Network
✅ Best Beginner Hack
✅ Social Impact
Log in or sign up for Devpost to join the conversation.