Appearance
Wager Stake Features
Wager stake features (wagerStakeFeatures) are a variant of wager features. The engine uses them for multi-step wager games such as mines and frogger. Like regular wager features, a losing step forfeits everything in the round. A winning step works differently. Regular wager features multiply the accumulated totalWin by a relative multiplier. Wager stake features use the entry's win as an absolute cashout multiplier applied directly to the original stake. There is no chain of multiplications. So there is no compounding rounding loss.
The Problem with Relative Wager Chains
Regular wager features (wagerFeatures) treat each entry's win as a multiplier on the player's accumulated winnings. After every step, the engine floors the running multiplier to two decimal places:
typescript
// runStep.ts - relative wager step
gameResult.totalWin = Math.floor(prevResult.totalWin * multiplier * 100) / 100;Each floor discards up to 0.01× of the stake. For a card gamble with a few steps, this loss is negligible. Mines can chain up to 24 steps (5×5 grid, 1 mine). Frogger can chain up to 20 steps (20 on low risk, 15 medium, 12 high, 10 extreme). The per-step losses compound through the chain.
The effect is large enough to break the game's math. A 1-mine game targets 98% RTP. When modelled with relative wager features, it measured 91.55% actual RTP across 43 million simulated rounds. This is a 6.45% shortfall caused entirely by compounding rounding.
How Wager Stake Features Work
In a wagerStakeFeatures feature, each entry's win stores the absolute cashout multiplier relative to the original stake. For example, 1.225 means "your cashout is 1.225× your stake". This differs from a relative multiplier like 1.04, which means "multiply your current winnings by 1.04".
On a winning step the engine does not multiply anything. It simply adopts the entry's win as the round's new totalWin:
typescript
// runStep.ts - wager-stake step: totalWin is absolute, as drawn from the entry.
// (Math.max only enforces the banked floor - see Banking below.)
gameResult.totalWin = Math.max(gameResult.totalWin, banked);At any point, the payout involves only a single rounding operation. The engine applies this operation once, when the player collects:
typescript
// util.ts - one floor, at cashout
winAmount = Math.floor(totalWin * stake);On a losing step, the entry's win is 0. The player loses the stake, exactly as with regular wager features.
Rounding Rules at a Glance
| Mode | Entry win means | Per-step arithmetic | Rounding |
|---|---|---|---|
wagerFeatures | Multiplier on accumulated totalWin | floor(prev × win × 100) / 100 | Every step (2 decimals) |
wagerStakeFeatures | Absolute cashout multiplier on stake | totalWin = win (replace, no multiplication) | Once, at collect |
Configuring a Game
In the game's config.json, list the step features under wagerStakeFeatures instead of wagerFeatures:
json
{
"wagerStakeFeatures": ["mines_1_pick_1", "mines_1_pick_2", "mines_1_pick_3"]
}On the generator side, each wager entry's win must be the absolute cashout multiplier at that step (the cumulative cashout). It is not the ratio between consecutive steps. See wagerStakeFeatures on IGameConfig for the config field.
Mixing Both Wager Types
Both types can coexist in the same game. The engine builds its feature priority from the union of wagerFeatures and wagerStakeFeatures. For example, a mines game could use wagerStakeFeatures for the mine-picking progression. The same game could use regular wagerFeatures for an optional card gamble on top. The picks use absolute multipliers with no compounding loss. The card gamble multiplies the final cashout value as usual.
Worked Example
A player bets 100 on a 1-mine game (5×5 grid, 98% RTP). Each safe step's entry carries the absolute cashout multiplier. The collectible amount is floor(win × stake):
| Step | Entry win | Collectible: floor(win × 100) |
|---|---|---|
| Base game | 1.0208 | 102 |
| Pick 1 | 1.0652 | 106 |
| Pick 2 | 1.1136 | 111 |
| Pick 3 | 1.1666 | 116 |
| Pick 4 | 1.225 | 122 |
If the player hits a mine at any step, the entry win is 0. The player loses the stake.
Each entry's win is the cashout multiplier for that step, not a ratio between consecutive steps. The engine sets totalWin to the entry's win and moves on.
For comparison, if the engine modelled the same sequence with regular wagerFeatures (relative ratios, floored at every step), the player could collect only 120 instead of 122. Compounding floors lose two cents of stake in just five steps.
Banking (Partial Collect)
During an in-progress gamble the player can call collect with a partial amount to bank part of the outstanding win instead of cashing out. Banking interacts directly with the wager math above:
- The banked portion becomes a protected floor. The engine tracks it as a stake multiplier (
floor(amount / stake × 100) / 100). No money moves at bank time. The round (and its provably-fair session) stays open. The engine pays the banked amount in full at the final, round-closing collect. - On subsequent relative wager steps, the engine re-stakes only the un-banked remainder:
totalWin = banked + floor((prev − banked) × multiplier × 100) / 100. A losing step can never drop the player below the banked floor. - On wager-stake (and ladder) steps, the engine clamps the absolute result to the floor:
totalWin = max(win, banked). - A surviving banked floor remains collectible even after a losing step ends the gamble. The engine always pays it out before it closes the round.
A request that banks nothing new, or banks the entire outstanding win, collapses to a normal full collect.
Game Guides
For the shipped games built on wager stake features, see the Mines and Frogger response guides. See Gamble Features for the SDK-level view of both wager modes.