Architecture
Product Shape
Section titled “Product Shape”Arenaton is a Polygon-only, non-custodial prediction market exchange for sports, esports, and crypto markets.
New Markets are not new Solidity deployments. Arenaton deploys contracts per environment, then prepares Gnosis Conditional Tokens Framework conditions for individual Markets. See Contracts for the deployment and CTF model.
Service Boundaries
Section titled “Service Boundaries”pulse-server: public API, auth/session, market data, portfolio, admin API, geo/risk gates
orderbook-service: signed order intake, matching, cancellation, Live State Version checks
settlement-worker: primary CTF split settlement, resale share-transfer settlement, retries, failed fill handling
chain-indexer: Polygon log indexing, position-delta aggregation, reorg handling, PostgreSQL projections
resolver-worker: sports/esports/crypto data ingestion, close events, outcome proposals
paymaster-adapter: USDC gas estimates, Pimlico/Alchemy abstraction, spend caps
ctf-market-service: Polymarket CLOB API client, Gnosis CTF market browsing, price feedsAccount Model
Section titled “Account Model”Reown embedded/social wallet or external EOA controlsSafe Smart Account holdsUSDC + Outcome Shares submitsERC-4337 UserOperation viaPaymasterRaw EOA Mode trades directly from an externally owned account and remains an advanced path.
CTF Market Model
Section titled “CTF Market Model”Arenaton uses Gnosis CTF concepts for outcome tokenization. The production and paper registries decide which deployed contracts are active for each environment.
External CTF market data can support browsing and research, but it is not Arenaton settlement configuration. See Gnosis CTF Model for condition, position ID, primary split, resale, and redemption mechanics.
Data Separation
Section titled “Data Separation”| Data area | Production | Paper |
|---|---|---|
| Chain | Polygon PoS | Polygon Amoy |
| Collateral | Polygon USDC | PaperUSDC |
| Order book | Production order book | Paper order book |
| Database | Production schema/database | Paper schema/database |
| App surface | Production app | Paper app |
Paper state must never appear in production portfolios, and production builds must never sign Amoy orders.
CTF Paper Mode
Section titled “CTF Paper Mode”Paper mode exists to prove the same exchange spine without real value:
PaperUSDC faucet -> signed EIP-712 orders -> paper order book and WebSocket events -> CTF settlement contract -> indexer projection -> lifecycle resolution -> direct redemptionThe first binary fill can be a complementary buy YES / buy NO match. That path splits Collateral into CTF Outcome Shares. Later resale of an existing Outcome Share uses same-outcome buy/sell matching. Both paths emit position-delta events that the indexer aggregates into portfolio state.