Flutter Web App
The Arenaton Flutter app is the user-facing exchange client for production web, paper web, and later Android releases. It should present the same Market, Outcome Share, Collateral, account, and safety language as the public docs.
Current App Responsibilities
Section titled “Current App Responsibilities”| Area | Responsibility |
|---|---|
| Market browse | Show production or paper Markets with clear environment labeling. |
| Market detail | Show rules, resolution source, order book, trades, and Live State Version. |
| Order entry | Sign EIP-712 orders with Smart Account or Raw EOA Mode. |
| Paper Trading | Claim PaperUSDC, place paper orders, watch settlement, resolve, and redeem. |
| Portfolio | Show confirmed positions, pending fills, fills, orders, and redeemable Markets. |
| Wallet/account | Support user-controlled accounts and explicit signing modes. |
| Localization | Use reviewed locale files for supported languages. |
Public App Surfaces
Section titled “Public App Surfaces”| Environment | Chain | Public host | Registry |
|---|---|---|---|
paper | Polygon Amoy 80002 | https://paper.arenaton.com | /api/paper/contract-registry |
production | Polygon PoS 137 | https://app.arenaton.com | /api/contract-registry |
Production builds must refuse Amoy signing. Paper builds must refuse Polygon mainnet signing.
Paper Trading Data Flow
Section titled “Paper Trading Data Flow”Flutter paper app -> GET /api/paper/markets -> POST /api/paper/faucet/claim -> sign EIP-712 ArenatonOrder -> POST /api/paper/orders -> WS /api/paper/ws -> portfolio and redemption viewsExpected paper WebSocket event families:
paper_market_bookpaper_matched_pending_fillpaper_settlement_confirmedpaper_account_positionspaper_market_lifecyclepaper_redemption_confirmedpaper_market_live_statepaper_statusSigning
Section titled “Signing”Flutter order signing must stay byte-compatible with Go validation and settlement-contract verification.
Read EIP-712 Order Format for the typed data fields. The app should always populate:
- chain ID from the selected registry,
- verifying contract from the selected registry,
- collateral token from the Market,
- current Live State Version from the Market detail response,
- account mode as Smart Account or Raw EOA Mode.
UI Safety Requirements
Section titled “UI Safety Requirements”- Show the selected environment in paper builds.
- Never label PaperUSDC as real USDC.
- Show pending fills separately from confirmed Outcome Shares.
- Show redeemable Markets only after final resolution.
- Preserve direct redemption paths where rules permit.
- Keep risk copy visible: prediction markets involve risk of loss and may not be available everywhere.
Localization
Section titled “Localization”New copy should go through Flutter localization files instead of hard-coded English strings. Priority languages include English, Spanish, Portuguese, French, German, Italian, Japanese, Korean, Chinese, Arabic, Hindi, Indonesian, Turkish, Vietnamese, Thai, Filipino, Polish, Dutch, and Russian.