Skip to main content
The Sealed-Bid Auction example sells a fixed SPL token lot to the highest of a set of hidden, fully collateralized bids. The seller’s lot stays escrowed in a base-layer token account owned by the auction PDA, bidders place private bids on a Private Ephemeral Rollup (PER), and after the deadline the program scans the bid accounts on-chain, pays the seller, refunds the losers, and releases the lot to the winner on the base layer.
This is an integration example, not a production auction house. It implements a single first-price auction per lot with deliberately simple deadline and refund handling.

View Repository

Build, test, and run the Anchor program and client.

On-chain Privacy

Understand the PER privacy model behind the hidden bid state.

What the example demonstrates

  • Hidden bid state on a PER: each bid lives in a private, auction-sponsored PDA that only gains PER access at creation, so amounts and bidders stay hidden until settlement.
  • Two-layer SPL escrow: the seller’s lot is parked in a base-layer auction ATA while bid collateral moves through a delegated auction-owned escrow on the ER.
  • On-chain winner selection: end_auction count-checks and scans exactly the accepted bid PDAs on the ER — no off-chain matching or reveal phase.
  • Cleanup-gated undelegation: the auction PDA can only undelegate after every bid account is settled and closed, and the base-layer finalize then transfers the lot to the winner.

PER Quickstart

Set up a Private Ephemeral Rollup and its access control.

SPL Token Custody

Custody and move SPL tokens from your own program on the ER.

Access Control

Grant and revoke PER permissions on program accounts.

Prediction Markets & Trading

Compose custody, privacy, and settlement into a full protocol.