Predictu
Getting Started

Predictu Casino Integration

Predictu Casino Integration is a white-label prediction market engine purpose-built for casino operators. It takes real-time prediction markets from Polymarket, wraps them in a casino-grade trading UI, applies dynamic spread pricing and 5-wall risk management, and delivers the entire experience as an embeddable iframe that can be dropped into any operator site in under an hour.

One platform, four deployable services. Predictu ships as a set of independently deployable Next.js applications that share a single Supabase backend. Casino operators interact with the iframe app; Predictu staff manage everything through God Mode; individual operators self-serve through their own dashboard.

What It Does

Predictu lets casino operators add a full prediction market product to their existing site without building any trading infrastructure. Players browse live event markets (elections, sports outcomes, financial milestones, pop culture), buy and sell shares at spread-adjusted prices, and receive automatic settlement payouts when markets resolve.

The platform handles every aspect of the trading lifecycle:

  • Market sourcing - live prediction markets pulled from Polymarket, filtered through the Market Selection Engine for tradeability (minimum liquidity, price range, category restrictions).
  • Pricing - the Spread Engine calculates ask/bid prices with dynamic spreads that widen for extreme prices, low liquidity, high exposure imbalance, and sharp bettors.
  • Risk management - the Risk Engine enforces 5 walls of defence: per-trade limits, per-market exposure caps, per-category caps, global exposure caps, and circuit breakers (daily loss halt, emergency halt).
  • Execution - the Trade Executor validates, prices, debits, records, and settles every trade atomically with compensating rollback on failure.
  • Settlement - the Resolution Engine detects market resolution, calculates payouts ($1 per winning share), credits winners, notifies losers, and records full settlement audit trails.
  • Wallet integration - the Wallet Adapter routes all balance operations through S2S (server-to-server) callbacks to the operator’s wallet server. The casino operator is the house and owns all player balances - Predictu never holds player deposits or pays winnings from its own capital.
  • Player scoring - the User Scoring Engine classifies bettors on a 0–100 composite score across win rate, edge captured, timing, sizing, and diversification - automatically restricting professional-tier sharps.

Key Capabilities

Prediction Market Embedding

The iframe app renders a complete prediction market trading experience - market discovery, event pages, trading tickets, portfolio management, and position tracking - all within a sandboxed <iframe>. The parent casino shell communicates via a structured PostMessage protocol for initialization, balance sync, deposit/withdraw commands, trade notifications, and navigation events.

Server-to-Server Integration

Predictu’s S2S protocol sends JWT-signed POST callbacks to the operator’s registered callback URL for every balance-affecting event: BET_MAKE, BET_WIN, BET_LOST, BET_SELL, BET_REFUND, BET_ROLLBACK, and BALANCE checks. All monetary amounts are in subunits (cents), all requests carry an idempotency key, and failed deliveries retry with exponential backoff.

Risk Management

The 5-wall defence system protects the house at every level:

  1. Wall 1 - Per-trade limits: max trade size, daily volume, per-market spend, max open positions - all configurable per user tier (new, regular, VIP, restricted).
  2. Wall 2 - Per-market exposure caps: halt new buys when a single market's max potential loss exceeds the configured threshold.
  3. Wall 3 - Per-category exposure caps: prevent excessive concentration in any one market category.
  4. Wall 4 - Global exposure cap: hard ceiling on total platform-wide maximum loss.
  5. Wall 5 - Circuit breakers: daily loss halt (automatic) and emergency halt (manual kill switch).

Operator Dashboards

God Mode gives Predictu staff complete visibility and control: onboard new operators, monitor global exposure in real time, review risk events, manage user tiers and scoring thresholds, toggle circuit breakers, and track cross-operator revenue.

The Operator Dashboard gives each casino operator a scoped view of their own integration: configure branding (17 color tokens + logos), manage embed origin whitelist, set up S2S callback credentials, view their players and trades, track revenue and invoicing, and monitor risk events specific to their player base.

Operator Branding

Every visual element of the iframe app is themeable through the OperatorBranding interface - 17 HSL color tokens (primary, accent, background, card, border, input, muted, button-yes, button-no, and more), 3 image URLs (logo, banner, favicon), and a border radius value. The BrandingInjector component converts these tokens to CSS custom properties and injects them on <html>, so the entire UI repaints instantly when branding changes.

Target Audience

Predictu Casino Integration is designed for casino operators who want to add prediction markets as a new product vertical without building trading infrastructure from scratch. The integration model is deliberately similar to how operators integrate sportsbook or slot providers: embed an iframe, wire up wallet callbacks, apply your brand, and go live.

The platform serves three distinct user personas:

  • Casino operators - integrate via iframe + S2S, self-serve branding and config through the Operator Dashboard.
  • Casino players - interact with the embedded trading UI inside the operator's site, never leaving the casino experience.
  • Predictu staff - manage the entire platform through God Mode, onboarding operators and monitoring risk across all integrations.

What Makes It Unique

Prediction markets meet casino infrastructure. Predictu is the only platform that combines real-time Polymarket event data with casino-grade risk management, per-operator branding, and a Betby-style S2S wallet integration protocol.

  • Real markets, casino economics: prices derive from Polymarket's deep liquidity pools, but the Spread Engine adds a house edge via dynamic spreads (1–15%), making the product economically viable for operators.
  • No blockchain for players: end-users never interact with wallets, gas fees, or on-chain transactions. The casino handles deposits/withdrawals through its existing payment stack.
  • Operator isolation: every data query is scoped by operator_id. Row-Level Security policies in Supabase ensure one operator can never see another's players, trades, or revenue.
  • Pluggable wallet layer: the Wallet Adapter pattern cleanly separates trading logic from wallet implementation. All operators integrate via S2S callbacks - the operator is the house and owns all player balances. The adapter interface means the trading engine never needs to know the details of the operator’s wallet system.
  • Automated sharp detection: the User Scoring Engine runs daily, computing a composite score across 5 dimensions. Players crossing the professional threshold are auto-restricted to tighter limits and wider spreads - protecting house edge without manual intervention.

Next Steps

1
Understand the architecture. Read the Architecture page to see how the four services, eight engines, and shared Supabase backend fit together.
2
Run the Quick Start. Follow the Quick Start guide to embed the prediction market iframe into a test page in 5 steps.
3
Deep-dive into integration. Explore the Iframe Embedding, PostMessage Bridge, and Operator Branding guides for complete integration documentation.