FA-84736 / Betting odds conversion / Open access
Boost applied to the whole price instead of the profit · case 01
A 25 percent boost on 2.00 pays as if the price were 2.50.
ROOT CAUSE
The boost multiplies stake * price rather than the profit.
THE FAILURE
The boost multiplies stake * price rather than the profit.
Unsuccessful approach: Boosting the stake instead of the profit pays the same extra on every price.
Case contract
Profit boost promotion. Normal profit = stake * (price - 1). The boost increases the profit by boost_pct percent, but the extra winnings over the normal profit are capped at max_extra_cents. The displayed boosted price is 1 + (price - 1) * (1 + boost/100) rounded half up to two decimals (display only). Return [displayed price, potential return = stake + floor(normal profit + extra)].
Why this case matters
Promotional boosts must be applied to profit, not stake, and respect maximum extra winnings.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(price, boost_pct, max_extra_cents, stake_cents):
d = Fraction(price)
b = Fraction(boost_pct) / 100
normal = stake_cents * (d - 1)
boosted = stake_cents * d * (1 + b) - stake_cents
extra = min(boosted - normal, max_extra_cents)
shown = 1 + (d - 1) * (1 + b)
c = math.floor(shown * 100 + Fraction(1, 2))
return ['%d.%02d' % (c // 100, c % 100), stake_cents + math.floor(normal + extra)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('3.27', '25', 100000, 500), ['3.84', 1918]),
('variant scenario 1', ('2.55', '50', 500, 2000), ['3.33', 5600]),
('variant scenario 2', ('4.35', '25', 100000, 2000), ['5.19', 10375])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('3.91', '50', 1000, 1000), ['5.37', 4910]),
('regression: boost base', ('3.99', '20', 100000, 1000), ['4.59', 4588]),
('variant scenario 1', ('3.03', '50', 500, 5000), ['4.05', 15650]),
('variant scenario 2', ('1.95', '25', 1000, 1000), ['2.19', 2187])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('1.51', '10', 1000, 5000), ['1.56', 7805]),
('variant scenario 1', ('6.92', '20', 5000, 5000), ['8.10', 39600]),
('variant scenario 2', ('4.55', '100', 5000, 500), ['8.10', 4050])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('2.47', '10', 5000, 2000), ['2.62', 5234]),
('variant scenario 1', ('6.20', '50', 500, 1000), ['8.80', 6700]),
('variant scenario 2', ('6.96', '50', 1000, 5000), ['9.94', 35800])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('3.98', '10', 5000, 2000), ['4.28', 8556]),
('variant scenario 1', ('4.51', '10', 500, 500), ['4.86', 2430]),
('variant scenario 2', ('6.05', '100', 100000, 5000), ['11.10', 55500])]]
for label, args, expected in cases[N - 1]:
check(label, run(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 |
|---|---|---|---|
| control boosted evens | ['2.25', 2500] | ['2.25', 2250] | Failed |
| boundary capped extra | ['7.00', 6000] | ['7.00', 6000] | Passed |
| control no boost | ['3.00', 3000] | ['3.00', 3000] | Passed |
| boundary display half-up | ['2.13', 2375] | ['2.13', 2125] | Failed |
| regression: boost base | ['3.84', 2043] | ['3.84', 1918] | Failed |
| variant scenario 1 | ['3.33', 5600] | ['3.33', 5600] | Passed |
| variant scenario 2 | ['5.19', 10875] | ['5.19', 10375] | Failed |
SHA-256 / 5a520f7b9f736753651d88e2f64b36807e3b18833153b706411f8a06888dfb61
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(price, boost_pct, max_extra_cents, stake_cents):
d = Fraction(price)
b = Fraction(boost_pct) / 100
normal = stake_cents * (d - 1)
boosted = normal + stake_cents * b
extra = min(boosted - normal, max_extra_cents)
shown = 1 + (d - 1) * (1 + b)
c = math.floor(shown * 100 + Fraction(1, 2))
return ['%d.%02d' % (c // 100, c % 100), stake_cents + math.floor(normal + extra)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
try:
return solve(*args)
except Exception as exc:
return 'raised ' + type(exc).__name__
cases = [[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('3.27', '25', 100000, 500), ['3.84', 1918]),
('variant scenario 1', ('2.55', '50', 500, 2000), ['3.33', 5600]),
('variant scenario 2', ('4.35', '25', 100000, 2000), ['5.19', 10375])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('3.91', '50', 1000, 1000), ['5.37', 4910]),
('regression: boost base', ('3.99', '20', 100000, 1000), ['4.59', 4588]),
('variant scenario 1', ('3.03', '50', 500, 5000), ['4.05', 15650]),
('variant scenario 2', ('1.95', '25', 1000, 1000), ['2.19', 2187])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('1.51', '10', 1000, 5000), ['1.56', 7805]),
('variant scenario 1', ('6.92', '20', 5000, 5000), ['8.10', 39600]),
('variant scenario 2', ('4.55', '100', 5000, 500), ['8.10', 4050])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('2.47', '10', 5000, 2000), ['2.62', 5234]),
('variant scenario 1', ('6.20', '50', 500, 1000), ['8.80', 6700]),
('variant scenario 2', ('6.96', '50', 1000, 5000), ['9.94', 35800])],
[('control boosted evens', ('2.00', '25', 100000, 1000), ['2.25', 2250]),
('boundary capped extra', ('5.00', '50', 1000, 1000), ['7.00', 6000]),
('control no boost', ('3.00', '0', 1000, 1000), ['3.00', 3000]),
('boundary display half-up', ('1.90', '25', 100000, 1000), ['2.13', 2125]),
('regression: boost base', ('3.98', '10', 5000, 2000), ['4.28', 8556]),
('variant scenario 1', ('4.51', '10', 500, 500), ['4.86', 2430]),
('variant scenario 2', ('6.05', '100', 100000, 5000), ['11.10', 55500])]]
for label, args, expected in cases[N - 1]:
check(label, run(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 |
|---|---|---|---|
| control boosted evens | ['2.25', 2250] | ['2.25', 2250] | Passed |
| boundary capped extra | ['7.00', 5500] | ['7.00', 6000] | Failed |
| control no boost | ['3.00', 3000] | ['3.00', 3000] | Passed |
| boundary display half-up | ['2.13', 2150] | ['2.13', 2125] | Failed |
| regression: boost base | ['3.84', 1760] | ['3.84', 1918] | Failed |
| variant scenario 1 | ['3.33', 5600] | ['3.33', 5600] | Passed |
| variant scenario 2 | ['5.19', 9200] | ['5.19', 10375] | Failed |
SHA-256 / 58245b9ec366ba554bea1991a49b0059fbfabf14fd590b9bbeba7d10792e2fd8
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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
Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. 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:33.859901+00:00.
Case digest / 4e4bcd40e05770004ab354704ce84b9764fa8c606f8e3c2c62bc3b291ba0d635