Wiki/Auction Platform/Auction Settlement Cron: What Happens at the Stroke of the Bell
05Auction Platform3 min read

Auction Settlement Cron: What Happens at the Stroke of the Bell

How the end-of-auction cron picks the winner, captures the deposit, transfers Core inventory, and writes the settlement row in bounded batches.

The auction’s timer expires. The platform doesn’t wait for somebody to log in Monday morning to figure out what happened. A bounded cron-backed RPC runs every few minutes and does the settlement deterministically in small, locked batches.

The steps

1. Determine the winner: highest bid above reserve. If reserve isn’t met, the lot enters the no-sale flow (see no-sale-relist article).

2. Capture the deposit: the winning bidder’s deposit-on-file is applied to the H2 escrow that the cron creates. The escrow opens in held state immediately if the deposit covers the full lot value, or pending_deposit if the buyer needs to top up.

3. Transfer the inventory in Core: the underlying assets get a status flip from "auction-listed" to "sold-pending-shipment" and are linked to the winner’s outbound order (auto-created).

4. Close the lot: lot.state = closed, end timestamp recorded, audit row written.

5. Write the settlement row: the seller’s payout, platform’s fee, and any side-fees are computed by the H6 fees engine and snapshot onto a settlement row attached to the deal.

6. Notify both parties: realtime + email digest, depending on preferences.

What if the deposit isn’t enough?

The escrow opens pending_deposit and the buyer has 7 days to top up. If they don’t, the cancel_stale_pending_deposits cron fires, the escrow auto-cancels, a strike is recorded against the buyer (see three-strikes article), and the lot is unpublished — at which point the F5 auction-no-sale flow can relist it on the market.

Why a cron, not a webhook

Auctions can have hundreds of bids in their final seconds. A webhook-per-bid model is hard to make atomic; a cron-per-lot is simpler. The cron runs every few minutes, claims a small locked batch of lots whose end time has passed (and are not yet settled), and runs the deterministic flow. By Monday morning there’s a row in the database that says exactly what happened.