FAILURE MAP
← Case archive

FA-84751 / Betting odds conversion / Open access

Teaser points move the line against the bettor · case 01

Favourites become bigger favourites after teasing.

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

ROOT CAUSE

The teaser points are subtracted from the line.

VERIFIED REPAIR

Add the teaser points to every line.

Unsuccessful approach: Teasing only favourites leaves underdog lines untouched.

Case contract

Point-spread teaser. legs rows are [team spread line, team margin of victory]; every line is moved in the bettor's favour by points (adjusted = line + points). A leg wins if margin + adjusted > 0, pushes if = 0, loses if < 0. Any losing leg loses the ticket. Pushed legs are dropped; fewer than 2 remaining winners refunds the stake. Payout by winning legs from the American table {2: -120, 3: +160, 4: +260, 5: +400} (5 or more pay +400). Return [status, return cents rounded down].

Why this case matters

Sportsbooks grade teasers with shifted lines, push reduction and a tiered payout table.

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, points, stake_cents):
    TABLE = {2: -120, 3: 160, 4: 260, 5: 400}
    wins = 0
    for line, margin in legs:
        adj = Fraction(line) - Fraction(points)
        v = margin + adj
        if v < 0:
            return ['lose', 0]
        if v > 0:
            wins += 1
    if wins < 2:
        return ['refund', stake_cents]
    am = TABLE[min(wins, 5)]
    dec = 1 + (Fraction(am, 100) if am > 0 else Fraction(100, -am))
    return ['win', math.floor(stake_cents * dec)]
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-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['-7', 5], ['+7', 0], ['+7', -10]], '6', 500),
   ['win', 1300]),
  ('variant scenario 1', ([['+1.5', 11], ['-10', 4], ['-10', -5]], '7', 1100), ['lose', 0]),
  ('variant scenario 2',
   ([['-7.5', -8], ['-7', 14], ['-3', 9], ['+7', 13], ['-3', 0], ['-7', 8]], '6', 1000),
   ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['+1.5', 11], ['+3', -7], ['+7', 9], ['+1.5', 2], ['-10', 12]], '7', 1000),
   ['win', 5000]),
  ('variant scenario 1',
   ([['+1.5', -13], ['+1.5', 2], ['-10', 9], ['-7.5', -7], ['-7.5', 7]], '6.5', 1100),
   ['lose', 0]),
  ('variant scenario 2', ([['-7.5', -12], ['-7.5', 13]], '6.5', 1000), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction', ([['+2.5', -2], ['+3', 1]], '6', 1100), ['win', 2016]),
  ('regression: line shift direction', ([['+3', -9], ['-10', 6]], '6', 1100), ['refund', 1100]),
  ('variant scenario 1',
   ([['-10', 10], ['-7', -5], ['+7', -6], ['-3', 3], ['-1', -4], ['+7', -2]], '7', 1000),
   ['lose', 0]),
  ('variant scenario 2', ([['+1.5', -12], ['-7', -11], ['-7', -3]], '6.5', 1000), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['+3', 11], ['+1.5', 7], ['-3', 4], ['-7', 2]], '6.5', 1100),
   ['win', 3960]),
  ('regression: line shift direction', ([['-1', 3], ['+7', -8]], '7', 1000), ['win', 1833]),
  ('variant scenario 1', ([['-7.5', 4], ['-7.5', -1], ['+1.5', -12]], '7', 1000), ['lose', 0]),
  ('variant scenario 2', ([['+7', 0], ['-7.5', -14], ['-7', 9]], '6', 500), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['-10', 11], ['+3', -4], ['-3', 1], ['+7', -12]], '6', 1000),
   ['win', 3600]),
  ('variant scenario 1', ([['-7', -12], ['-7', -2]], '6', 500), ['lose', 0]),
  ('variant scenario 2',
   ([['-1', -7], ['-7.5', 12], ['-7.5', -12], ['+3', 8], ['-10', -2]], '7', 1000),
   ['lose', 0])]]
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-team teaser['lose', 0]['win', 2200]Failed
boundary push drops a leg['lose', 0]['win', 1833]Failed
boundary reduced to one leg['lose', 0]['refund', 1000]Failed
control losing leg['lose', 0]['lose', 0]Passed
control three winners['lose', 0]['win', 2600]Failed
regression: line shift direction['lose', 0]['win', 1300]Failed
variant scenario 1['lose', 0]['lose', 0]Passed
variant scenario 2['lose', 0]['lose', 0]Passed

SHA-256 / 6461c54e69c42aa93d61cd8858af28108f0054413a9491f8f24853a55b075bda

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, points, stake_cents):
    TABLE = {2: -120, 3: 160, 4: 260, 5: 400}
    wins = 0
    for line, margin in legs:
        adj = Fraction(line) + Fraction(points) if Fraction(line) < 0 else Fraction(line)
        v = margin + adj
        if v < 0:
            return ['lose', 0]
        if v > 0:
            wins += 1
    if wins < 2:
        return ['refund', stake_cents]
    am = TABLE[min(wins, 5)]
    dec = 1 + (Fraction(am, 100) if am > 0 else Fraction(100, -am))
    return ['win', math.floor(stake_cents * dec)]
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-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['-7', 5], ['+7', 0], ['+7', -10]], '6', 500),
   ['win', 1300]),
  ('variant scenario 1', ([['+1.5', 11], ['-10', 4], ['-10', -5]], '7', 1100), ['lose', 0]),
  ('variant scenario 2',
   ([['-7.5', -8], ['-7', 14], ['-3', 9], ['+7', 13], ['-3', 0], ['-7', 8]], '6', 1000),
   ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['+1.5', 11], ['+3', -7], ['+7', 9], ['+1.5', 2], ['-10', 12]], '7', 1000),
   ['win', 5000]),
  ('variant scenario 1',
   ([['+1.5', -13], ['+1.5', 2], ['-10', 9], ['-7.5', -7], ['-7.5', 7]], '6.5', 1100),
   ['lose', 0]),
  ('variant scenario 2', ([['-7.5', -12], ['-7.5', 13]], '6.5', 1000), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction', ([['+2.5', -2], ['+3', 1]], '6', 1100), ['win', 2016]),
  ('regression: line shift direction', ([['+3', -9], ['-10', 6]], '6', 1100), ['refund', 1100]),
  ('variant scenario 1',
   ([['-10', 10], ['-7', -5], ['+7', -6], ['-3', 3], ['-1', -4], ['+7', -2]], '7', 1000),
   ['lose', 0]),
  ('variant scenario 2', ([['+1.5', -12], ['-7', -11], ['-7', -3]], '6.5', 1000), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['+3', 11], ['+1.5', 7], ['-3', 4], ['-7', 2]], '6.5', 1100),
   ['win', 3960]),
  ('regression: line shift direction', ([['-1', 3], ['+7', -8]], '7', 1000), ['win', 1833]),
  ('variant scenario 1', ([['-7.5', 4], ['-7.5', -1], ['+1.5', -12]], '7', 1000), ['lose', 0]),
  ('variant scenario 2', ([['+7', 0], ['-7.5', -14], ['-7', 9]], '6', 500), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['-10', 11], ['+3', -4], ['-3', 1], ['+7', -12]], '6', 1000),
   ['win', 3600]),
  ('variant scenario 1', ([['-7', -12], ['-7', -2]], '6', 500), ['lose', 0]),
  ('variant scenario 2',
   ([['-1', -7], ['-7.5', 12], ['-7.5', -12], ['+3', 8], ['-10', -2]], '7', 1000),
   ['lose', 0])]]
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-team teaser['lose', 0]['win', 2200]Failed
boundary push drops a leg['win', 1833]['win', 1833]Passed
boundary reduced to one leg['refund', 1000]['refund', 1000]Passed
control losing leg['lose', 0]['lose', 0]Passed
control three winners['win', 2600]['win', 2600]Passed
regression: line shift direction['lose', 0]['win', 1300]Failed
variant scenario 1['lose', 0]['lose', 0]Passed
variant scenario 2['lose', 0]['lose', 0]Passed

SHA-256 / 6588ec463846de8c4d5f380489167293e91f9aff81a6a32bd1f1e2bb64f27d93

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(legs, points, stake_cents):
    TABLE = {2: -120, 3: 160, 4: 260, 5: 400}
    wins = 0
    for line, margin in legs:
        adj = Fraction(line) + Fraction(points)
        v = margin + adj
        if v < 0:
            return ['lose', 0]
        if v > 0:
            wins += 1
    if wins < 2:
        return ['refund', stake_cents]
    am = TABLE[min(wins, 5)]
    dec = 1 + (Fraction(am, 100) if am > 0 else Fraction(100, -am))
    return ['win', math.floor(stake_cents * dec)]
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-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['-7', 5], ['+7', 0], ['+7', -10]], '6', 500),
   ['win', 1300]),
  ('variant scenario 1', ([['+1.5', 11], ['-10', 4], ['-10', -5]], '7', 1100), ['lose', 0]),
  ('variant scenario 2',
   ([['-7.5', -8], ['-7', 14], ['-3', 9], ['+7', 13], ['-3', 0], ['-7', 8]], '6', 1000),
   ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['+1.5', 11], ['+3', -7], ['+7', 9], ['+1.5', 2], ['-10', 12]], '7', 1000),
   ['win', 5000]),
  ('variant scenario 1',
   ([['+1.5', -13], ['+1.5', 2], ['-10', 9], ['-7.5', -7], ['-7.5', 7]], '6.5', 1100),
   ['lose', 0]),
  ('variant scenario 2', ([['-7.5', -12], ['-7.5', 13]], '6.5', 1000), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction', ([['+2.5', -2], ['+3', 1]], '6', 1100), ['win', 2016]),
  ('regression: line shift direction', ([['+3', -9], ['-10', 6]], '6', 1100), ['refund', 1100]),
  ('variant scenario 1',
   ([['-10', 10], ['-7', -5], ['+7', -6], ['-3', 3], ['-1', -4], ['+7', -2]], '7', 1000),
   ['lose', 0]),
  ('variant scenario 2', ([['+1.5', -12], ['-7', -11], ['-7', -3]], '6.5', 1000), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['+3', 11], ['+1.5', 7], ['-3', 4], ['-7', 2]], '6.5', 1100),
   ['win', 3960]),
  ('regression: line shift direction', ([['-1', 3], ['+7', -8]], '7', 1000), ['win', 1833]),
  ('variant scenario 1', ([['-7.5', 4], ['-7.5', -1], ['+1.5', -12]], '7', 1000), ['lose', 0]),
  ('variant scenario 2', ([['+7', 0], ['-7.5', -14], ['-7', 9]], '6', 500), ['lose', 0])],
 [('control two-team teaser', ([['-7.5', 3], ['+2.5', -5]], '6', 1200), ['win', 2200]),
  ('boundary push drops a leg', ([['-7', 1], ['+3', 0], ['-1', 2]], '6', 1000), ['win', 1833]),
  ('boundary reduced to one leg', ([['-7', 1], ['+3', 5]], '6', 1000), ['refund', 1000]),
  ('control losing leg', ([['-10', 2], ['+3', 5], ['+7', 0]], '6', 1000), ['lose', 0]),
  ('control three winners', ([['-3', 1], ['+3', 0], ['-1', 0]], '6', 1000), ['win', 2600]),
  ('regression: line shift direction',
   ([['-10', 11], ['+3', -4], ['-3', 1], ['+7', -12]], '6', 1000),
   ['win', 3600]),
  ('variant scenario 1', ([['-7', -12], ['-7', -2]], '6', 500), ['lose', 0]),
  ('variant scenario 2',
   ([['-1', -7], ['-7.5', 12], ['-7.5', -12], ['+3', 8], ['-10', -2]], '7', 1000),
   ['lose', 0])]]
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-team teaser['win', 2200]['win', 2200]Passed
boundary push drops a leg['win', 1833]['win', 1833]Passed
boundary reduced to one leg['refund', 1000]['refund', 1000]Passed
control losing leg['lose', 0]['lose', 0]Passed
control three winners['win', 2600]['win', 2600]Passed
regression: line shift direction['win', 1300]['win', 1300]Passed
variant scenario 1['lose', 0]['lose', 0]Passed
variant scenario 2['lose', 0]['lose', 0]Passed

SHA-256 / f0102f9b8a4d1f69551fb8237b1350c2825821fd82d8abdc7825813152b07236

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.952471+00:00.

Case digest / c208b13dba56b17ef05a57cc08841f230cb47deb75e62c2260fd4735b9b78270