{"abstract":"Two short-priced withdrawals remove more than 75p in the pound.","category":"Betting odds conversion","checks":8,"contract":"Non-runner deduction for a winning bet. Each withdrawn runner's decimal price maps to pence-in-the-pound from the first band whose limit it does not exceed: [('1.30', 75), ('1.40', 70), ('1.53', 65), ('1.62', 60), ('1.80', 55), ('1.95', 50), ('2.20', 45), ('2.50', 40), ('2.75', 35), ('3.25', 30), ('4.00', 25), ('5.00', 20), ('6.50', 15), ('10.00', 10), ('15.00', 5)]; above 15.00 it is 0. Deductions from several withdrawals are summed and capped at 75. The deduction applies to winnings only: return = stake + floor(stake * (price - 1) * (100 - deduction) / 100). Return [deduction, return cents].","evaluation_group":"w2-odds-conversion-non-runner-deduction","failed_approach":"Capping each withdrawal separately does not bound the sum.","family":"w2-odds-conversion-non-runner-deduction-deduction-cap","id":"FA-84666","implementations":{"attempt":{"sha256":"4c7754bb4bd77317df737e33d0affaeb97af90cd396e540ba4303ffa8cd8f05f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(stake_cents, price, withdrawn):\n    TABLE = [('1.30', 75), ('1.40', 70), ('1.53', 65), ('1.62', 60), ('1.80', 55), ('1.95', 50), ('2.20', 45), ('2.50', 40), ('2.75', 35), ('3.25', 30), ('4.00', 25), ('5.00', 20), ('6.50', 15), ('10.00', 10), ('15.00', 5)]\n    def ded(p):\n        p = Fraction(p)\n        for limit, pence in TABLE:\n            if p <= Fraction(limit):\n                return pence\n        return 0\n    total = sum(min(75, ded(w)) for w in withdrawn)\n    profit = stake_cents * (Fraction(price) - 1)\n    return [total, stake_cents + math.floor(profit * (100 - total) / 100)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '3.41', ['1.80', '1.30', '2.50']), [75, 400]),\n  ('variant scenario 1', (500, '4.54', []), [0, 2270]),\n  ('variant scenario 2', (500, '8.92', ['2.75', '2.50']), [75, 1490])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '10.89', ['2.75', '1.80', '6.50']), [75, 868]),\n  ('variant scenario 1', (1000, '4.14', ['2.21', '1.95', '18.92']), [75, 1785]),\n  ('variant scenario 2', (1000, '7.69', []), [0, 7690])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (500, '10.54', ['19.32', '1.53', '1.40']), [75, 1692]),\n  ('variant scenario 1', (500, '7.00', ['12.05']), [5, 3350]),\n  ('variant scenario 2', (500, '2.93', []), [0, 1465])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '6.43', ['12.30', '3.25', '1.80']), [75, 589]),\n  ('variant scenario 1', (1000, '8.99', ['5.00', '4.00']), [45, 5394]),\n  ('variant scenario 2', (250, '9.92', ['3.44']), [25, 1922])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (500, '11.98', ['1.53', '6.50']), [75, 1872]),\n  ('variant scenario 1', (250, '3.13', ['12.77']), [5, 755]),\n  ('variant scenario 2', (250, '1.88', []), [0, 470])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a3f2ecef930746d6b471b22377ba3bf9a455a5ab6b4dfea444ea77d50d872cf8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(stake_cents, price, withdrawn):\n    TABLE = [('1.30', 75), ('1.40', 70), ('1.53', 65), ('1.62', 60), ('1.80', 55), ('1.95', 50), ('2.20', 45), ('2.50', 40), ('2.75', 35), ('3.25', 30), ('4.00', 25), ('5.00', 20), ('6.50', 15), ('10.00', 10), ('15.00', 5)]\n    def ded(p):\n        p = Fraction(p)\n        for limit, pence in TABLE:\n            if p <= Fraction(limit):\n                return pence\n        return 0\n    total = sum(ded(w) for w in withdrawn)\n    profit = stake_cents * (Fraction(price) - 1)\n    return [total, stake_cents + math.floor(profit * (100 - total) / 100)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '3.41', ['1.80', '1.30', '2.50']), [75, 400]),\n  ('variant scenario 1', (500, '4.54', []), [0, 2270]),\n  ('variant scenario 2', (500, '8.92', ['2.75', '2.50']), [75, 1490])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '10.89', ['2.75', '1.80', '6.50']), [75, 868]),\n  ('variant scenario 1', (1000, '4.14', ['2.21', '1.95', '18.92']), [75, 1785]),\n  ('variant scenario 2', (1000, '7.69', []), [0, 7690])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (500, '10.54', ['19.32', '1.53', '1.40']), [75, 1692]),\n  ('variant scenario 1', (500, '7.00', ['12.05']), [5, 3350]),\n  ('variant scenario 2', (500, '2.93', []), [0, 1465])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '6.43', ['12.30', '3.25', '1.80']), [75, 589]),\n  ('variant scenario 1', (1000, '8.99', ['5.00', '4.00']), [45, 5394]),\n  ('variant scenario 2', (250, '9.92', ['3.44']), [25, 1922])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (500, '11.98', ['1.53', '6.50']), [75, 1872]),\n  ('variant scenario 1', (250, '3.13', ['12.77']), [5, 755]),\n  ('variant scenario 2', (250, '1.88', []), [0, 470])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"f6ca09e2669dcb55784e1f582c1ae469277cdedc79abc32999b61dc43369a3da","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(stake_cents, price, withdrawn):\n    TABLE = [('1.30', 75), ('1.40', 70), ('1.53', 65), ('1.62', 60), ('1.80', 55), ('1.95', 50), ('2.20', 45), ('2.50', 40), ('2.75', 35), ('3.25', 30), ('4.00', 25), ('5.00', 20), ('6.50', 15), ('10.00', 10), ('15.00', 5)]\n    def ded(p):\n        p = Fraction(p)\n        for limit, pence in TABLE:\n            if p <= Fraction(limit):\n                return pence\n        return 0\n    total = min(75, sum(ded(w) for w in withdrawn))\n    profit = stake_cents * (Fraction(price) - 1)\n    return [total, stake_cents + math.floor(profit * (100 - total) / 100)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '3.41', ['1.80', '1.30', '2.50']), [75, 400]),\n  ('variant scenario 1', (500, '4.54', []), [0, 2270]),\n  ('variant scenario 2', (500, '8.92', ['2.75', '2.50']), [75, 1490])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '10.89', ['2.75', '1.80', '6.50']), [75, 868]),\n  ('variant scenario 1', (1000, '4.14', ['2.21', '1.95', '18.92']), [75, 1785]),\n  ('variant scenario 2', (1000, '7.69', []), [0, 7690])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (500, '10.54', ['19.32', '1.53', '1.40']), [75, 1692]),\n  ('variant scenario 1', (500, '7.00', ['12.05']), [5, 3350]),\n  ('variant scenario 2', (500, '2.93', []), [0, 1465])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (250, '6.43', ['12.30', '3.25', '1.80']), [75, 589]),\n  ('variant scenario 1', (1000, '8.99', ['5.00', '4.00']), [45, 5394]),\n  ('variant scenario 2', (250, '9.92', ['3.44']), [25, 1922])],\n [('control no withdrawal', (1000, '5.00', []), [0, 5000]),\n  ('boundary price on band limit', (1000, '5.00', ['2.50']), [40, 3400]),\n  ('control long-shot withdrawal', (1000, '5.00', ['21.00']), [0, 5000]),\n  ('boundary cap at 75', (1000, '3.00', ['1.50', '1.50']), [75, 1500]),\n  ('control two withdrawals', (1000, '3.00', ['4.00', '6.00']), [40, 2200]),\n  ('regression: deduction cap', (500, '11.98', ['1.53', '6.50']), [75, 1872]),\n  ('variant scenario 1', (250, '3.13', ['12.77']), [5, 755]),\n  ('variant scenario 2', (250, '1.88', []), [0, 470])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-odds-conversion-non-runner-deduction-deduction-cap","generated_at":"2026-09-29T14:50:33.161924+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Racing settlement reduces winnings when a runner is withdrawn after prices were struck.","repair":"Cap the summed deduction at 75.","root_cause":"The summed deduction is not capped.","sha256":"38b12dd982cf90accf983132835d98f5130de6f1694eb2c0304e3de427647fb7","title":"Combined deductions exceed the cap · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.395,"exit_code":1,"observations":[{"actual":[0,5000],"check":"control no withdrawal","expected":[0,5000],"passed":true},{"actual":[40,3400],"check":"boundary price on band limit","expected":[40,3400],"passed":true},{"actual":[0,5000],"check":"control long-shot withdrawal","expected":[0,5000],"passed":true},{"actual":[130,400],"check":"boundary cap at 75","expected":[75,1500],"passed":false},{"actual":[40,2200],"check":"control two withdrawals","expected":[40,2200],"passed":true},{"actual":[170,-172],"check":"regression: deduction cap","expected":[75,400],"passed":false},{"actual":[0,2270],"check":"variant scenario 1","expected":[0,2270],"passed":true},{"actual":[75,1490],"check":"variant scenario 2","expected":[75,1490],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control no withdrawal\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"boundary price on band limit\", \"actual\": [40, 3400], \"expected\": [40, 3400], \"passed\": true}, {\"check\": \"control long-shot withdrawal\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"boundary cap at 75\", \"actual\": [130, 400], \"expected\": [75, 1500], \"passed\": false}, {\"check\": \"control two withdrawals\", \"actual\": [40, 2200], \"expected\": [40, 2200], \"passed\": true}, {\"check\": \"regression: deduction cap\", \"actual\": [170, -172], \"expected\": [75, 400], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [0, 2270], \"expected\": [0, 2270], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [75, 1490], \"expected\": [75, 1490], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":52.499,"exit_code":1,"observations":[{"actual":[0,5000],"check":"control no withdrawal","expected":[0,5000],"passed":true},{"actual":[40,3400],"check":"boundary price on band limit","expected":[40,3400],"passed":true},{"actual":[0,5000],"check":"control long-shot withdrawal","expected":[0,5000],"passed":true},{"actual":[130,400],"check":"boundary cap at 75","expected":[75,1500],"passed":false},{"actual":[40,2200],"check":"control two withdrawals","expected":[40,2200],"passed":true},{"actual":[170,-172],"check":"regression: deduction cap","expected":[75,400],"passed":false},{"actual":[0,2270],"check":"variant scenario 1","expected":[0,2270],"passed":true},{"actual":[75,1490],"check":"variant scenario 2","expected":[75,1490],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control no withdrawal\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"boundary price on band limit\", \"actual\": [40, 3400], \"expected\": [40, 3400], \"passed\": true}, {\"check\": \"control long-shot withdrawal\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"boundary cap at 75\", \"actual\": [130, 400], \"expected\": [75, 1500], \"passed\": false}, {\"check\": \"control two withdrawals\", \"actual\": [40, 2200], \"expected\": [40, 2200], \"passed\": true}, {\"check\": \"regression: deduction cap\", \"actual\": [170, -172], \"expected\": [75, 400], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [0, 2270], \"expected\": [0, 2270], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [75, 1490], \"expected\": [75, 1490], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":48.326,"exit_code":0,"observations":[{"actual":[0,5000],"check":"control no withdrawal","expected":[0,5000],"passed":true},{"actual":[40,3400],"check":"boundary price on band limit","expected":[40,3400],"passed":true},{"actual":[0,5000],"check":"control long-shot withdrawal","expected":[0,5000],"passed":true},{"actual":[75,1500],"check":"boundary cap at 75","expected":[75,1500],"passed":true},{"actual":[40,2200],"check":"control two withdrawals","expected":[40,2200],"passed":true},{"actual":[75,400],"check":"regression: deduction cap","expected":[75,400],"passed":true},{"actual":[0,2270],"check":"variant scenario 1","expected":[0,2270],"passed":true},{"actual":[75,1490],"check":"variant scenario 2","expected":[75,1490],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control no withdrawal\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"boundary price on band limit\", \"actual\": [40, 3400], \"expected\": [40, 3400], \"passed\": true}, {\"check\": \"control long-shot withdrawal\", \"actual\": [0, 5000], \"expected\": [0, 5000], \"passed\": true}, {\"check\": \"boundary cap at 75\", \"actual\": [75, 1500], \"expected\": [75, 1500], \"passed\": true}, {\"check\": \"control two withdrawals\", \"actual\": [40, 2200], \"expected\": [40, 2200], \"passed\": true}, {\"check\": \"regression: deduction cap\", \"actual\": [75, 400], \"expected\": [75, 400], \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [0, 2270], \"expected\": [0, 2270], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [75, 1490], \"expected\": [75, 1490], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}