{"abstract":"Fractional-cent payouts are rounded up, overpaying the customer.","category":"Betting odds conversion","checks":9,"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].","contract_signature":"legs, stake_cents","evaluation_group":"w2-odds-conversion-parlay-leg-adjustments","failed_approach":"Rounding up is even more generous.","family":"w2-odds-conversion-parlay-leg-adjustments-payout-rounding","id":"FA-84481","implementations":{"attempt":{"sha256":"7791864669dc2a0c9bab8d77a3a02e358801607a85328903e30ab0e8d266ac4b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(legs, stake_cents):\n    factor = Fraction(1)\n    for price, result in legs:\n        d = Fraction(price)\n        if result == 'lose':\n            factor = Fraction(0)\n            break\n        if result == 'win':\n            factor *= d\n        elif result == 'half-win':\n            factor *= (1 + d) / 2\n        elif result == 'half-lose':\n            factor *= Fraction(1, 2)\n    q = math.floor(factor * 10000 + Fraction(1, 2))\n    return ['%d.%04d' % (q // 10000, q % 10000), math.ceil(stake_cents * factor)]\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 two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding',\n   ([['1.54', 'half-win'],\n     ['2.44', 'win'],\n     ['1.51', 'half-win'],\n     ['3.53', 'push'],\n     ['3.61', 'win']],\n    100),\n   ['14.0393', 1403]),\n  ('variant scenario 1',\n   ([['3.83', 'half-win'], ['1.67', 'lose'], ['2.67', 'push']], 1999),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['2.18', 'void'], ['2.39', 'lose'], ['1.73', 'win'], ['2.99', 'push'], ['2.32', 'half-win']],\n    333),\n   ['0.0000', 0])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding', ([['3.50', 'half-win'], ['1.78', 'win']], 100), ['4.0050', 400]),\n  ('regression: payout rounding',\n   ([['3.52', 'win'],\n     ['3.90', 'half-win'],\n     ['2.23', 'void'],\n     ['3.23', 'half-lose'],\n     ['2.62', 'win']],\n    1999),\n   ['11.2974', 22583]),\n  ('variant scenario 1',\n   ([['2.37', 'half-win'], ['1.31', 'half-win'], ['1.84', 'lose']], 1000),\n   ['0.0000', 0]),\n  ('variant scenario 2', ([['3.39', 'void'], ['1.92', 'win']], 100), ['1.9200', 192])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding', ([['3.61', 'half-win'], ['1.35', 'win']], 333), ['3.1118', 1036]),\n  ('regression: payout rounding',\n   ([['3.54', 'win'], ['2.46', 'push'], ['1.36', 'void'], ['2.75', 'win'], ['1.79', 'win']], 1999),\n   ['17.4257', 34833]),\n  ('variant scenario 1',\n   ([['2.60', 'void'], ['2.23', 'win'], ['1.68', 'lose'], ['1.96', 'half-win'], ['1.91', 'win']],\n    1000),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['1.22', 'push'], ['2.49', 'void'], ['3.59', 'push'], ['3.59', 'lose']], 250),\n   ['0.0000', 0])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding',\n   ([['2.42', 'win'], ['3.10', 'win'], ['1.90', 'win']], 1000),\n   ['14.2538', 14253]),\n  ('variant scenario 1',\n   ([['3.57', 'half-win'], ['2.67', 'win'], ['1.31', 'win'], ['2.06', 'push'], ['2.36', 'win']],\n    1000),\n   ['18.8617', 18861]),\n  ('variant scenario 2', ([['1.21', 'win'], ['3.54', 'win']], 100), ['4.2834', 428])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding',\n   ([['3.86', 'half-lose'], ['3.17', 'push'], ['2.09', 'void']], 1999),\n   ['0.5000', 999]),\n  ('variant scenario 1',\n   ([['2.72', 'void'],\n     ['3.77', 'half-win'],\n     ['2.12', 'win'],\n     ['1.39', 'lose'],\n     ['2.98', 'half-win']],\n    1999),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['3.07', 'half-win'], ['2.59', 'lose'], ['1.62', 'lose']], 250),\n   ['0.0000', 0])]]\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":"eb17860732014d1c52275db49db1084818de62e1b80a0f4b4f7cf20329501775","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(legs, stake_cents):\n    factor = Fraction(1)\n    for price, result in legs:\n        d = Fraction(price)\n        if result == 'lose':\n            factor = Fraction(0)\n            break\n        if result == 'win':\n            factor *= d\n        elif result == 'half-win':\n            factor *= (1 + d) / 2\n        elif result == 'half-lose':\n            factor *= Fraction(1, 2)\n    q = math.floor(factor * 10000 + Fraction(1, 2))\n    return ['%d.%04d' % (q // 10000, q % 10000), round(stake_cents * factor)]\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 two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding',\n   ([['1.54', 'half-win'],\n     ['2.44', 'win'],\n     ['1.51', 'half-win'],\n     ['3.53', 'push'],\n     ['3.61', 'win']],\n    100),\n   ['14.0393', 1403]),\n  ('variant scenario 1',\n   ([['3.83', 'half-win'], ['1.67', 'lose'], ['2.67', 'push']], 1999),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['2.18', 'void'], ['2.39', 'lose'], ['1.73', 'win'], ['2.99', 'push'], ['2.32', 'half-win']],\n    333),\n   ['0.0000', 0])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding', ([['3.50', 'half-win'], ['1.78', 'win']], 100), ['4.0050', 400]),\n  ('regression: payout rounding',\n   ([['3.52', 'win'],\n     ['3.90', 'half-win'],\n     ['2.23', 'void'],\n     ['3.23', 'half-lose'],\n     ['2.62', 'win']],\n    1999),\n   ['11.2974', 22583]),\n  ('variant scenario 1',\n   ([['2.37', 'half-win'], ['1.31', 'half-win'], ['1.84', 'lose']], 1000),\n   ['0.0000', 0]),\n  ('variant scenario 2', ([['3.39', 'void'], ['1.92', 'win']], 100), ['1.9200', 192])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding', ([['3.61', 'half-win'], ['1.35', 'win']], 333), ['3.1118', 1036]),\n  ('regression: payout rounding',\n   ([['3.54', 'win'], ['2.46', 'push'], ['1.36', 'void'], ['2.75', 'win'], ['1.79', 'win']], 1999),\n   ['17.4257', 34833]),\n  ('variant scenario 1',\n   ([['2.60', 'void'], ['2.23', 'win'], ['1.68', 'lose'], ['1.96', 'half-win'], ['1.91', 'win']],\n    1000),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['1.22', 'push'], ['2.49', 'void'], ['3.59', 'push'], ['3.59', 'lose']], 250),\n   ['0.0000', 0])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding',\n   ([['2.42', 'win'], ['3.10', 'win'], ['1.90', 'win']], 1000),\n   ['14.2538', 14253]),\n  ('variant scenario 1',\n   ([['3.57', 'half-win'], ['2.67', 'win'], ['1.31', 'win'], ['2.06', 'push'], ['2.36', 'win']],\n    1000),\n   ['18.8617', 18861]),\n  ('variant scenario 2', ([['1.21', 'win'], ['3.54', 'win']], 100), ['4.2834', 428])],\n [('control two winners', ([['2.00', 'win'], ['1.50', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary pushed leg', ([['2.00', 'win'], ['1.90', 'push']], 1000), ['2.0000', 2000]),\n  ('boundary half-win leg', ([['2.00', 'half-win'], ['2.00', 'win']], 1000), ['3.0000', 3000]),\n  ('boundary half-lose leg', ([['2.00', 'half-lose'], ['3.00', 'win']], 1000), ['1.5000', 1500]),\n  ('control losing leg', ([['2.00', 'win'], ['1.50', 'lose']], 1000), ['0.0000', 0]),\n  ('control payout rounds down', ([['1.33', 'win']], 333), ['1.3300', 442]),\n  ('regression: payout rounding',\n   ([['3.86', 'half-lose'], ['3.17', 'push'], ['2.09', 'void']], 1999),\n   ['0.5000', 999]),\n  ('variant scenario 1',\n   ([['2.72', 'void'],\n     ['3.77', 'half-win'],\n     ['2.12', 'win'],\n     ['1.39', 'lose'],\n     ['2.98', 'half-win']],\n    1999),\n   ['0.0000', 0]),\n  ('variant scenario 2',\n   ([['3.07', 'half-win'], ['2.59', 'lose'], ['1.62', 'lose']], 250),\n   ['0.0000', 0])]]\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-parlay-leg-adjustments-payout-rounding","generated_at":"2026-09-29T14:50:31.205196+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Settlement engines must collapse pushed, voided and Asian half results inside multiples.","root_cause":"The payout is rounded to the nearest cent.","sha256":"388570a9bc566637e27eaf3a634b2d7630e517e2fc7a16ca3159db5057ca0e8d","title":"Parlay payout rounded up or to nearest cent · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.6,"exit_code":1,"observations":[{"actual":["3.0000",3000],"check":"control two winners","expected":["3.0000",3000],"passed":true},{"actual":["2.0000",2000],"check":"boundary pushed leg","expected":["2.0000",2000],"passed":true},{"actual":["3.0000",3000],"check":"boundary half-win leg","expected":["3.0000",3000],"passed":true},{"actual":["1.5000",1500],"check":"boundary half-lose leg","expected":["1.5000",1500],"passed":true},{"actual":["0.0000",0],"check":"control losing leg","expected":["0.0000",0],"passed":true},{"actual":["1.3300",443],"check":"control payout rounds down","expected":["1.3300",442],"passed":false},{"actual":["14.0393",1404],"check":"regression: payout rounding","expected":["14.0393",1403],"passed":false},{"actual":["0.0000",0],"check":"variant scenario 1","expected":["0.0000",0],"passed":true},{"actual":["0.0000",0],"check":"variant scenario 2","expected":["0.0000",0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control two winners\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary pushed leg\", \"actual\": [\"2.0000\", 2000], \"expected\": [\"2.0000\", 2000], \"passed\": true}, {\"check\": \"boundary half-win leg\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary half-lose leg\", \"actual\": [\"1.5000\", 1500], \"expected\": [\"1.5000\", 1500], \"passed\": true}, {\"check\": \"control losing leg\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"control payout rounds down\", \"actual\": [\"1.3300\", 443], \"expected\": [\"1.3300\", 442], \"passed\": false}, {\"check\": \"regression: payout rounding\", \"actual\": [\"14.0393\", 1404], \"expected\": [\"14.0393\", 1403], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.313,"exit_code":1,"observations":[{"actual":["3.0000",3000],"check":"control two winners","expected":["3.0000",3000],"passed":true},{"actual":["2.0000",2000],"check":"boundary pushed leg","expected":["2.0000",2000],"passed":true},{"actual":["3.0000",3000],"check":"boundary half-win leg","expected":["3.0000",3000],"passed":true},{"actual":["1.5000",1500],"check":"boundary half-lose leg","expected":["1.5000",1500],"passed":true},{"actual":["0.0000",0],"check":"control losing leg","expected":["0.0000",0],"passed":true},{"actual":["1.3300",443],"check":"control payout rounds down","expected":["1.3300",442],"passed":false},{"actual":["14.0393",1404],"check":"regression: payout rounding","expected":["14.0393",1403],"passed":false},{"actual":["0.0000",0],"check":"variant scenario 1","expected":["0.0000",0],"passed":true},{"actual":["0.0000",0],"check":"variant scenario 2","expected":["0.0000",0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control two winners\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary pushed leg\", \"actual\": [\"2.0000\", 2000], \"expected\": [\"2.0000\", 2000], \"passed\": true}, {\"check\": \"boundary half-win leg\", \"actual\": [\"3.0000\", 3000], \"expected\": [\"3.0000\", 3000], \"passed\": true}, {\"check\": \"boundary half-lose leg\", \"actual\": [\"1.5000\", 1500], \"expected\": [\"1.5000\", 1500], \"passed\": true}, {\"check\": \"control losing leg\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"control payout rounds down\", \"actual\": [\"1.3300\", 443], \"expected\": [\"1.3300\", 442], \"passed\": false}, {\"check\": \"regression: payout rounding\", \"actual\": [\"14.0393\", 1404], \"expected\": [\"14.0393\", 1403], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"0.0000\", 0], \"expected\": [\"0.0000\", 0], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}