FA-86223 / Game economy crafting balance / Member archive
Currency exchange desk: Empty exchange charges the minimum fee · case 03
Exchanging nothing produces a negative balance.
Case contract
rates map currency -> copper value. Same currency returns [amount, 0] without fee. Otherwise value = amount*rate[from]; fee = ceil(value*fee_bp/10000), at least 1 copper when value > 0 and fee_bp > 0 and 0 otherwise; net = value - fee; return [net // rate[to], net % rate[to]] (change 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.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| zero amount with fee #1 | [-1, 99] | [0, 0] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗