Back

How Raype decides every flip — and how you can verify it yourself.

1. Match & Escrow
Two players pick a side (heads/tails) and a SOL buy-in. Both deposits go to the same on-chain escrow wallet on Solana. The game can't start until both deposits are confirmed on-chain by the network (verified via Helius RPC, not just our database). Random matchmaking uses fixed SOL amounts (0.01, 0.05, 0.1, 0.25, 0.5, 1) so the two sides always stake identical lamports. Private games can be any amount up to 1000 SOL.
2. Sealed Seed (commit)
The instant the match is made, the server generates a cryptographically random 32-byte seed and stores it privately. It immediately publishes a public commitment:flip_seed_hash = SHA-256(seed)This hash is recorded on the game row before the flip happens. Because SHA-256 is one-way, nobody — not even the operator — can change the outcome without breaking the hash. It's a commit-reveal scheme: commit first, reveal after.
3. Deterministic Flip
The winning side is derived purely from the sealed seed plus the two wallet addresses and buy-in amount (lamports) — no clock, no randomness, no operator input:
sortedAddrs = sort([player1, player2]).join("|")
domain      = sortedAddrs + "|" + buy_in_lamports
digest      = SHA-256(seed_bytes ++ domain_bytes)
parity      = XOR of all 32 bytes of digest
winner_side = parity & 1 == 0 ? "heads" : "tails"
Same inputs → always the same winner. Anyone with the seed and the public game data can replay the math and get the identical result.
4. Reveal & Payout
After the flip, the seed is revealed via the public game record. You can hash it and confirm it matches flip_seed_hash. The winner gets ~98% of the pot paid directly from the escrow on-chain (visible as payout_signature on the game). The 2% fee funds the site. If something goes wrong and the flip can't complete, a refund signature is recorded instead.
5. Why this is fair
  • Seed is committed (hashed) before the result is known.
  • Outcome math is pure SHA-256 — no hidden inputs.
  • Both deposits verified on-chain before the flip runs.
  • Payouts happen on-chain; signatures are public.
  • You can paste any past game's seed into the Verify tab to prove it.