Inspiration
Traditional prediction markets force users to compromise their financial privacy, publicly exposing wallet balances, position sizes, and trading strategies on-chain. We built VEIL to prove that forecasting can be decentralized, transparent, and completely private using zero-knowledge proofs.
What it does
VEIL is a privacy-first prediction market platform powered by Midnight testnet and synced with live Polymarket data. It allows users to bet on real-world outcomes using ZK proofs, ensuring position sizes, account balances, and individual trades remain 100% confidential while outcome validity is verifiably guaranteed on-chain.
How we built it
- Smart Contracts & ZK Circuits: Written in Compact on the Midnight Network for private state transitions and zero-knowledge proof generation.
- Frontend: Built with Vite, React, and Vanilla CSS featuring an electric dark-mode interface and dynamic probability charts.
- Data & Caching: Supabase fast cache layer paired with background Vercel cron jobs for live Polymarket event ingestion and instant page loads (~0ms latency).
Challenges we ran into
- Managing low-latency client-side ZK proof generation without degrading UI responsiveness.
- Harmonizing real-time public market odds with encrypted, zero-knowledge private user states.
- Optimizing serverless production deployment on Vercel for Hobby-tier cron schedule compliance.
Accomplishments that we're proud of
- Seamlessly integrating live Polymarket feeds into a privacy-preserving Midnight ZK environment.
- Delivering a state-of-the-art UI with robust guest browsing and strict session-gated betting.
- Achieving instant market lookups via a hybrid Supabase local caching architecture.
What we learned
- How to architect zero-knowledge smart contracts in Compact that separate public market data from private user balances.
- Best practices in client-side ZK proof UX—keeping users informed while cryptographic proofs compile in the background.
What's next for Veil
- Midnight Mainnet Deployment: Transitioning from testnet to live Midnight production circuits.
- AI Automated Oracles: Integrating decentralized LLM oracle networks for instant, dispute-free market resolutions.
- Mobile PWA & Embedded Wallets: Bringing one-tap private forecasting to mobile web browsers worldwide.
Built With
- midnight
- react
- supabase
- vanillacss
- vercel
- vite
- zk-proof

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