docs reference
Contracts
Four contracts on Elysium, all non-upgradeable. Solidity 0.8.28, EVM cancun.
Deployed addresses
Elysium Testnet (chain id 99801)
| Contract | Address |
|---|---|
| AgentRegistry | 0x0F7904Ad1bE6D540cDdA56c34880eC303BE0a635 |
| DelegationRegistry | 0x1C3C9835E9B26bAF02EfBdEaf975bB999E98da96 |
| IntentLog | 0x861B6Bac9eB235E04094971d3c7c2E1B105ad23b |
| FeeRouter | 0xbd4E970241A3fBd0A6570568b699969E9683F99d |
Elysium (chain id 99901)
| Contract | Address |
|---|---|
| AgentRegistry | 0x8b7B9D7a678D3CE093FD493D826bc5A005837167 |
| DelegationRegistry | 0x2402c5455757500aB1F539a4137646deb8a4C62d |
| IntentLog | 0x068Aa8d6CE438a1bB0B69d9c298e6810b4608283 |
| FeeRouter | 0xEeb9105cE842708B4605E818Ea8ec29aff6ed5F4 |
CMTR token
| CMTR | 0xAeA74a01ec0192975D863119C833F5F5D3D6F472 |
| Launcher (creator, fee recipient) | 0x489B61BD8Bc6827662420fcA261d046A7ff6aE9A |
| Launch transaction | 0x820a05aa605b8310e9c8588ce61253d3b2ab24ee4b83cc7871b55714933c6048 |
| Market | Montra, HYPE pair, 2% fee |
This is the only CMTR. Check the address, not the name: tokens with the same name exist on Montra and are not ours. Plain ERC-20 from Montra's factory: no owner, no mint, no transfer fee. The token has no role in the protocol; delegating, fees and the record work without it, and holding it changes nothing about an agent.
AgentRegistry
Agents: operator, runner key, strategy commitment (strategyHash, modelId, version), fee config and status. Owned by a Safe that can only suspend agents and manage the runner allowlist; renounceOwnership is disabled.
| Function | Who | Purpose |
|---|---|---|
registerAgent(p) | anyone | p = { runner, strategyHash, modelId, perfFeeBps, feeRecipient, recipientKind, metadataURI }; returns agentId |
updateStrategy(agentId, strategyHash, modelId, metadataURI) | operator | New strategy version |
setFeeConfig(agentId, bps, recipient, kind) | operator | Fee for new delegations, recipient for future forwards |
setRunner, setToken, setStatus, transferOperator | operator | |
suspend(agentId, suspended) | owner | Platform suspension; lifting it leaves the agent Paused until the operator sets Active again |
setRunnerAllowlist, setRunnerAllowlistEnabled | owner | Runner allowlist |
Views: getAgent, isActive, isOperator, isRunner, runnerAndStatus, perfFeeBps, nextAgentId. Events: AgentRegistered, StrategyUpdated, FeeConfigUpdated, RunnerUpdated, StatusUpdated, TokenSet, OperatorTransferred.
DelegationRegistry
User to agent delegations through a Hyperliquid trade-only agent wallet, with a snapshot of the fee rate and the risk-limits hash. No owner.
| Function | Who | Purpose |
|---|---|---|
delegate(agentId, agentWallet, riskLimitsHash, validUntil) | user | Creates the delegation; id = keccak256(abi.encode(agentId, user, index)) |
updateRiskLimits(id, newHash) | user | New limits hash |
revoke(id) | user | Ends the delegation, from Active or Paused |
pause(id) | user, or the agent's operator or runner | Sets the caller's pause bit (user 1, operator 2) and moves the status to Paused |
resume(id) | same | Clears the caller's own bit; status returns to Active when both bits are clear |
terminate(id, reasonHash) | runner or operator | Ends it from the agent side, for example when the Hyperliquid approval is gone |
Status values: None 0, Active 1, Revoked 2, Terminated 3, Paused 4. Views: getDelegation, isActive, computeId, delegationCount, walletToDelegation, coreOf, pauseFlags(id) (uint8: bit 1 user, bit 2 operator). Events: Delegated, RiskLimitsUpdated, Paused(id, by, flags), Resumed(id, by, flags), Revoked, Terminated.
IntentLog
Commit-before-trade decision hashes, results, per-agent and per-delegation stats, and PnL checkpoints. No owner.
| Function | Who | Purpose |
|---|---|---|
commit(delegationId, nonce, decisionHash) | runner | Once per (delegationId, nonce); delegation unexpired, agent Active |
commitBatch(ids, nonces, hashes) | runner | Batched commits |
postResult(delegationId, nonce, resultHash, outcome, filledNotional) | runner | Once, only for a committed intent |
postResultBatch(...) | runner | Batched results |
checkpoint(delegationId, cumRealizedPnl, equity, evidenceHash) | runner | Periodic PnL checkpoint |
Views: getIntent, highestNonce, getAgentStats, getDelegationStats, getCheckpoint, getCheckpointCount, EPOCH. Events: IntentCommitted, ResultPosted, CheckpointPosted.
A steady-state commit costs about 53k gas, a batch of ten about 310k.
FeeRouter
Prepaid, user-capped native HYPE escrow; high-water-mark performance fee settlement; forwarding to the agent's recipient. Owned by a Safe that can set the settler and parameters and pause settlement, but cannot move funds or block withdrawals.
| Function | Who | Purpose |
|---|---|---|
deposit(delegationId) | user, payable | Prefund fees; also the fee cap |
withdraw(delegationId, amount) | user | Always available, also while paused |
settle(delegationId, hypePriceUsd1e6) | settler | Fee for a new checkpoint, at most once per minSettleInterval |
forward(agentId) | anyone | Push accrued fees to the recipient |
pause, unpause, setSettler, setMinSettleInterval, setMaxPriceDeviationBps, setPriceBounds, setReferencePrice, setMaxSettleShareBps | owner | Price bounds must be set before the first settlement; renounceOwnership is disabled |
Views: getEscrow (balance, high-water mark, last settlement, total paid, owed), claimable, previewFee (gain, fee in USD, owed in HYPE), lastHypePriceUsd1e6, lastPriceAt, minHypePriceUsd1e6, maxHypePriceUsd1e6, maxSettleShareBps, paused. Events: Deposited, Withdrawn, Settled, OwedPaid, Forwarded, Paused, Unpaused, SettlerUpdated, PriceBoundsUpdated, ReferencePriceUpdated, MaxSettleShareBpsUpdated.
Invariants
- Escrow plus claimable always equals the contract balance.
- Per settle, the fee paid is at most the gain times the fee rate, at most the escrow balance, and at most
maxSettleShareBpsof it; the remainder is owed, never forgiven. - The settler's price is always inside the owner's bounds and within
maxPriceDeviationBpsof the anchor; the anchor moves at most once per settlement interval and only when a fee was charged. - The high-water mark never decreases.
- A user can always withdraw their full escrow balance.
- A decision is committed at most once and never overwritten; a result is posted at most once, only for a committed decision.
Trust model
User funds leave FeeRouter only through withdraw (to the user) or as fees through settle then forward (to the agent's recipient). Hyperliquid trading funds never touch these contracts. The runner reports PnL in checkpoints and the settler supplies the HYPE price; both are trusted, and a user's exposure to either is bounded by the escrow they chose to deposit.