Skip to content

CHAN — Opt-In Security

One-line pitch: CHAN is the "which apps can touch my bank" switch. Nothing pulls from your YUE unless you've flipped the switch on for it.

What this is

CHAN is the player channel manager. It keeps two critical mappings:

  • Yan — a directory: wallet address → YUE address. This is how any contract discovers "what YUE does this wallet own?"
  • _optInList — per-YUE, per-spender-contract permission. You opt a contract in before it can move your funds; you opt out to shut it off.

Every transfer out of your YUE goes through this permission check. If the spender isn't opted in, the transfer reverts. That's your safety net.

If you've played a web3 game before

  • Closest analogy: a per-contract token allowance — like approving a DEX router to spend your USDC, except tracked by CHAN on your behalf.
  • Or: the connected apps / connected wallets list in MetaMask — revokable, granular, explicit.
  • Or: Discord's per-server notification settings — each relationship is opt-in separately.
Dysnomia term What it maps to
Yan Directory of wallet → YUE address
Opt-in Permission grant for a specific spender contract
NewSpenderContractOptIn Event emitted every time you flip a permission
Xie The XIE power contract, which CHAN calls into for reward math

What you actually do with it

  • Check your YUE addressCHAN.Yan[yourWallet] returns your YUE (or zero if you haven't onboarded).
  • Opt a contract in / out — grant / revoke permission for a specific contract to pull from your YUE.
  • Read your opt-in list — see which spenders currently have access.
  • Transfer your YUE to a new wallet — CHAN exposes a path to reassign the directory entry if you move wallets.

Rewards / costs

  • Cost: gas on every opt-in flip and wallet move. No protocol fee.
  • Reward: none — CHAN is a safety layer, not a payout.

Requirements & gating

  • You need to have onboarded via SEI. Without a YUE, CHAN has nothing to manage for you.
  • Only you (through your wallet or LAU owner role) can flip your own opt-ins.

Where it connects

CHAN sits between your YUE and every contract that wants to move funds into or out of it. CHOA, WAR, WORLD, QING, CHEON — they all check in with CHAN before touching your bank.

Quick FAQ

Q: What's the default — opt-in or opt-out for new contracts? A: Opt-out. Newly deployed contracts have no access to your YUE until you explicitly opt them in.

Q: If I opt-in, does that let the contract take ALL my funds? A: It grants permission, not a specific amount. The contract can only do what its own code allows (CHEON can mint rewards; WAR can collect battle stakes; etc.). You're trusting the specific contract, not granting a blank check.

Q: Can I revoke later? A: Yes, at any time. Flip the opt-in back off and the contract immediately loses access.

Q: If I move wallets, does my YUE come with me? A: Yes — you reassign CHAN's directory entry to point at your new wallet. Your YUE and everything in it comes along.

Q: Why the name "CHAN"? A: In the game's vocabulary, CHAN is a "channel" in the communications sense — it's the named pipe between your wallet and your bank.


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