F007 — RTP Margin Application
| Field | Value |
|---|---|
| ID | F007 |
| Phase | 1 — Core Game Engine |
| Jira | HEDGE-133 |
| Status | TS ⬜ · JS ⬜ · UMA ⬜ |
Business Rule
The operator configures a target RTP at installation time. The game engine converts this into a house margin that is subtracted from the fair European odds before presenting them to the player. Relationship:- The Rounding Algorithm applied to
oddsActual(see F033) - Player betting strategy (skilled players backing favourites achieve closer to target RTP)
Source: Game Concept Document
“At install-time the operator sets the target RTP they desire Hedge’Em to run at.”
“The target RTP is set by the operator at installation time but the actual RTP can be influenced by other configuration parameters such as ‘Rounding Algorithms’ and player gameplay strategy.”
“As with other table games such as Blackjack, how a player plays Hedge’Em will affect the RTP.”
Operator Configuration
RTP is a per-installation configuration parameter, not a per-session or per-player setting:| Config | Type | Default | Range |
|---|---|---|---|
targetRTP | number | TBD | Operator-defined (regulatory limits apply) |
houseMargin during server-side game record generation. Once generated, game records encode the margin implicitly in oddsActual values.
JavaScript Reference
JS Source: Margin applied server-side during game generation. Client readsodds_actual and odds_rounded from pre-generated game records. RTP margin is not recalculated in the client — it is baked into the data at generation time.
Relevant field: gameName in coredata.ts (e.g. "Max RTP") reflects the RTP configuration used to generate the record.
TypeScript Implementation
Current status: TS client consumes pre-computed odds fromcoredata.ts. RTP margin configuration is not yet wired in the TS standalone client — the coredata was generated with a specific margin applied at source.
Full RTP configuration support is tracked in F032.
Acceptance Criteria
| # | Criterion | JS | TS | UMA |
|---|---|---|---|---|
| AC1 | payoutOdds = fairOdds × targetRTP for all hands | ⬜ | ⬜ | ⬜ |
| AC2 | Changing targetRTP updates all computed odds | ⬜ | ⬜ | ⬜ |
| AC3 | gameName in coredata reflects the RTP configuration used | N/A | ✅ | N/A |
Version Parity
| Version | Status | Notes |
|---|---|---|
| JS (reference) | ⬜ Not audited | Margin baked into server-generated game records |
| TS | ⬜ Not audited | Reads margin-adjusted odds from coredata |
| UMA | ⬜ Not audited | Phase 5 |
Related Features
- F006 — Odds Calculation (full formula)
- F032 — RTP Config (operator installation config)
- F033 — Rounding Algorithms (post-margin rounding affects actual RTP)
