Sealed-bid auction on Blacklight L1 (Sepolia) — NilSealedAuction + RevealHook #204
Watchmeecryt
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Built by @realchriswilder
Sealed-bid auctions on Blacklight L1 (Sepolia)
Built a working sealed-bid auction on Blacklight L1 testnet. Bids are sealed with
@nillion/blacklight-l1-sdkuntil close, then they open and the highest bid at or above reserve pays the seller in NIL.What it does
maxTTL), optional reserve, fixed bond, optional deposit.PUBLIC_CONDITION, committee 2-of-3, window[closeAt, revealEnd], andhook= our auction contract.onRevealhook settles:transferFrom(winner → seller)inside the reveal tx when gas is enough. Bonds refund after settle. A winner who cannot pay forfeits the bond andfinalizetries the next bid.Contracts we deployed
Sealing still uses Nillion
TriggerMarket. Settlement is our hook.NilSealedAuctionv2 (auction + RevealHook)0x7B2845F1529328041F90387ba4AFc4C4099F22f60xafab32b53e709d134f7f3d91e9f82da400fa08662f5cd622c0c86ebdb7d542760x68BC854300003f2b6831EC483E8Be6DF4bcc1bEF0xA7526a2ABB3D01BD21B3ac59B9201cC018560Dfd0xebB338689fB32317DDFD8282F8a42dcA6271cB2dLive Sepolia result: Lot 002 “Legder Wallet Dummy”
Sold for 0.208 NIL. Bond 0.1 NIL, seller deposit 0.5 NIL, no reserve.
0x4c532f4173d4c4cdd31f8bebc4e303049857c2d2613bc2b2cf01226e904c472eplaceBid0x42f5fd38d075e8de417332c1692a3493e7d637e746f31b3ca48671e40a96f0c7placeBid0xc386490490d99c1297c9cf6f001990098b5d7dc8d73c92c3f0d36f24b3916a5b0xd254c30ae31f7ea0e2dff3d74d59d5299bf7142d2b5592114888a8e5f7a21f6d0x532fcc181249ef483a75f0d5b45de68831d456d719fc226773450370164c1cd1Earlier v2 e2e also settled inside the reveal: winner 0.42 NIL, settle tx
0x92287befa708864eabd5236cd45290ad58cd2fe18e4b1741b933d1d8d2455dc7.Screenshots
Bidding open — amounts sealed, device-local plaintext note, one bid per wallet:
Settled — sold box, bid ledger, on-chain timeline:
Hook / gas note (why v2)
SDK rules followed: strip trailing 32-byte nonce from
plaintext, gatemsg.sender == TriggerMarket, never revert on a decision, returnHOOK_ACK(0xd8e071b6), stay idempotent.v1 returned
HOOK_ACKon gas-starved final reveals, soeth_estimateGas(and reconstructor bots) converged on a cheap path and settlement deferred tofinalize. v2 fails the under-gas path so estimation funds the in-reveal pay. Hook gas stays atdefaultHookGas(250000).Limits
kof the committee could open earlyCode
sealed-auction/, private — happy to share access)Would love feedback on whether fixed-bond + sealed-amount is the intended privacy model for sealed auctions, and on the recommended pattern for
eth_estimateGas+ hooks when third-party reconstructors race you.Live demo
Hosting: Auction Node server + Meta UI on Railway; contracts dashboard on Cloudflare Pages.
All reactions