FAILURE MAP
← Case archive

FA-12711 / Auction allocation rules / Open access

Pay-as-bid settlement treats every fill as one unit · case 01

Pay-as-bid settlement treats every fill as one unit.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Settlement omits filled quantities and charges each submitted order one unit price.

VERIFIED REPAIR

Implement the stated toy allocation contract directly: Given [bid-price, filled-units] rows of nonnegative integers, return each order charge price*filled-units; zero fill pays zero.

Unsuccessful approach: Suppressing the charge for zero fills still charges just one unit price for multiple filled units.

Case contract

Given [bid-price, filled-units] rows of nonnegative integers, return each order charge price*filled-units; zero fill pays zero.

Why this case matters

Deterministic teaching model for reviewing auction allocation software; not a representation of any venue or financial advice.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    return [p for p,q in rows]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multi-unit fill', solve([[10+N,3],[5,0]]), [(10+N)*3,0])
check('single unit', solve([[9,1]]), [9])
check('zero price', solve([[0,5]]), [0])
check('no rows', solve([]), [])
check('several fills', solve([[3,2],[4,5]]), [6,20])
check('all unfilled', solve([[7,0],[8,0]]), [0,0])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
multi-unit fill[11, 5][33, 0]Failed
single unit[9][9]Passed
zero price[0][0]Passed
no rows[][]Passed
several fills[3, 4][6, 20]Failed
all unfilled[7, 8][0, 0]Failed

SHA-256 / 0c745ca4d3ab667cc3efe68a6137019b384893e8ea10588e549ba9342f9aef0b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    return [p if q else 0 for p,q in rows]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multi-unit fill', solve([[10+N,3],[5,0]]), [(10+N)*3,0])
check('single unit', solve([[9,1]]), [9])
check('zero price', solve([[0,5]]), [0])
check('no rows', solve([]), [])
check('several fills', solve([[3,2],[4,5]]), [6,20])
check('all unfilled', solve([[7,0],[8,0]]), [0,0])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
multi-unit fill[11, 0][33, 0]Failed
single unit[9][9]Passed
zero price[0][0]Passed
no rows[][]Passed
several fills[3, 4][6, 20]Failed
all unfilled[0, 0][0, 0]Passed

SHA-256 / 6626cbae7cfa90d0550657f741a888dd5c4ac537502f739e449232bc229ff0db

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(rows):
    return [p*q for p,q in rows]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('multi-unit fill', solve([[10+N,3],[5,0]]), [(10+N)*3,0])
check('single unit', solve([[9,1]]), [9])
check('zero price', solve([[0,5]]), [0])
check('no rows', solve([]), [])
check('several fills', solve([[3,2],[4,5]]), [6,20])
check('all unfilled', solve([[7,0],[8,0]]), [0,0])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
multi-unit fill[33, 0][33, 0]Passed
single unit[9][9]Passed
zero price[0][0]Passed
no rows[][]Passed
several fills[6, 20][6, 20]Passed
all unfilled[0, 0][0, 0]Passed

SHA-256 / f07e556309c2f9dd8deb512ea95a0b72d32ae62fef40cccd472c417492168aa4

Verification & scope

Offline toy model with explicit integer inputs; no strategic behavior or real market execution. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:59.432951+00:00.

Case digest / 378cb593bba1e5f3902e4e0a58127d3da009861aad6ebd38ebab78efb9bc164f