# Arena demonstration candidate

> Current status reviewed September 29, 2026. See [the release index](README.md) for shipped versus planned features, network, wallet signing and deployment boundaries. Older dated experiments below are retained as history.

This work targets the local Web3 Orb. It does not deploy the site, update desktop
installers, change production Orbita, or redeploy any game contract.

## Main journey

Open `/?view=arena` and choose **Community league**.

1. Connect Privy and select/setup the embedded Orb Wallet. The three-step guide
   shows wallet, community and round entry. Test MON pays for wallet transactions;
   the UI shows the exact wallet address and links to the Monad testnet faucet.
2. A community owner registers the community once. Another registered community
   can be selected as the opponent. Use **Refresh communities** to discover a
   recently registered opponent without reloading the application.
3. Create a round and copy its invite. The link explicitly selects Community
   league and removes incompatible practice/sprint parameters. Each player joins
   their community's team. The roster shows team sizes and the player's own team.
4. Optionally fund the prize before the host starts. Teams must be equal and have
   at least one player each. Enable quick play once per player/round: that scoped,
   in-memory session can sign moves, not transfers or reward claims. The relay
   pays for supported moves; admission and session setup still need wallet gas.
5. Play. Both browsers read confirmed state directly from the RPC. The contract
   enforces game rules. A local countdown reaching zero does not establish the
   winner: the UI waits for a confirmed block after the round's end.
6. The result opens the sponsored reward panel. Eligible winning players may
   separately claim the NFT trophy and their funded reward. A 1% claim fee is
   disclosed before sponsorship. No reward is invented when there is no sponsor.
7. A winning member who made at least one move can add the result to Passport.
   Orb independently reads the finished round from the deployed contract and
   checks the member's bound wallet and community before recording a single
   `league-win` event. The Passport proof appears only after the next epoch is
   anchored; the event is not itself the onchain game's result.

The public community league keeps its already deployed v2 rules. New local practice
uses Control v4; separate v4 contracts have also passed the two-wallet local journey
(`node scripts/test-arena-control-journey.mjs`). They are not publicly deployed in this
review. Old practice v3 saves retain their rules. The permissionless registry at `/independent` is a separate
contract and must not be described as the league's admission system. League entry
still uses Orb membership attestations; its gameplay and rewards are onchain.

## Repeatable validation

Run from the repository root:

```text
npm run arena:test:journey
npm run arena:test:community
node scripts/test-arena-rules.mjs
npx tsc --noEmit
npm run build
```

The journey runner needs Playwright and an Edge installation. It accepts
`ORBITA_PLAYWRIGHT_PATH` for an existing Playwright package and
`ORBITA_BROWSER_CHANNEL` to override `msedge`.

It compiles the real UI and deploys real contracts to a disposable local EVM with
chain ID 10143. Two isolated browser contexts use distinct fixture wallets. Privy
authentication and membership attestations are local adapters. It exercises
registration, entry, prefunding, session authorization, moves, cross-client board
updates, the final result, NFT and reward claims. It checks exact winner/fee balance
changes and mobile layouts. Evidence is saved under `work/arena-journey/`.

**These local timings are not a Monad speed/TPS benchmark.** No real user's
wallet, secret, balance or public-network transaction is used by this runner.

## Before a hackathon submission

- Rehearse the same journey on the public testnet with two real Privy sessions,
  then with friends on different devices. Confirm session approval prompts,
  reconnect behavior, RPC reliability and sponsor balance.
- Record median/p95 action-to-receipt latency, failures and gas from that rehearsal.
  Label test population and environment; do not claim app throughput of 10k TPS.
- Ask first-time players to explain the objective and play a second round. Use
  their feedback to prioritize gameplay/UI fixes over additional feature tabs.
- Produce a short English demo showing joining, competition, receipt and reward.
  Link to contract addresses and the independent read-only result viewer.
- Recheck the official submission rules and eligibility. No prize is guaranteed.

Permanent IPFS pinning is not configured. The assistant now uses the configured
free OpenRouter route, whose availability must be checked before a demo. No paid
fallback is enabled. Neither is a dependency of the Arena demonstration.
