Math SDK
@rollout/math-sdkDefine a game's math and prove its return exactly, before a single pixel is drawn.
- Exact tables, books of simulated rounds, step ladders and crash curves
- Returns as exact fractions, tuned to the target to the last digit
- Facts and PAR sheets: return, hit rate, volatility, max win and its odds
- Provably fair draws from HMAC-SHA256 seeds
Private repository · rollout-math-sdk
import { exactMath, exactOutcome, ratio, tuneExact,} from "@rollout/math-sdk";// Three outcomes, tuned so the game returns exactly 97%.const { table } = tuneExact( { outcomes: [ exactOutcome("miss", 0, 60), exactOutcome("hit", 2, 38), exactOutcome("jackpot", 50, 2), ], }, ratio(97, 100),);export const math = exactMath({ id: "coin-drop", modes: [ { name: "base", label: "Drop", cost: ratio(1), kind: "base" }, ], tables: { base: table },});math.facts.rtp.percent; // "97.00%"