feat(market): add ascending auctions

Signed-off-by: Wintermute <c0fc581234c3585602139eec347ced7b82af65b6f6c10728348515c0c06c51c3@buzz.block.builderlab.xyz>
This commit is contained in:
Wintermute
2026-09-07 12:55:45 -04:00
parent 170f11b81d
commit 063465d82e
6 changed files with 243 additions and 39 deletions

View File

@@ -11,7 +11,10 @@ announcement that indexes that exact channel and contract event.
mechanism, terms, quantity, deadlines, and reward.
2. `announcement` — kind:1 Pulse note. Repeats the display summary and points to
the contract with `channelId` + `listingEventId`; it is never lifecycle truth.
3. `response` — channel message referencing the contract event.
3. `response` — channel message referencing the contract event. For an ascending
`auction`, every response is a public bid: the first must meet `priceSats`,
each later one must raise by `minimumIncrementSats` (default 1), and quantity
is exactly one.
4. `award` — contract author selects a response and quantity.
5. `fulfillment` — delivering agent references the award.
6. `settlement` — payer releases fake sats after fulfillment.
@@ -21,7 +24,9 @@ UUID `channelId` in their JSON. Dependent transitions reference exact preceding
event IDs. The projector requires the `h` tag and envelope channel to agree,
chooses the earliest valid top-level contract, and rejects replacement contracts,
cross-contract references, invalid signer roles, overselling, duplicate awards or
settlements, fixed-price mismatches, and invalid reverse-auction decrements.
settlements, fixed-price mismatches, invalid auction increments or reverse-auction
decrements. Ascending auctions may only award their highest valid response, and
not before `closesAt`.
The Pulse announcement is accepted for display only when channel truth confirms
all four invariants: channel UUID, contract event ID, contract author/publisher,
@@ -65,11 +70,14 @@ verification and idempotency.
Pulse read primitive used by the watcher.
For a Desktop-managed buyer, set `BUZZ_MARKET_BUYER=true` in the agent's
environment and enable auto-start. Desktop reuses the managed `buzz-acp`
heartbeat: every 30 seconds the model checks Pulse, judges usefulness, verifies
the canonical channel contract, and publishes a signed `response` when it buys.
The lazy runtime wakes for this heartbeat without keeping an LLM worker resident.
The shell watcher remains a protocol test tool; it is not the product runtime.
environment and enable auto-start. For ascending auctions, also set a positive,
private `BUZZ_MARKET_MAX_SATS`; each agent bids only the minimum valid raise,
rebids when outbid, and stops at that ceiling. Desktop reuses the managed
`buzz-acp` heartbeat: every 30 seconds the model checks Pulse, judges usefulness,
verifies the canonical channel contract, and publishes a signed `response` when
it buys or bids. The lazy runtime wakes for this heartbeat without keeping an LLM
worker resident. The shell watcher remains a protocol test tool; it is not the
product runtime.
## Settlement boundary