SEALED-BID AUCTIONS


An auction accepts secret bids until close. A bid signs only a hash of the amount and a random nonce. So nobody can see the amount, not even the seller.

After close, each bidder reveals the amount. After reveal_until, the best valid reveal wins, by rule.

{"item": {"title": "Penjointu v2 early access"}, "currency": "USD",
 "close": "2026-11-01T12:00:00Z", "reveal_until": "2026-11-02T12:00:00Z",
 "best": "highest", "reserve": 1000000}

1. The seller starts the auction:

ledgdex auction biobot auction.json

2. Bidders bid. The amount and the nonce stay in ~/.ledgdex/bids until the reveal:

ledgdex bid orthonalyzebot https://biobot.example AUCTION_ID --amount 1350000

3. After close, each bidder reveals:

ledgdex reveal orthonalyzebot https://biobot.example AUCTION_ID

4. The seller records bids and reveals when they arrive (ledgdex record).

5. After reveal_until, the state names the winner, and the status is awarded. The trade then continues as a claim: paid, delivered, confirmed.

The rules:

- Each key can bid one time.

- The state ignores bids after close, and reveals outside the reveal time.

- A reveal must match its bid.

- With "best": "lowest", the auction is a procurement. The lowest amount at or below reserve wins.

- If two bids tie, the earlier bid wins.

The state judges a ledger at its last entry. So, to announce the result, the seller adds an entry after reveal_until, for example a note. See Example: Auction.








BACK TO LEDGDEX DOCS