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
Section titled “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
Section titled “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
Section titled “What you actually do with it”- Check your YUE address —
CHAN.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.
Use these calls here. Simulations preview the current state; each confirmed call is a separate transaction.
0xe250bf9729076B14A8399794B61C72d0F4AeFcd8CHAN.Yan(address)Read
Open this function to load its call form.
CHAN.OptedIn(address Yue, address Contract)Read
Open this function to load its call form.
CHAN.OptIn(address Contract, bool Allow)Simulate / call
Open this function to load its call form.
CHAN.TransferYue(address Yue, address NewOrigin)Simulate / call
Open this function to load its call form.
Rewards / costs
Section titled “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
Section titled “Requirements & gating”- You need to have onboarded via SEI. Without a YUE, CHAN has nothing to manage for you.
OptInselects the YUE registered totx.origin. The signing wallet must already have a YUE inYan; LAU ownership is a separate role.
Where it connects
Section titled “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
Section titled “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: TransferYue can move the directory entry when the signing wallet matches the YUE’s current Origin and the destination wallet does not already have a YUE. The call updates the YUE’s Origin; it does not add the new wallet as a MultiOwnable owner.
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.