code wiki / _hdl_build / nx_auction_proxybid.nx

nx_auction_proxybid.nx

buildroot/runtime/_hdl_build/nx_auction_proxybid.nx

9637 B188 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind tooltopic auction
docsdependenciesstructsconstsfunctions

about

nx_auction_proxybid.nx -- MANHEIM-BUILD-L1: PROXY BIDDING ("set your max" / automatic bidding, the OVE + Manheim Timed-Sales convenience primitive), COMPOSED on the shared nx_auction_core engine. Sovereign (nx_cc->nxasm, no gcc), pure integer-exact + deterministic. MODEL: each dealer submits a standing MAX (a proxy). proxy_resolve settles the eBay-style second-price outcome: the WINNER is the highest valid max (ties -> earliest submission), and pays the MINIMUM needed to beat the runner-up = min(top1_max, top2_max + increment), floored to the opening, and JUMPED to the reserve when the winner's max covers it. A max below the opening is REJECTED. valid iff start <= t <= end AND max >= opening. out[]: [winner, price, status(1=SOLD/0=NOSALE), accepted, rejected, runnerup_bidder, runnerup_max] EXCEED axis (honest, not yet benched): (1) proxy bidding is SNIPE-IMMUNE BY CONSTRUCTION -- maxes are pre-committed, so there is no last-tick advantage to extend against (the timed channel needs anti-snipe; the proxy channel eliminates the attack); (2) the winner provably pays the minimum to beat the runner-up (Vickrey-fair, auditable, no shill ambiguity). COMPOSITION PROOF: the gate also expands the proxy outcome into the implied concrete 2-bid stream (runner-up @ their max, winner @ the settling price) and feeds it to the SHARED core at_resolve -- asserting the core settles to the SAME winner+price. One settlement engine, two channels. GATE (self-validating): A normal 3-proxy sale (cross-checked vs core), B no-sale (top max < reserve), C neg-control (a below-opening max REJECTED + the reserve-jump when the winner is uncontested). A broken rule diverges a checked value -> verdict=RED. Evidence -> knowledge/status/auction_proxybid.log. license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_auction_core.nx nx_auction_proxybid.nx

imports: nx_syscalls.nxnx_auction_core.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap proxy_resolve at_resolve px_w sys_write px_wn sys_mmap ↻ sys_write ↻ sys_openat_append sys_close

structs

none

consts

27const PX_MAGIC_1100000: i64 = 1100000
28const PX_MAGIC_1050000: i64 = 1050000
29const PX_MAGIC_950000: i64 = 950000
30const PX_MAGIC_900000: i64 = 900000
31const PX_MAGIC_25000: i64 = 25000
32const PX_MAGIC_1000000: i64 = 1000000
33const PX_MAGIC_925000: i64 = 925000
34const PX_MAGIC_800000: i64 = 800000
35const PX_MAGIC_1075000: i64 = 1075000
37const PX_LOG: *u8 = "knowledge/status/auction_proxybid.log"

functions

39func px_w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 }
called by 1: main calls 1: sys_write
40func px_wn(fd: i64, v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m; sys_write(fd,"-" as *u8,1)}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=(48+(m%10)) as u8; m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(fd, bb, k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
43func proxy_resolve(opening: i64, increment: i64, reserve: i64, start: i64, end: i64, bidder: *i64, maxamt: *i64, time: *i64, n: i64, out: *i64) -> i64
called by 1: main
102func main() -> i64