Sealed-bid private auction built on Midnight's Private Reserve Auction Compact contract.
- Auctioneer creates an auction with a hidden reserve (commitment on-chain).
- Bidders place bids with DApp-scoped public keys (harder to track wallets across apps).
- When the auction closes, the auctioneer runs
revealWinto prove the reserve and return the winning bid.
- Docker Desktop (running)
- Node.js 22+ (recommended)
- Compact compiler
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/latest/download/compact-installer.sh | sh
compact updateyarn install
yarn test:auction:docker # starts compose.yml, runs test, tears down
# or manually:
yarn env:up # docker compose -f compose.yml up -d --wait
yarn test:auction # deploy → 2 bids → reveal winner
yarn env:downRequires Docker Desktop running.
yarn web:dev- Install 1AM wallet and set network to Preview
- Log in → Wallet tab → Connect 1AM Wallet (Preview)
- Fund via Preview faucet (unshielded address)
- Header shows Preview address + tDUST when connected
Falls back to a local demo address if no extension is detected.
Shared auth + auction data (falls back to browser localStorage when keys are empty).
- Create a project at supabase.com
- In SQL Editor, run
supabase/schema.sql - Paste credentials in
web/src/config/supabase.ts(Project Settings → API):
export const SUPABASE_URL = 'https://cqdnqmaxelryjmntvrkk.supabase.co';
export const SUPABASE_ANON_KEY = 'eyJ...your-anon-key...';Or use web/.env.local (see web/.env.local.example).
-
Auth: sign up / log in with email (RLS ties rows to
auth.uid()). Link 1AM wallet after login. -
Email confirmation: disable in Supabase Auth settings for hackathon speed, or confirm email before first login.
-
Restart
yarn web:dev— login page shows “stored in Supabase”
Bid visibility (your schema): only the bidder and auctioneer can read bids (not public to all bidders).
See contracts/SEALED_BIDS_REVIEW.md — v1 hides reserve only; bid amounts are public on-ledger. v2 design uses commitments.
yarn compile:contractcontracts/
private-auction.compact # Midnight official reserve auction (branded)
SEALED_BIDS_REVIEW.md # sealed-bid upgrade notes
managed/private-auction/ # compiled ZK artifacts (committed)
witnesses.ts # localSk secret key handling
src/test/auction.test.ts # 3-wallet integration test
web/ # React demo for judges / video
- Problem: Open auctions leak bids — sniping and signaling ruin fair price discovery for high-value items.
- Why Midnight: Reserve and bidder privacy require ZK; public chains cannot do sealed bids fairly.
- User: Auction houses / creators selling art, IP, or collectibles with sealed bidding.
- Commitment-based bid amounts (fully sealed until close)
- 1AM wallet + Preview on-chain deployment
- Settlement circuit (winner pays, item transfers)
Apache-2.0 (see LICENSE)