Skip to content

feat(analytics)!: make wallet ggr the official ggr and show sportsbook promotion cost - #395

Open
okapitula wants to merge 2 commits into
devfrom
feat/official-ggr-definition
Open

okapitula wants to merge 2 commits into
devfrom
feat/official-ggr-definition

Conversation

@okapitula

Copy link
Copy Markdown
Collaborator

Summary

  • The wallet ledger's GGR is now the official GGR: stakes less voided stakes less wins, plus wins taken back, on a cash basis (ADR-0050).
  • The financial summary adds sportsbookPromotionCost: what sportsbook promotions paid, net of reopens. This is already inside GGR and is not deducted again.
  • The products report is labelled settled basis and is not the official GGR.
  • The sportsbook player summary renames ggr to netResult, a per-player activity figure rather than revenue.
  • A new analytics module doc, an update to the GGR row in the glossary, and dated updates on ADR-0033 and ADR-0047.

Why

Wallet GGR, the sportsbook player summary and the products report each count a bet differently, and all three were called GGR. For the same period they can disagree, and an operator reporting to a regulator needs one number that reconciles to balances. Wallet GGR is append-only, ties to balances and uses one rule for every product, so it is the one to call GGR. The other two keep their basis but say what they are.

A provider freebet's win is withdrawable money the operator pays, so it stays a plain win inside GGR. Its cost is shown as its own figure, read from the sportsbook's append-only transaction rows through the optional sportsbook seam the products report already uses. It is the same total as the sportsbook promotion report.

Diagram

flowchart LR
  W[wallet ledger] -->|bet - bet reversal - win + win reversal| G[GGR, official]
  S[sportsbook bet transactions] -->|promotion paid on settle - on reopen| P[of which sportsbook promotions]
  G --> NGR[NGR = GGR - bonus cost]
  R[game rounds + sportsbook bets] -->|settled basis| PR[revenue by product]
  B[sportsbook bet rows] -->|cash stake - payout| N[player net result]
Loading

Alternatives considered

  • Book freebet wins as bonus credits so GGR excludes them. Rejected: it changes the player's transaction list, net deposits and the debt paths, all for a cost the sportsbook rows already record.
  • Move the products report onto wallet rows now. Deferred: the wallet needs to record which product each stake came from first.
  • Net a reopen's promotion part by what the wallet collected. Rejected: the figure would no longer match the promotion report. Instead, the docs state that the figure can sit below GGR's promotion share by uncollected or written-off sportsbook debt.

Risks

  • BREAKING CHANGE: GET /backoffice/sportsbook/players/{userId}/summary returns netResult in place of ggr. The value is unchanged. No in-repo consumer reads it outside the E2E tests.
  • The financial summary's cache key is renamed, so a summary cached by an older instance during a rolling deploy is never served without the new field.
  • NGR still deducts only bonus cost, not cashback credits.
  • The products report keeps its ggr field name until it moves onto wallet rows.

…k promotion cost

The wallet ledger's GGR (stakes less voided stakes less wins plus wins taken
back, cash basis) is the official GGR (ADR-0050). The financial summary adds
what sportsbook promotions paid, net of reopens, as its own figure. The
products report is labelled settled basis, and the sportsbook player summary's
figure is renamed to net result.

BREAKING CHANGE: GET /backoffice/sportsbook/players/{userId}/summary returns
netResult in place of ggr. The value is unchanged.
mp-blurify
mp-blurify previously approved these changes Nov 5, 2026
@okapitula
okapitula enabled auto-merge November 6, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants