RUGS.FUN
Browser gambling SPA. Full generatePrices() algorithm recovered from 49 chunks, 14+ game modes mapped, 17-event standard-game socket surface, operator economics + revenue model, 10 attack vectors + 8 commit-reveal bypasses, and a step-by-step operator playbook.
One-page summary
rugs.fun ships a React SPA whose provablyFair machinery is completely client-visible. The generatePrices(serverSeed, roundId, externalHash?) function — the entire Rug Pull RNG — lives in generatePrices-Cb6Po-5f.js, 16 LoC after unminify. Every tuning constant is exposed: RUG_PROB=0.005, RUG_IMPACT=0.98, GOD_CANDLE_CHANCE=1e-5. The server broadcasts a 17-event socket surface including shortLiquidation, sidebetResult, rugpoolDrawing, and rugpoolWin — confirming long + short + sidebet + jackpot markets. The commit-reveal fairness scheme is NOT anchored on-chain; it lives in server WebSocket frames alone. 10 attack vectors + 8 commit-reveal bypasses are catalogued, with a 6-strategy operator playbook ranging from legitimate god-candle EV farming to the ambiguous recovered-seed short.
All sections
Interactive drag-around react-flow graph: CDN → React SPA → socket.io → Game Server → provably-fair chain → Solana wallet infra.
generatePrices() recovered, all tuning constants, 3 seed derivation branches including UUID-v7 shortcut.
14 primary modes + extras (rugRoyale, flipflop, pinpointparty, xp_race, etc).
17 socket channels on standard game alone (trades, shorts, sidebets, rugpool).
House-edge model, bet-tier structure, crate tiers with SOL ranges, leverage + max-win-chance filtering.
Dev revenue estimation, user-loss aggregate, cost side, hot-wallet exposure.
10 vectors — serverSeed replay, UUID-v7 collision, backendUrl override, Alea PRNG state recovery, more.
8 bypasses — CRITICAL: no on-chain anchor; HIGH: adaptive seed selection, HMAC-optional, operator early-reveal.
Backend URLs leaked, hot-wallet endpoint, DEV_ localStorage flags, referral API-key program, maintenance admin.
6 actionable strategies — god-candle farming, rakeback-crate EV cycling, sidebet-skew hunting, verification pipeline.
