FAILURE MAP
← Case archive

FA-84697 / Betting odds conversion / Member archive

Settled winning leg dropped from the cash-out value · case 02

A multiple with a leg already won is valued as if that leg did not exist.

Member previewVariant 2 · 3 implementations · 9 checks per implementation

Case contract

Cash-out offer for a single or multiple back bet. legs rows are [price taken, current] where current is a decimal price for an open leg, "won" or "lost". Any lost leg makes the offer [0, 0]. Otherwise value = stake * product of prices taken / product of current prices of open legs, reduced by margin_pct percent, rounded down to a cent. partial_cents 0 means full cash-out: return [value, 0]. A partial amount above the value returns "invalid"; otherwise return [partial, remaining stake] with remaining = floor(stake * (1 - partial / value)).

Why this case matters

Cash-out and partial cash-out offers are recomputed from live prices on every tick.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
boundary won leg keeps price[1333, 0][2666, 0]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗