FA-85986 / Game economy crafting balance / Open access
Auction house fees: Auction cut truncates halves · case 01
Sales exactly on a half-copper cut pay too little fee.
ROOT CAUSE
The cut is floored rather than rounded half up.
THE FAILURE
The cut is floored rather than rounded half up.
Unsuccessful approach: Ceiling rounding overcharges every sale with any fractional cut.
Case contract
Deposit = per_block * (hours//12) where per_block = max(1, floor(stack_value*15/100)). Sold: net = price - cut with cut = 5% of price rounded half up (deposit refunded). Expired: net = -deposit. Cancelled: net = -deposit - floor(bid*5/100) (bid defaults to 0). Returns {deposit, net} in copper.
Why this case matters
Game economies leak or destroy currency when one crafting or pricing rule is off by one boundary, rounding stage or state update; the defect is observable in exact integer outcomes.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(listing, outcome):
blocks = listing['hours'] // 12
per_block = max(1, listing['stack_value'] * 15 // 100)
deposit = per_block * blocks
status = outcome['status']
if status == 'sold':
cut = listing['price'] * 5 // 100
net = listing['price'] - cut
elif status == 'cancelled':
net = -deposit - outcome.get('bid', 0) * 5 // 100
else:
net = -deposit
return {'deposit': deposit, 'net': net}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 30, 'hours': 12, 'stack_value': 6}, {'status': 'sold'}],
{'deposit': 1, 'net': 28}),
('fault site cut rounding #2',
[{'price': 190, 'hours': 12, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 1, 'net': 180}),
('partial repair boundary #1',
[{'price': 1, 'hours': 24, 'stack_value': 7}, {'status': 'sold'}],
{'deposit': 2, 'net': 1}),
('partial repair boundary #2',
[{'price': 5141, 'hours': 12, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 1, 'net': 4884}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 11, 'hours': 24, 'stack_value': 13}, {'status': 'cancelled', 'bid': 0}],
{'deposit': 2, 'net': -2})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 190, 'hours': 12, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 1, 'net': 180}),
('fault site cut rounding #2',
[{'price': 30, 'hours': 24, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 2, 'net': 28}),
('partial repair boundary #1',
[{'price': 34146, 'hours': 48, 'stack_value': 3106}, {'status': 'sold'}],
{'deposit': 1860, 'net': 32439}),
('partial repair boundary #2',
[{'price': 9, 'hours': 48, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 4, 'net': 9}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 11, 'hours': 24, 'stack_value': 13}, {'status': 'cancelled', 'bid': 0}],
{'deposit': 2, 'net': -2})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 10, 'hours': 24, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 2, 'net': 9}),
('fault site cut rounding #2',
[{'price': 91070, 'hours': 24, 'stack_value': 7}, {'status': 'sold'}],
{'deposit': 2, 'net': 86516}),
('partial repair boundary #1',
[{'price': 72766, 'hours': 24, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 2, 'net': 69128}),
('partial repair boundary #2',
[{'price': 9, 'hours': 12, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 1, 'net': 9}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 11, 'hours': 24, 'stack_value': 13}, {'status': 'cancelled', 'bid': 0}],
{'deposit': 2, 'net': -2})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 30, 'hours': 24, 'stack_value': 7}, {'status': 'sold'}],
{'deposit': 2, 'net': 28}),
('fault site cut rounding #2',
[{'price': 190, 'hours': 12, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 1, 'net': 180}),
('partial repair boundary #1',
[{'price': 9, 'hours': 48, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 4, 'net': 9}),
('partial repair boundary #2',
[{'price': 74548, 'hours': 48, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 4, 'net': 70821}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 10, 'hours': 48, 'stack_value': 0}, {'status': 'expired'}],
{'deposit': 4, 'net': -4})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 30, 'hours': 12, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 1, 'net': 28}),
('fault site cut rounding #2',
[{'price': 70012, 'hours': 12, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 1, 'net': 66511}),
('partial repair boundary #1',
[{'price': 9, 'hours': 48, 'stack_value': 6}, {'status': 'sold'}],
{'deposit': 4, 'net': 9}),
('partial repair boundary #2',
[{'price': 1, 'hours': 48, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 4, 'net': 1}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 50, 'hours': 24, 'stack_value': 6}, {'status': 'expired'}],
{'deposit': 2, 'net': -2})]]
for label, args, expected in cases[N-1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| half-up cut boundary #1 | {'deposit': 15, 'net': 10} | {'deposit': 15, 'net': 9} | Failed |
| fault site cut rounding #1 | {'deposit': 1, 'net': 29} | {'deposit': 1, 'net': 28} | Failed |
| fault site cut rounding #2 | {'deposit': 1, 'net': 181} | {'deposit': 1, 'net': 180} | Failed |
| partial repair boundary #1 | {'deposit': 2, 'net': 1} | {'deposit': 2, 'net': 1} | Passed |
| partial repair boundary #2 | {'deposit': 1, 'net': 4884} | {'deposit': 1, 'net': 4884} | Passed |
| long cheap listing #1 | {'deposit': 4, 'net': -4} | {'deposit': 4, 'net': -4} | Passed |
| cancel with bid #1 | {'deposit': 12, 'net': -31} | {'deposit': 12, 'net': -31} | Passed |
| control #1 | {'deposit': 2, 'net': -2} | {'deposit': 2, 'net': -2} | Passed |
SHA-256 / 7e6c18aa1239fb3d328ecb409a17e8acf8f9bab5cce8099e05235e169fd2a623
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(listing, outcome):
blocks = listing['hours'] // 12
per_block = max(1, listing['stack_value'] * 15 // 100)
deposit = per_block * blocks
status = outcome['status']
if status == 'sold':
cut = (listing['price'] * 5 + 99) // 100
net = listing['price'] - cut
elif status == 'cancelled':
net = -deposit - outcome.get('bid', 0) * 5 // 100
else:
net = -deposit
return {'deposit': deposit, 'net': net}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 30, 'hours': 12, 'stack_value': 6}, {'status': 'sold'}],
{'deposit': 1, 'net': 28}),
('fault site cut rounding #2',
[{'price': 190, 'hours': 12, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 1, 'net': 180}),
('partial repair boundary #1',
[{'price': 1, 'hours': 24, 'stack_value': 7}, {'status': 'sold'}],
{'deposit': 2, 'net': 1}),
('partial repair boundary #2',
[{'price': 5141, 'hours': 12, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 1, 'net': 4884}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 11, 'hours': 24, 'stack_value': 13}, {'status': 'cancelled', 'bid': 0}],
{'deposit': 2, 'net': -2})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 190, 'hours': 12, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 1, 'net': 180}),
('fault site cut rounding #2',
[{'price': 30, 'hours': 24, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 2, 'net': 28}),
('partial repair boundary #1',
[{'price': 34146, 'hours': 48, 'stack_value': 3106}, {'status': 'sold'}],
{'deposit': 1860, 'net': 32439}),
('partial repair boundary #2',
[{'price': 9, 'hours': 48, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 4, 'net': 9}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 11, 'hours': 24, 'stack_value': 13}, {'status': 'cancelled', 'bid': 0}],
{'deposit': 2, 'net': -2})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 10, 'hours': 24, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 2, 'net': 9}),
('fault site cut rounding #2',
[{'price': 91070, 'hours': 24, 'stack_value': 7}, {'status': 'sold'}],
{'deposit': 2, 'net': 86516}),
('partial repair boundary #1',
[{'price': 72766, 'hours': 24, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 2, 'net': 69128}),
('partial repair boundary #2',
[{'price': 9, 'hours': 12, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 1, 'net': 9}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 11, 'hours': 24, 'stack_value': 13}, {'status': 'cancelled', 'bid': 0}],
{'deposit': 2, 'net': -2})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 30, 'hours': 24, 'stack_value': 7}, {'status': 'sold'}],
{'deposit': 2, 'net': 28}),
('fault site cut rounding #2',
[{'price': 190, 'hours': 12, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 1, 'net': 180}),
('partial repair boundary #1',
[{'price': 9, 'hours': 48, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 4, 'net': 9}),
('partial repair boundary #2',
[{'price': 74548, 'hours': 48, 'stack_value': 13}, {'status': 'sold'}],
{'deposit': 4, 'net': 70821}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 10, 'hours': 48, 'stack_value': 0}, {'status': 'expired'}],
{'deposit': 4, 'net': -4})],
[('half-up cut boundary #1',
[{'price': 10, 'hours': 12, 'stack_value': 100}, {'status': 'sold'}],
{'deposit': 15, 'net': 9}),
('fault site cut rounding #1',
[{'price': 30, 'hours': 12, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 1, 'net': 28}),
('fault site cut rounding #2',
[{'price': 70012, 'hours': 12, 'stack_value': 0}, {'status': 'sold'}],
{'deposit': 1, 'net': 66511}),
('partial repair boundary #1',
[{'price': 9, 'hours': 48, 'stack_value': 6}, {'status': 'sold'}],
{'deposit': 4, 'net': 9}),
('partial repair boundary #2',
[{'price': 1, 'hours': 48, 'stack_value': 1}, {'status': 'sold'}],
{'deposit': 4, 'net': 1}),
('long cheap listing #1',
[{'price': 10, 'hours': 48, 'stack_value': 3}, {'status': 'expired'}],
{'deposit': 4, 'net': -4}),
('cancel with bid #1',
[{'price': 500, 'hours': 24, 'stack_value': 40}, {'status': 'cancelled', 'bid': 390}],
{'deposit': 12, 'net': -31}),
('control #1',
[{'price': 50, 'hours': 24, 'stack_value': 6}, {'status': 'expired'}],
{'deposit': 2, 'net': -2})]]
for label, args, expected in cases[N-1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| half-up cut boundary #1 | {'deposit': 15, 'net': 9} | {'deposit': 15, 'net': 9} | Passed |
| fault site cut rounding #1 | {'deposit': 1, 'net': 28} | {'deposit': 1, 'net': 28} | Passed |
| fault site cut rounding #2 | {'deposit': 1, 'net': 180} | {'deposit': 1, 'net': 180} | Passed |
| partial repair boundary #1 | {'deposit': 2, 'net': 0} | {'deposit': 2, 'net': 1} | Failed |
| partial repair boundary #2 | {'deposit': 1, 'net': 4883} | {'deposit': 1, 'net': 4884} | Failed |
| long cheap listing #1 | {'deposit': 4, 'net': -4} | {'deposit': 4, 'net': -4} | Passed |
| cancel with bid #1 | {'deposit': 12, 'net': -31} | {'deposit': 12, 'net': -31} | Passed |
| control #1 | {'deposit': 2, 'net': -2} | {'deposit': 2, 'net': -2} | Passed |
SHA-256 / 579e4718cb5397efc631d094a725b31f89b852e3aec0fa1535647c8341125850
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Deterministic toy contract stipulated for this model; integer or exact arithmetic only, not a reproduction of any specific game engine. 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:50:45.448088+00:00.
Case digest / c8169499644ea88dc3a1ec7e59f912a779c59ded1cf184b0e8852d164054aa64