Architecture of the citadel
Overview
Arx is Latin for citadel: the fortified high ground from which a city is commanded. Key is the instrument of access. Arx Key is the non-custodial execution layer for Fan Tokens on Chiliz Chain (chain id 88888). Users and operators deploy agents that trade, stake and vote around matches and on-chain signals, under hard limits they set, without ever handing over custody.
It sits between the intelligence layer (FanTokenIntel, match data, on-chain flows, Kayen liquidity) and on-chain execution. It does not try to replace the data layer and it is not a custodial bot.
Agent architecture
Every agent runs under an owner account + session key model:
- Owner account. A Safe (Gnosis Safe 1.4.1, deployed on Chiliz) owned by the user. Funds live here. The user is the only signer.
- Arx Session Module. A Safe module the owner enables once. It is the only path an agent has into the account, and it enforces the Charter on every call: expiry, per-day and total spend caps, token allowlist, contract allowlist, function-selector allowlist, slippage and minimum pool depth guards.
- Session key. An ordinary key held by the agent runner. It can do nothing except call the module with a Charter id and a proposed action. The module checks, then executes through the Safe. The session key pays its own gas in CHZ.
- Revoke. The owner disables the module or the Charter in one transaction. There is no delay and no counterparty.
Why Safe modules rather than a bespoke vault: the Safe singleton and proxy factory are already deployed and battle-tested on Chiliz; the owner keeps standard Safe tooling; and the module boundary is small enough to audit. ERC-4337 EntryPoint v0.7 is also deployed on Chiliz, which lets Phase 2 add gas sponsorship and batched user operations without changing the security model.
The Agent Charter
A Charter is an EIP-712 typed message signed by the owner's wallet. In v0.1 it is signed off-chain (zero gas) and stored by the user; in Phase 1 the same structure is registered with the module. Fields:
| Field | Type | Meaning |
|---|---|---|
| agent | string | Human name for the agent. |
| strategy | string | Template id (match-momentum, post-loss-dip, stake-and-hold, calendar-rebalance, governance-voter) or an operator strategy id. |
| owner | address | The account that signed and that funds the agent. |
| dailySpendCapWei / totalSpendCapWei | uint256 | Maximum CHZ-equivalent the agent may spend per rolling day and in total. |
| allowedTokens | address[] | Fan Token V2 contracts (and wCHZ) the agent may hold or trade. |
| allowedContracts | address[] | Venues: Kayen Router, Kayen MasterRouter V2, staking and governance contracts. Nothing else is callable. |
| allowedActions | string | swap, stake, unstake, vote, plus guards: maxSlippagePct, minPoolDepthUsd. |
| expiry | uint256 | Unix timestamp after which the Charter is dead. |
| nonce | uint256 | Uniqueness; also lets the owner invalidate by nonce. |
Domain: name "Arx Key", version "0.1", chainId 88888. The exact typed data is visible in the app under "Preview typed data".
Session Module: enforcement rules
- Reject if
block.timestamp > expiryor the Charter is revoked. - Reject if the target contract is not in
allowedContracts, or the function selector is not whitelisted for that contract (for Kayen: exact-input swap functions only; no approvals to unknown spenders, no raw transfers). - Reject if any token in the path is not in
allowedTokens(plus wCHZ / CHZ). - Reject if the CHZ-equivalent spend would exceed the rolling daily cap or the total cap.
- Reject if quoted output implies slippage above
maxSlippagePctor the pool's depth is belowminPoolDepthUsd, both measured on-chain at execution time. - Rate limit per Charter (actions per hour) and a global circuit breaker the owner can trip.
- Emit an event for every accepted and rejected action: the audit trail.
The agent runner (off-chain, any language, any model) can be arbitrarily clever. It cannot be arbitrarily dangerous: the module does not trust it.
Intelligence layer
Agents consume FanTokenIntel over MCP (25 tools, about 70 Chiliz fan tokens): realtime prices with freshness flags, CEX whale flow, DEX depth and slippage curves, match-impact history, goal and red-card reaction profiles, prediction-market odds, capital rotation, validator lists. The public tier works without a key; a free key unlocks the rest. Arx Key proxies the public tools through a cached endpoint so the site never exposes a key and stays inside free infrastructure limits.
On-chain truth is read directly from Chiliz Chain: balances, Kayen pair reserves, CHZ/USD from the Kayen USDC pool. Agents see the venue before they are allowed to act in it.
CHZ-only payments
All platform fees settle in CHZ on Chiliz Chain: Pro subscriptions, operator strategy fees (performance share or fixed subscription), pay-per-action for premium signals, and the platform cut. Settlement goes through a simple split contract: operator share and platform share in one transaction, fully on-chain. Gas is always paid by the user's own session key in CHZ. USDC is not required for any core flow in this phase.
Contract registry (verified 16 Oct 2026)
| Component | Address / endpoint | Check |
|---|---|---|
| Chiliz Chain | 88888 · rpc.ankr.com/chiliz · chiliz-rpc.publicnode.com · rpc.chiliz.com | eth_chainId = 0x15b38 |
| Chiliz Spicy testnet | 88882 · spicy-rpc.chiliz.com | eth_chainId = 0x15b32 |
| PSG V2 | 0xfe1d4a935df7a4a52f835f6104c97af9d72217f2 | symbol PSG · 18 dec · supply 19.4M |
| BAR V2 | 0x1589248b4b61ed472cc21ca1f2114d93ab6910d5 | symbol BAR · 18 dec · supply 39.5M |
| CITY V2 | 0x7bd6242d775faef1d50b2aa18c2fbf329bddf295 | symbol CITY · 18 dec · supply 19.4M |
| JUV V2 | 0xeaf368dadc22524def47e8a1c26bfc17ac16e6f5 | symbol JUV · 18 dec · supply 19.7M |
| wCHZ | 0x677F7e16C7Dd57be1D4C8aD1244883214953DC47 | symbol wCHZ · 18 dec |
| USDC | 0xa37936f56249965d407e39347528a1a91eb1cbef | 6 dec · Kayen USDC/wCHZ pool 0xff6d…07a5 |
| Kayen Factory | 0xE2918AA38088878546c1A18F2F9b1BC83297fdD3 | bytecode · allPairsLength 441 |
| Kayen Router | 0x1918EbB39492C8b98865c5E53219c3f1AE79e76F | bytecode present |
| Kayen MasterRouter V1 / V2 | 0x3CF353307b4e753AC1611820e47c07893B001E0f · 0x296c39985Fa3eB3B1D76C95245e8Ed44dA4348CF | bytecode present (docs list both) |
| ChilizWrapperFactory | 0xAEdcF2bf41891777c5F638A098bbdE1eDBa7B264 | bytecode present (legacy 0-decimal wrapping) |
| EntryPoint v0.7 | 0x0000000071727De22E5E9d8BAf0edAc6f37da032 | bytecode present (v0.6 and v0.8 absent) |
| Safe 1.4.1 proxy factory / L2 singleton | 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67 · 0x29fcB43b46531BcA003ddC8FCB67FFE91900C762 | bytecode present |
| Multicall3 | 0xcA11bde05977b3631167028862bE2a173976CA11 | bytecode present |
| FanTokenIntel MCP | https://mcp-production-f681.up.railway.app/mcp | initialize OK · tokenintel v1.26 · 25 tools |
Liquidity reality check: on 16 Oct 2026 the Kayen V2 pools for PSG/wCHZ and BAR/wCHZ held only a few dollars of depth; the deepest Chiliz pools were PEPPER/wCHZ, SPAIN/wCHZ and USDC/wCHZ (about $100k–$165k each). Most Fan Token volume is on centralized venues. This is why the Charter carries slippage and minimum-depth guards, and why deeper on-chain venues are a Phase 1 priority with the ecosystem.
Phase 1 is live on Chiliz Spicy (testnet)
The execution layer exists on-chain. On Spicy (chain id 88882) you can create a Safe with the Arx Session Module enabled, fund it, register a Charter, and let a session-key agent stake CHZ to validators, provide token/wCHZ liquidity on Kayen, or swap through wCHZ with on-chain slippage and depth guards, strictly inside that Charter. Three strategy presets ship in the app: stake-and-hold, liquidity seed, match momentum. A live stake-and-hold agent has been running on Arx Key infrastructure since 16 Oct 2026.
| Contract (Spicy 88882) | Address |
|---|---|
| ArxSessionModule v1.1.0 (staking + liquidity + guarded swaps) | 0xD6C278682B1c25071E2593A7F7fBF0bAFf76b4E0 |
| ArxSessionModule v1.0.0 (staking only, still serving Charter #0 of the first demo Safe) | 0x0219a4Af72C9af7810ef8D739e34792C1F34A029 |
| ArxStrategyRegistry (Phase 2) | 0x84e10FBcf5229c496d92A75c8762DB28E5245892 |
| Kayen Spicy router / factory / wCHZ | 0xb82b0e988a1FcA39602c5079382D360C870b44c8 · 0xfc1924E20d64AD4daA3A4947b4bAE6cDE77d2dBC · 0x678c34581db0a7808d0aC669d7025f1408C9a3C6 |
| Demo token with a deep Spicy pool (WtestBAR / wCHZ) | 0x8B1f28e8D0e087AAED94a73F23B7098F0973bAC9 · pool 0x89E6277c6192BdaB2a7A28d3854D49b9fA44C024 |
| ArxSafeSetup | 0x87da25b4712d76874aC5b30d865C64c3d434A497 |
| Safe 1.4.1 proxy factory / L2 singleton / fallback | 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67 · 0x29fcB43b46531BcA003ddC8FCB67FFE91900C762 · 0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99 |
| Chiliz staking (system) | 0x0000000000000000000000000000000000001000 · delegate / undelegate / claimDelegatorFee / claimPendingUndelegates |
| Chain config (system) | 0x0000000000000000000000000000000000007003 · min stake 0.1 CHZ on Spicy, 0.01 on mainnet |
How the agent is boxed in. The session key can call exactly one function: ArxSessionModule.execute(safe, charterId, target, value, data). The module then checks, in order: Charter exists and caller is its session key; Safe not paused; Charter not revoked; not expired; module still enabled on the Safe; calldata is a real function call (raw CHZ sends are impossible); (target, selector) is allowlisted; for staking calls the validator argument is an allowlisted counterparty; the CHZ value fits the remaining daily and total caps (24-hour windows anchored at first spend); the hourly rate limit is not exceeded. Only then does the Safe execute the call, and an Executed event is written. transfer and transferFrom can never be allowlisted; approve is only possible on an allowlisted token towards an allowlisted spender. Calls to the Safe itself or to the module are rejected at Charter creation.
Using it today. 1) Get Spicy CHZ from the faucet. 2) In the Citadel: Create Safe → Fund Safe → run node agent/index.js keygen locally and paste the session key address → Register Charter. 3) Download the runner config from the Charter card and run node agent/index.js run. Revoke or Pause from the app at any time; the runner goes idle immediately. 15 fork tests cover caps, windows, rate limit, revoke, pause, expiry and every allowlist.
Source lives in the arxkey repository under contracts/ (Foundry, solc 0.8.24, EVM target Paris because Chiliz Chain does not support PUSH0) and agent/ (Node + viem). Mainnet deployment follows an audit of the module.
Arx Key MCP server (live, free)
Agents, operators and researchers can query the Chiliz ecosystem through one Model Context Protocol endpoint. Streamable HTTP, stateless, no key, read-only. Add it to Claude, Cursor or any MCP client:
claude mcp add --transport http arxkey https://arxkey.com/api/mcp
| Tool | What it returns |
|---|---|
| arx_registry | Verified contract registry for Chiliz mainnet or Spicy: Fan Token V2, Kayen, staking, Safe, EntryPoint, Arx module. |
| arx_chz_price | CHZ/USD from the Kayen USDC pool, on-chain, plus block height. |
| arx_pool_depth | Kayen pool reserves, CHZ per token and USD depth for any Fan Token (symbol or address). |
| arx_swap_quote | Router quote for an exact-input path (e.g. WCHZ → PSG) with price impact. |
| arx_validators | All validators with status, delegated CHZ, commission, slashes and the min stake. |
| arx_staking_position | Delegations and pending rewards of any address. |
| arx_balances | CHZ and Fan Token V2 balances of any address. |
| arx_charter | Active flag and remaining daily/total budget of an Arx Charter. |
| arx_module_rules | The ordered checks the Session Module applies to every agent call. |
| fti_price_candles · fti_capital_rotation · fti_match_impact_history | FanTokenIntel public tools, proxied with caching. |
Paid tiers (per-call x402 micropayments and CHZ subscriptions for premium signals, CEX ladders and operator analytics) follow in Phase 2. The free tier stays free.
Phase 2: operator layer
The Arx Strategy Registry contract lets operators publish strategies and users subscribe for 30-day periods in CHZ. Each payment splits at the moment it arrives: operator share and the Arx Key platform fee (25% at launch), both pull-based so no recipient can block a subscription. Subscriptions are keyed by the user's Safe, so a Charter can later be gated by an active subscription. See /operators (Spicy testnet first, mainnet after audit).
What is live
- ✓Wallet connect on Chiliz Chain, with automatic network add/switch.
- ✓Read-only CHZ and Fan Token V2 balances, plus any token by address.
- ✓Agent Charter builder with EIP-712 wallet signature (zero gas), local storage, revoke, export.
- ✓Live venue depth from Kayen pools and CHZ/USD from the on-chain USDC pool.
- ✓FanTokenIntel public signals: 7-day candles, 24h capital rotation.
- ✓Phase 1 on Spicy: Safe + Arx Session Module, on-chain Charters, stake-and-hold agent runner, revoke, pause, audit trail.
- ✕Mainnet module deployment (after audit), liquidity-provision agents, Kayen swap path, voting actions.
- ✕Operator publishing, CHZ fee split, marketplace, paid data over MCP: Phase 2.
Hard rules
- Never store user private keys.
- Never allow arbitrary contract calls or raw transfers.
- Always enforce spend caps and expiry on-chain.
- Verify every contract address on-chain before it enters an allowlist.
- Fan Token V2 contracts only. Legacy addresses are dead.
- Non-custodial in every design decision. Build for listability in the Socios Web3 section.
- Test on Chiliz Spicy (88882) first; mainnet only after limits and allowlists are proven.
FAQ
Is this financial advice? No. Arx Key executes rules you choose. Markets can lose money.
Can Arx Key move my funds? No. In v0.1 nothing moves at all. In Phase 1 only your own session key, bounded by your Charter, can act, and you can revoke it instantly.
Which tokens are supported? Any Fan Token V2 contract on Chiliz Chain. PSG, BAR, CITY and JUV are pre-verified; add others by address. New launches such as $PMO (Palermo, FTO 20 Oct 2026) are added once their contracts are verified.
Is Arx Key affiliated with Chiliz or Socios? No. It is independent infrastructure built for the Chiliz ecosystem.
How do I contact the team? Request early access on the home page and say what you need.
