Skip to content

CHOA — Gameplay Controller

One-line pitch: CHOA is the contract you actually interact with when you play or chat. Two verbs, one contract.

What this is

CHOA is the top-level gameplay API. Two headline functions:

  • Play(YourLAUAddress) — registers you as an active player, sets up your YUE, first-time players get an initial YUE token mint.
  • Chat(QingAddress, "your message") — sends a message into a QING and (if you hold that venue's token) pays you MAI rewards.

There's also Yuan(Currency) — a view function that returns your weighted holdings in a given token across wallet + LAU + YUE combined. This is the Yuan number that ZI uses to spin up your power.

If you're picking one contract to point a frontend button at, it's CHOA.

If you've played a web3 game before

  • Closest analogy: a game-client dispatcher — every player action flows through here.
  • Or: the router contract in DeFi (Uniswap's Router) — the user-facing simplifier on top of the actual mechanics.
  • Or: the PlayerController in a Unity game — input handler that talks to all the subsystems.
Dysnomia term What it maps to
CHOA The play/chat controller
Play() Onboarding/activation call
Chat() Send a message; earn MAI if eligible
Yuan(Currency) Your total weighted balance of a token across all buckets

What you actually do with it

  • First login: call Play(YourLAU) once. It sets up YUE, gives you a starter mint, marks you active.
  • Chat: call Chat(QingAddress, "gm") when you want to message at a venue. Returns the Charge of that chat (your power at that moment).
  • Check Yuan: read-only view to see "what's my weighted holdings in X token right now?"
  • You'll call CHOA constantly if you're an active player. It's the main UI contract.

Rewards / costs

  • Cost: gas per call. Chat has no extra fee beyond any cover charge the QING itself requires.
  • Reward: MAI rewards on chat (up to 1 venue-token per message), initial YUE starter mint on your first Play().

Requirements & gating

  • Play(): you need a LAU to pass in.
  • Chat(): you need to be admitted at the QING (passes QING's own gating rules, which may include token holdings or guest-list entries).

Where it connects

Sits on top of SEI (session state) and YUE (your bank). Drives QING.Chat. Feeds ZI via Yuan. Initializes a new player's on-chain life.

Quick FAQ

Q: Do I have to call Play() every session? A: No — once, ever. It's the "create character & initialize" call.

Q: What's the relationship between CHOA.Chat and QING.Chat? A: CHOA.Chat wraps QING.Chat and handles the reward accounting (MAI mint) and Yuan effects. Always go through CHOA.

Q: What counts as "weighted holdings" in Yuan? A: Your wallet balance, your LAU balance, and your YUE balance in that currency — summed with appropriate weights.

Q: Can a different contract call Chat on my behalf? A: Depends on approvals. Normally you call it from your own wallet.


Want the Solidity? The contract reference lives at technical/docs/domain/sky/CHOA.md.