Inspiration
The $600B digital ad industry is built on a broken promise: you must surrender your identity to receive relevant ads. Cookie deprecation, GDPR, and Apple ATT have exposed this model's collapse. We built AdMidnight to make privacy the load-bearing wall — not a marketing claim.
What it does
AdMidnight is a privacy-preserving programmatic ad protocol on Midnight Blockchain:
- AI Track: Users' devices run a local AI model to match ads. A ZK proof of the match is generated on-device using Midnight's Compact circuits. Raw browsing data never leaves the device — ever.
- DeFi Track: Advertisers submit sealed bids via Pedersen commitments (H(bid||nonce)). The auction settles via ZK proof — the winner is proven without revealing losing bids. Users receive anonymous rewards via nullifiers — no wallet address linked to browsing.
How we built it
- Compact smart contracts: AdMatchRegistry, AdAuction, UserReward — three circuits on Midnight
- NestJS backend: Clean Architecture, SOLID principles, provider pattern per Midnight SDK v4.0.4
- Next.js dashboard: Advertiser campaign management with Lace wallet integration
- Flutter mobile app: On-device ZK proof generation, anonymous reward claiming
Challenges we ran into
Accomplishments that we're proud of
- First known implementation of ZK-verified ad impression counting on Midnight
- Complete sealed-bid auction with ZK settlement proof
- SOLID/DRY/Clean Architecture throughout — production-grade codebase
What we learned
- Midnight's three-context model (Witness → Circuit → Ledger) maps perfectly to ad-tech data flow
- The Plonk/BLS12-381/JubJub proof system imposes field constraints on circuit design
- Privacy-by-architecture is fundamentally different from privacy-by-policy
What's next for Ad Midnight
- OpenZeppelin FungibleToken integration for NIGHT/DUST reward token
- Lace wallet full integration for transaction signing
- Deploy to Midnight Testnet (Preprod)
- Build Club accelerator application
Built With
- compact
- flutter
- midnight
- nestjs
- nextjs
- plonk
- prisma
- redis
- tailwindcss
- typescript
- zero-knowledge-proofs
Log in or sign up for Devpost to join the conversation.