Domain Model: Twitch 2K Wager
Domain Model: Twitch 2K Wager
Diagram
Components
| Component | Purpose | Notes |
|---|---|---|
| Challenger | A Twitch viewer who wants to play Marcus | Identity from Twitch OAuth via Keycloak. stripe_connect_account_id populated on first win (deferred onboarding). |
| Game | A single wager match between challenger and Marcus | Tiered buy-ins: $15, $30, $45. Pot is always 2x buy-in (house matches). |
| Payment | Stripe Checkout payment for the buy-in | 1:1 with Game. All amounts in cents. Stripe is source of truth for payment status. |
| Payout | Stripe Connect transfer to winning challenger | Status "onboarding" = waiting for challenger to complete Connect Express. Once onboarded, transfer executes automatically. |
| RevenueSplit | Tracks 50/50 split when Marcus wins | Internal DB accounting only. No Stripe Connect needed for Marcus/Lucas split. |
Key Decisions
- Stripe Connect Express with deferred onboarding — challengers don't KYC until they win. Motivation is high (money waiting). Repeat winners are already onboarded.
- No wallet model — single-game transactions via Stripe Checkout. Simpler than deposit/withdraw. Can add wallet later if volume demands.
- Tiered buy-ins ($15/$30/$45) — challenger picks their wager. Pot is always double. House matches.
- No local auth — Twitch OAuth via Keycloak only.
- Amounts in cents — Stripe convention.
- RevenueSplit is DB-only — no Stripe Connect for Marcus/Lucas. Internal accounting.
Related
- arch-dataflow-twitch-2k-wager — runtime flows
- arch-deployment-twitch-2k-wager — where it runs
- project-twitch-2k-wager — project page