FAILURE MAP
← Case archive

FA-84466 / Betting odds conversion / Open access

Pushed leg treated as a loser or a winner · case 01

A parlay with a pushed leg pays nothing, or pays as if the push had won.

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

ROOT CAUSE

The push result falls into the losing branch.

THE FAILURE

The push result falls into the losing branch.

Unsuccessful approach: Paying the push at its price inflates the parlay.

Case contract

Accumulator settlement. legs rows are [decimal price, result] with results win, lose, push, void, half-win (half the stake wins at the price, half is refunded: factor (1 + d) / 2) and half-lose (half refunded: factor 1/2). push and void legs have factor 1, win factor d, lose makes the whole bet lose. Return [combined factor rounded half up to four decimals as a string, payout in cents rounded down].

Why this case matters

Settlement engines must collapse pushed, voided and Asian half results inside multiples.

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(legs, stake_cents):
    factor = Fraction(1)
    for price, result in legs:
        d = Fraction(price)
        if result in ('lose', 'push'):
            factor = Fraction(0)
            break
        if result == 'win':
            factor *= d
        elif result == 'half-win':
            factor *= (1 + d) / 2
        elif result == 'half-lose':
            factor *= Fraction(1, 2)
    q = math.floor(factor * 10000 + Fraction(1, 2))
    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]
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 two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['2.02', 'win'], ['3.91', 'push'], ['3.42', 'half-win']], 1999),
   ['4.4642', 8923]),
  ('variant scenario 1',
   ([['2.72', 'void'], ['3.99', 'win'], ['2.58', 'half-win'], ['2.13', 'win']], 333),
   ['15.2127', 5065]),
  ('variant scenario 2', ([['1.93', 'win'], ['2.74', 'half-lose']], 333), ['0.9650', 321])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['3.97', 'half-win'], ['2.47', 'push'], ['3.54', 'push'], ['2.82', 'push']], 1999),
   ['2.4850', 4967]),
  ('variant scenario 1',
   ([['3.53', 'win'], ['3.05', 'lose'], ['3.20', 'lose']], 1999),
   ['0.0000', 0]),
  ('variant scenario 2', ([['1.56', 'win'], ['1.40', 'half-win']], 1000), ['1.8720', 1872])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['3.05', 'push'], ['1.88', 'win'], ['2.45', 'win'], ['2.97', 'win'], ['3.27', 'win']], 1000),
   ['44.7330', 44733]),
  ('variant scenario 1',
   ([['3.22', 'push'], ['1.43', 'half-lose'], ['1.82', 'lose'], ['3.41', 'win']], 1000),
   ['0.0000', 0]),
  ('variant scenario 2',
   ([['2.42', 'win'], ['1.45', 'void'], ['2.68', 'lose'], ['1.68', 'void'], ['1.92', 'win']], 100),
   ['0.0000', 0])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['2.62', 'push'], ['1.90', 'void'], ['2.00', 'win'], ['1.86', 'win']], 1999),
   ['3.7200', 7436]),
  ('variant scenario 1',
   ([['3.37', 'win'],
     ['1.36', 'half-lose'],
     ['2.40', 'half-lose'],
     ['1.81', 'win'],
     ['2.31', 'half-win']],
    333),
   ['2.5238', 840]),
  ('variant scenario 2', ([['3.23', 'win'], ['1.87', 'win']], 333), ['6.0401', 2011])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['2.00', 'push'], ['1.86', 'half-win'], ['3.31', 'win'], ['2.46', 'half-lose']], 1999),
   ['2.3667', 4730]),
  ('variant scenario 1',
   ([['3.66', 'half-lose'], ['1.36', 'win'], ['3.09', 'win'], ['1.39', 'win'], ['3.11', 'win']],
    1000),
   ['9.0833', 9083]),
  ('variant scenario 2',
   ([['2.28', 'void'], ['1.44', 'half-lose'], ['3.81', 'push'], ['2.38', 'void']], 100),
   ['0.5000', 50])]]
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 fixtureActualExpectedOutcome
control two winners['3.0000', 3000]['3.0000', 3000]Passed
boundary pushed leg['0.0000', 0]['2.0000', 2000]Failed
boundary half-win leg['3.0000', 3000]['3.0000', 3000]Passed
boundary half-lose leg['1.5000', 1500]['1.5000', 1500]Passed
control losing leg['0.0000', 0]['0.0000', 0]Passed
control payout rounds down['1.3300', 442]['1.3300', 442]Passed
regression: push leg factor['0.0000', 0]['4.4642', 8923]Failed
variant scenario 1['15.2127', 5065]['15.2127', 5065]Passed
variant scenario 2['0.9650', 321]['0.9650', 321]Passed

SHA-256 / b661720e268049be113d62200cd5d75d64726b96500d97b1912fa46db52f14c8

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(legs, stake_cents):
    factor = Fraction(1)
    for price, result in legs:
        d = Fraction(price)
        if result == 'lose':
            factor = Fraction(0)
            break
        if result in ('win', 'push'):
            factor *= d
        elif result == 'half-win':
            factor *= (1 + d) / 2
        elif result == 'half-lose':
            factor *= Fraction(1, 2)
    q = math.floor(factor * 10000 + Fraction(1, 2))
    return ['%d.%04d' % (q // 10000, q % 10000), math.floor(stake_cents * factor)]
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 two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['2.02', 'win'], ['3.91', 'push'], ['3.42', 'half-win']], 1999),
   ['4.4642', 8923]),
  ('variant scenario 1',
   ([['2.72', 'void'], ['3.99', 'win'], ['2.58', 'half-win'], ['2.13', 'win']], 333),
   ['15.2127', 5065]),
  ('variant scenario 2', ([['1.93', 'win'], ['2.74', 'half-lose']], 333), ['0.9650', 321])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['3.97', 'half-win'], ['2.47', 'push'], ['3.54', 'push'], ['2.82', 'push']], 1999),
   ['2.4850', 4967]),
  ('variant scenario 1',
   ([['3.53', 'win'], ['3.05', 'lose'], ['3.20', 'lose']], 1999),
   ['0.0000', 0]),
  ('variant scenario 2', ([['1.56', 'win'], ['1.40', 'half-win']], 1000), ['1.8720', 1872])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['3.05', 'push'], ['1.88', 'win'], ['2.45', 'win'], ['2.97', 'win'], ['3.27', 'win']], 1000),
   ['44.7330', 44733]),
  ('variant scenario 1',
   ([['3.22', 'push'], ['1.43', 'half-lose'], ['1.82', 'lose'], ['3.41', 'win']], 1000),
   ['0.0000', 0]),
  ('variant scenario 2',
   ([['2.42', 'win'], ['1.45', 'void'], ['2.68', 'lose'], ['1.68', 'void'], ['1.92', 'win']], 100),
   ['0.0000', 0])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['2.62', 'push'], ['1.90', 'void'], ['2.00', 'win'], ['1.86', 'win']], 1999),
   ['3.7200', 7436]),
  ('variant scenario 1',
   ([['3.37', 'win'],
     ['1.36', 'half-lose'],
     ['2.40', 'half-lose'],
     ['1.81', 'win'],
     ['2.31', 'half-win']],
    333),
   ['2.5238', 840]),
  ('variant scenario 2', ([['3.23', 'win'], ['1.87', 'win']], 333), ['6.0401', 2011])],
 [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),
  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),
  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),
  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),
  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),
  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),
  ('regression: push leg factor',
   ([['2.00', 'push'], ['1.86', 'half-win'], ['3.31', 'win'], ['2.46', 'half-lose']], 1999),
   ['2.3667', 4730]),
  ('variant scenario 1',
   ([['3.66', 'half-lose'], ['1.36', 'win'], ['3.09', 'win'], ['1.39', 'win'], ['3.11', 'win']],
    1000),
   ['9.0833', 9083]),
  ('variant scenario 2',
   ([['2.28', 'void'], ['1.44', 'half-lose'], ['3.81', 'push'], ['2.38', 'void']], 100),
   ['0.5000', 50])]]
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 fixtureActualExpectedOutcome
control two winners['3.0000', 3000]['3.0000', 3000]Passed
boundary pushed leg['3.8000', 3800]['2.0000', 2000]Failed
boundary half-win leg['3.0000', 3000]['3.0000', 3000]Passed
boundary half-lose leg['1.5000', 1500]['1.5000', 1500]Passed
control losing leg['0.0000', 0]['0.0000', 0]Passed
control payout rounds down['1.3300', 442]['1.3300', 442]Passed
regression: push leg factor['17.4550', 34892]['4.4642', 8923]Failed
variant scenario 1['15.2127', 5065]['15.2127', 5065]Passed
variant scenario 2['0.9650', 321]['0.9650', 321]Passed

SHA-256 / 2ee7a1ab7c27d66df06b94e83130c83f99542c3e9fd06d0a04f5530cbfff2128

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 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:31.178117+00:00.

Case digest / 2fa318a37eb8fd49fa9c9da1a7f029d8b304ae9f4cc7b4ace1a85493411934e2