Events + DB Mapping
HISTORICAL - describes the abandoned tournament / forecast-AMM design
This page documents the pre-migration architecture (TournamentManager,
matchday-gated trading, on-chain ForecastMarket AMM). None of it exists in the
current system: tournaments were replaced by instant 1v1 prestige-ladder
battles, prediction markets are off-chain parimutuel in non-redeemable in-game
currency, and the contract suite is Charter v2 + the Uniswap v4 venue. For
current rules see the Platform Rules page; for current architecture see the
repo's docs/architecture/ and my-dapp-contracts/docs/ARCHITECTURE.md.
This mapping shows how on-chain events (including forecasting) are normalized into relational tables for query performance.
- On-chain events remain the canonical truth; Postgres tables are indexed projections.
APIandWorkerare the only Postgres writers.- Forecasting data is first-class: market creation, share trades, resolution, and redemptions are indexed separately.
- Indexers should be idempotent and re-org aware, and state changes should be append-only for auditability.