The problem with a felt
A roulette layout is a map. Where a chip sits on it says what it covers: on a number, across a line between two, on a corner of four, at the end of a column. A physical dealer reads the map; a settlement engine has to encode it, and the obvious encoding, a table of positions and the numbers each one touches, is exactly the kind of data that is easy to get subtly wrong and hard to check. A corner that lists the wrong fourth number pays wrongly forever and nobody notices until someone does.
The engine here avoids the map entirely. A bet is not a position; it is a string that names its own kind and its own numbers. The interface produces the string when you click the felt, and from then on the felt is irrelevant. The settlement code never asks where a chip was. It asks what the string says.
The keys
| KEY | BET | POCKETS COVERED | PAYS | COVERED × PAYS |
|---|---|---|---|---|
| n:17 | Straight | 1 | ×36 | 36 |
| sp:16-17 | Split | 2 | ×18 | 36 |
| st:16-17-18 | Street | 3 | ×12 | 36 |
| co:16-17-19-20 | Corner | 4 | ×9 | 36 |
| f4:0-1-2-3 | First four | 4 | ×9 | 36 |
| sl:16-…-21 | Six line | 6 | ×6 | 36 |
| dz:1 | 2 | 3 | Dozen | 12 | ×3 | 36 |
| col:1 | 2 | 3 | Column | 12 | ×3 | 36 |
| ev:red | black | odd | even | low | high | Even chance | 18 | ×2 | 36 |
Total-return multiples: ×36 means the stake back plus 35. Column c is the numbers congruent to c modulo 3, with column 3 taking the multiples of 3. The last column is the same for every row, which is the whole point.
Settlement is then one line per key: expand the key to its pockets, check whether the spun pocket is among them, and if so multiply the stake by the kind’s multiplier. Because the pocket comes from a single cursor of the round’s hash, one spin settles every key on the table in the same pass, and the demo engine’s comment says so in as many words: one roll settles a whole table of bets, roulette-style.
The belt and the braces
A string that describes its own bet can also describe a bet that does not exist: a split of two numbers that are not neighbours, a corner with five entries, a straight on 40. The interface never produces those, but an engine that settles money should not trust an interface. So every key is validated before it is priced: its kind must be known, its number list must be exactly the size that kind covers, every number must be between 0 and 36, and none may repeat. A key that fails is refused, not settled.
What the validator does not check is adjacency: it accepts sp:1-36 as a two-number bet. That is a deliberate looseness rather than a hole, because the price of a two-number bet is the same whether or not the numbers touch. The ×18 is for covering two pockets out of thirty-seven, not for the geometry of the felt, and a player who somehow submitted a non-adjacent split would be paid exactly what a split is worth.
One number: thirty-six
The last column of the table is the reason to write the article. For every kind of bet, the multiplier times the number of pockets covered is 36. That is not a coincidence of the standard European payouts; it is what they are. A bet that covers k pockets on a 37-pocket wheel wins with probability k ÷ 37 and returns 36 ÷ k, so its expected return is 36 ÷ 37 whatever k is. Every bet on the table costs the same 2.7%.
- There is no good bet and no bad bet on this wheel. Straight, split, dozen and red are the same price in different volatilities, exactly as Sic Bo’s boxes are not.
- The first four is an ordinary bet here. On American layouts the five-number basket pays ×7 on 5 pockets out of 38, a worse price than everything else; f4 pays ×9 on 4 of 37, which multiplies out to 36 like the rest.
- The edge is the zero. Thirty-six pockets’ worth of payout on thirty-seven pockets; the missing pocket is the whole house edge, and there is one of it.
How is a roulette bet represented on this site?
As a self-describing string: a kind prefix and the numbers it covers, such as n:17, sp:16-17, co:16-17-19-20, dz:2 or ev:red. The engine decodes the string to its pocket set and settles by membership.
What does each bet pay?
Total return: straight ×36, split ×18, street ×12, corner ×9, first four ×9, six line ×6, dozen ×3, column ×3, even chances ×2. These match the standard European table.
Why is every bet the same price?
Because for every kind the multiplier times the pockets covered equals 36, on a wheel with 37 pockets. Expected return is 36 ÷ 37 = 97.30% and the edge is 2.7% for every bet.
What stops a malformed bet?
A validator that requires a known kind, exactly the right number of pockets for that kind, every number in 0…36, and no duplicates. Keys that fail are refused before settlement.
How is the pocket chosen?
floor(u × 37), where u comes from cursor 0 of the round’s hash of the committed server seed, your client seed and the round number. One spin settles every key placed on it.
- Betkyo engine source: roulette/derive.ts (bet keys, rouletteNumbersOf, rouletteMultOf, rouletteKeyValid, ROULETTE_ORDER, ROULETTE_RED), _shared/demoLocal.ts (roulette settlement)



