Hi all — sharing a project I’ve been building: a sealed-bid auction dApp on Midnight, implemented as a native Compact contract (not a port from an EVM contract).
What it does
During bidding, bid amounts stay private. The bidder’s identity on-chain is a persistent pseudonymous public key (not their wallet address) — this prevents linking a bid to a wallet address, but the same pseudonym is reused across auctions, so cross-auction correlation is possible by design. It’s a commit-reveal scheme where the commitment hash is computed inside the ZK circuit itself, using Compact witness values that never get serialized into the transaction.
Why it’s Midnight-native, not an EVM port
On an EVM chain, every input to a transaction (sender, calldata) has to be public because every validator re-executes it against public state. Midnight breaks that coupling — a Compact contract compiles to a ZK circuit, the sender proves a valid state transition happened, and validators check the proof instead of the private inputs. So bid privacy here isn’t bolted on top of a public-by-default chain, it falls directly out of how Midnight validates transactions. Same idea for double-bid prevention: instead of a msg.sender-keyed mapping, it’s a nullifier-style on-circuit assertion tied to a derived bidderPublicKey.
Try it
Live demo: https://midnight-private-auction.vercel.app
GitHub: GitHub - pplmaverick/midnight-private-auction: Sealed-bid auction DApp on Midnight Network using Compact private state and ZK proofs · GitHub- Currently one of the contracts deployed on Midnight mainnet
Current limitation: the frontend needs a wallet that implements getProvingProvider() — 1AM wallet works, Lace doesn’t support this yet (known limitation). So please use 1AM to try the live demo for now.
Note: If your 1AM wallet gets stuck syncing at 99%, go to Settings → Delete Cache & Sync from chain websocket to resolve.
Stack: Compact contract; frontend delegates ZK proving to the connected wallet via getProvingProvider() (1AM), with a local Proof Server for the backend deploy/e2e scripts — all built on @midnight-ntwrk/midnight-js, React/Vite frontend via dapp-connector-api. Full architecture, contract interface, and privacy boundary breakdown are in the README.
Happy to answer questions about the Compact circuit design, the commit-reveal scheme, or the deployment process (public RPC tx-size limits, wallet sync, etc.) — all documented in DEPLOYMENT.md if anyone’s building something similar.
