FAILURE MAP
← Case archive

FA-56481 / Auction allocation rules / Open access

Escrow reservation: seller net remittance · case 01

Seller remittance omits the fee or charges refundable bidder collateral.

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

ROOT CAUSE

Seller remittance omits the fee or charges refundable bidder collateral.

VERIFIED REPAIR

Deduct the settlement fee and leave the bidder bond separate.

Unsuccessful approach: The attempted repair uses max(0,x["fill_cost"]-x["fee"]-x["bond"]); the explicit regression cases demonstrate that this still violates the stipulated auction rule.

Case contract

A toy per-auction escrow account distinguishes available funds, reserved collateral, captured fill payments and pending releases. Reservation replaces an old hold atomically; a failed replacement retains the old hold. Separate auction holds must remain unavailable. Named decision seller-net-remittance: Deduct the settlement fee and leave the bidder bond separate.

Why this case matters

Offline administrative auction model for software failure analysis.

1 / The failure

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

N = 1
observations = []
def solve(x):
    v0 = x["balance"]-x["other_hold"] >= x["new_hold"]
    v1 = x["new_hold"] if x["replace_ok"] else x["old_hold"]
    v2 = max(0,x["old_hold"]-x["fill_cost"])
    v3 = x["balance"]-x["old_hold"]-x["other_hold"]+(x["pending"] if x["confirmed"] else 0)
    v4 = min(x["refund"],x["captured"])
    v5 = x["old_hold"]+x["bond"]
    v6 = max(0,x["old_hold"]-x["fill_cost"]) if x["closed"] else 0
    v7 = min(x["release"],max(0,x["old_hold"]-x["fill_cost"]))
    v8 = x["fill_cost"]
    v9 = x["balance"]-x["other_hold"]-x["new_hold"] >= x["fee"]
    return {'replace-credit':v0,'atomic-replacement':v1,'capture-release':v2,'pending-release-availability':v3,'refund-ceiling':v4,'bond-separation':v5,'close-release':v6,'release-clamp':v7,'seller-net-remittance':v8,'unreserved-fee-check':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('reuse existing collateral', {'balance': 100, 'old_hold': 30, 'new_hold': 70, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('other auction limits credit', {'balance': 100, 'old_hold': 30, 'new_hold': 90, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('insufficient replacement', {'balance': 100, 'old_hold': 30, 'new_hold': 200, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': False, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('old hold larger', {'balance': 100, 'old_hold': 30, 'new_hold': 15, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('confirmed release', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': True, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('fully captured', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 30, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [27, 54, 81, 108, 135]), ('zero reservation', {'balance': 100, 'old_hold': 0, 'new_hold': 0, 'other_hold': 0, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('closed auction', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': True}, [9, 18, 27, 36, 45])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['seller-net-remittance'], expected[N-1])
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
normal contract129Failed
reuse existing collateral129Failed
other auction limits credit129Failed
insufficient replacement129Failed
old hold larger129Failed
confirmed release129Failed
fully captured3027Failed
zero reservation129Failed
closed auction129Failed

SHA-256 / 764f2514408a728f9d0b5d80e61c46a0a7fe8acefb104e76a72d4d2c5b34046d

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    v0 = x["balance"]-x["other_hold"] >= x["new_hold"]
    v1 = x["new_hold"] if x["replace_ok"] else x["old_hold"]
    v2 = max(0,x["old_hold"]-x["fill_cost"])
    v3 = x["balance"]-x["old_hold"]-x["other_hold"]+(x["pending"] if x["confirmed"] else 0)
    v4 = min(x["refund"],x["captured"])
    v5 = x["old_hold"]+x["bond"]
    v6 = max(0,x["old_hold"]-x["fill_cost"]) if x["closed"] else 0
    v7 = min(x["release"],max(0,x["old_hold"]-x["fill_cost"]))
    v8 = max(0,x["fill_cost"]-x["fee"]-x["bond"])
    v9 = x["balance"]-x["other_hold"]-x["new_hold"] >= x["fee"]
    return {'replace-credit':v0,'atomic-replacement':v1,'capture-release':v2,'pending-release-availability':v3,'refund-ceiling':v4,'bond-separation':v5,'close-release':v6,'release-clamp':v7,'seller-net-remittance':v8,'unreserved-fee-check':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('reuse existing collateral', {'balance': 100, 'old_hold': 30, 'new_hold': 70, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('other auction limits credit', {'balance': 100, 'old_hold': 30, 'new_hold': 90, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('insufficient replacement', {'balance': 100, 'old_hold': 30, 'new_hold': 200, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': False, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('old hold larger', {'balance': 100, 'old_hold': 30, 'new_hold': 15, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('confirmed release', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': True, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('fully captured', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 30, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [27, 54, 81, 108, 135]), ('zero reservation', {'balance': 100, 'old_hold': 0, 'new_hold': 0, 'other_hold': 0, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('closed auction', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': True}, [9, 18, 27, 36, 45])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['seller-net-remittance'], expected[N-1])
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
normal contract19Failed
reuse existing collateral19Failed
other auction limits credit19Failed
insufficient replacement19Failed
old hold larger19Failed
confirmed release19Failed
fully captured1927Failed
zero reservation19Failed
closed auction19Failed

SHA-256 / ba53bbe7257fdac4748c492d2af74c17dd1b929aaaa54ea4693eec2a56ba9f15

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    v0 = x["balance"]-x["other_hold"] >= x["new_hold"]
    v1 = x["new_hold"] if x["replace_ok"] else x["old_hold"]
    v2 = max(0,x["old_hold"]-x["fill_cost"])
    v3 = x["balance"]-x["old_hold"]-x["other_hold"]+(x["pending"] if x["confirmed"] else 0)
    v4 = min(x["refund"],x["captured"])
    v5 = x["old_hold"]+x["bond"]
    v6 = max(0,x["old_hold"]-x["fill_cost"]) if x["closed"] else 0
    v7 = min(x["release"],max(0,x["old_hold"]-x["fill_cost"]))
    v8 = max(0,x["fill_cost"]-x["fee"])
    v9 = x["balance"]-x["other_hold"]-x["new_hold"] >= x["fee"]
    return {'replace-credit':v0,'atomic-replacement':v1,'capture-release':v2,'pending-release-availability':v3,'refund-ceiling':v4,'bond-separation':v5,'close-release':v6,'release-clamp':v7,'seller-net-remittance':v8,'unreserved-fee-check':v9}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [('normal contract', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('reuse existing collateral', {'balance': 100, 'old_hold': 30, 'new_hold': 70, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('other auction limits credit', {'balance': 100, 'old_hold': 30, 'new_hold': 90, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('insufficient replacement', {'balance': 100, 'old_hold': 30, 'new_hold': 200, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': False, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('old hold larger', {'balance': 100, 'old_hold': 30, 'new_hold': 15, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('confirmed release', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': True, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('fully captured', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 30, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [27, 54, 81, 108, 135]), ('zero reservation', {'balance': 100, 'old_hold': 0, 'new_hold': 0, 'other_hold': 0, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': False}, [9, 18, 27, 36, 45]), ('closed auction', {'balance': 100, 'old_hold': 30, 'new_hold': 50, 'other_hold': 20, 'fill_cost': 12, 'release': 5, 'pending': 7, 'confirmed': False, 'replace_ok': True, 'captured': 10, 'refund': 4, 'fee': 3, 'bond': 8, 'closed': True}, [9, 18, 27, 36, 45])]
def vary(value):
 if type(value) is int: return value*N
 if isinstance(value,list): return [vary(v) for v in value]
 if isinstance(value,dict): return {k:(v if k in ['count', 'delivery_index', 'disputed', 'maximum_set', 'minimum_set', 'stage', 'threshold', 'waived'] else vary(v)) for k,v in value.items()}
 return value
for label, request, expected in fixtures:
 check(label, solve(vary(request))['seller-net-remittance'], expected[N-1])
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
normal contract99Passed
reuse existing collateral99Passed
other auction limits credit99Passed
insufficient replacement99Passed
old hold larger99Passed
confirmed release99Passed
fully captured2727Passed
zero reservation99Passed
closed auction99Passed

SHA-256 / 02cd88f959290bcf7492bba15f83a213772a60a29f3c3224362f4ec8ac7ff2c7

Verification & scope

Stipulated toy auction rules, not a venue specification, financial advice, optimization claim, or live trading implementation. Nonnegative integer inputs and internally aligned list fields only. 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:46:07.583579+00:00.

Case digest / 32b70f758c0e5c1619c0cb45e03922be3ada8fc712a26fd8417e1e9a78409248