Expand description
§nucleus-mechanism-vcg — Pigouvian-VCG lifter for the substrate
Implements the Economic projection functor from
nucleus_substrate_core specialized to Pigouvian-VCG auctions.
Lifts a cleared auction (single-good Vickrey or knapsack-VCG) into
the typed body of a Projection::Economic variant.
§Two variants, one wire shape
Both Vickrey and knapsack-VCG share the
{auction, bids, outcome} skeleton. Only the outcome field
differs:
{"kind":"economic","body":{
"version": 1,
"mechanism": "vickrey",
"auction": { ... PostedAuction ... },
"bids": [ ... AgentBids ... ],
"outcome": { "winner_spiffe_id": "...", "clearing_price_micro_usd": 250000 }
}}For knapsack-VCG:
{"kind":"economic","body":{
"version": 1,
"mechanism": "vcg_knapsack",
"auction": { ... },
"bids": [ ... ],
"outcome": { "winners": [["spiffe://...", 750000], ...] }
}}§Verifier invariants
verify_economic_projection_shape checks structural
well-formedness only. The cryptographic check (signature over
canonical bytes) lives on the parent Receipt. The shape
invariants:
- Body version matches
ECONOMIC_BODY_VERSION(1). mechanismis one of the two stable strings.- For Vickrey: if
winner_spiffe_id.is_some(), the winner must appear inbidsas anagent_spiffe_id. - For VCG: every entry in
outcome.winnersmust reference a SPIFFE id that appears inbids.
Truthfulness (the mechanism property) is proven once, in Lean
(formal/Nucleus/Auctions/VcgPigouTruthful.lean). The Aeneas
parity proptest binds the kernel to the extracted Rust impl.
This crate doesn’t re-prove either — it provides the wire shape
that lets a receipt carry the outcome.
Structs§
- Externality
Profile - One agent’s claims about the externalities they would impose if awarded a given auction. Each claim is signed by a trusted oracle; the hub verifies signatures before the VCG path consumes them.
- Opaque
Signed Claim - A signed externality claim, opaque from the SDK’s perspective.
The hub deserializes the inner
signed_bytesagainst the oracle’s verifying key; SDK consumers pass through whatever bytes they received from their oracle. - ReExported
Agent Bid - ReExported
Match Result - ReExported
Posted Auction - ReExported
VcgMatch Result - VcgKnapsack
Body - Body of a knapsack-VCG-cleared auction’s Economic projection.
- VcgKnapsack
Outcome - Vickrey
Body - Body of a single-good Vickrey-cleared auction’s Economic projection.
- Vickrey
Outcome - Vickrey
Payload - Wire payload of the Economic projection variant when a single-good
Vickrey match has cleared. Roughly mirrors the hub’s
/matchresponse plus the bid set that produced it.
Enums§
- Economic
Body - Discriminated union of the two body shapes — what
verify_economic_projection_shapeparses out of aProjection::Economic’s body Value. - Economic
Verify Error - Resource
Dim - One axis of externality the auction internalizes. Each variant captures a measurable externality and an oracle that signs claims about it.
Constants§
- ECONOMIC_
BODY_ VERSION - MECHANISM_
VCG_ KNAPSACK - MECHANISM_
VICKREY - Stable wire tag for the mechanism variant.
Functions§
- vcg_
knapsack_ projection - Pack a cleared knapsack-VCG auction into a
Projection::Economicbody. - verify_
economic_ projection_ shape - Verify structural well-formedness of an Economic projection body.
Returns the parsed typed body on success. Cryptographic signature
verification happens on the parent
Receipt. - vickrey_
projection - Pack a cleared single-good Vickrey auction into a
Projection::Economicbody.