Agents act on Elysium. They cannot exceed the limits you set, even when manipulated.
Elyrail is a wallet, a tool library and an MCP server for AI agents on Elysium and Hyperliquid. Every transfer, approval, swap and order passes a deny-by-default policy, a simulation and, when you ask for it, a human. It does not custody funds or route through anyone else's servers.
- 01describe_policy({})read · Hyperliquid testnet: BTC, ETH · max leverage 20x · max order $20, max position $50
- 02hl_get_mark_prices({"markets":["BTC"]})read · BTC mid 61143.0
- 03hl_set_leverage({"market":"BTC","leverage":30})denied · POLICY_DENIED · LEVERAGE_EXCEEDED
- 04hl_place_order({"market":"BTC","side":"buy","size":"1","limitPrice":"61143"})denied · POLICY_DENIED · NOTIONAL_EXCEEDED
- 05hl_place_order({"market":"BTC","side":"buy","size":"0.0002","limitPrice":"64200"})denied · POLICY_DENIED · PRICE_DEVIATION_EXCEEDED
The policy refused all three before anything was signed: LEVERAGE_EXCEEDED, NOTIONAL_EXCEEDED, PRICE_DEVIATION_EXCEEDED. I will not try to work around these limits.
Recording of a scripted agent run (no LLM) against the live Hyperliquid testnet info API. Every write was refused by the policy before signing; nothing was sent.
Chain status
- Network
- Elysium mainnet
- Chain ID
- 99901
- Latest block
- Loading
- Block time
- Loading
- RPC
- checking
- Network
- Elysium testnet
- Chain ID
- 99801
- Latest block
- Loading
- Block time
- Loading
- RPC
- checking
21 tools
Generated from the tool library. Writes go through the policy; reads never sign.
Elysium: read
Hyperliquid: read
Hyperliquid: trade
The policy engine, in your browser
The same code the wallet runs. Eight actions, evaluated in order against one policy.
Sample policy · Elysium mainnet
- Agent: demo-agent
- Recipient allowlist: treasury only
- HYPE: 1 per transaction, 1.5 per 24 hours
- USDC: 100 per transaction; approvals only to Permit2, at most 100
- Human approval above 0.75 HYPE
- Everything else: denied
| # | Action | Decision | Reason |
|---|---|---|---|
| 1 | Send 0.5 HYPE to treasury | loading engine | |
| 2 | Send 0.8 HYPE to treasury | loading engine | |
| 3 | Send 0.5 HYPE to treasury again | loading engine | |
| 4 | Send 2 HYPE to treasury | loading engine | |
| 5 | Send 0.1 HYPE to an unknown address | loading engine | |
| 6 | Approve unlimited USDC to Permit2 | loading engine | |
| 7 | Approve 50 USDC to Permit2 | loading engine | |
| 8 | Transfer with a smuggled calldata field | loading engine |
Evaluated by @elyrail/wallet/policy running in your browser, in order, so the 24-hour cap adds up. The wallet also simulates each transaction on chain before signing; this demo shows only the policy check.
Quickstart
Start read-only on testnet. Add a key and a policy when you are ready to write.
Full quickstartclaude mcp add --transport stdio --scope local elyrail -- npx -y @elyrail/mcp --config /absolute/path/to/elyrail.json{
"mcpServers": {
"elyrail": {
"command": "npx",
"args": [
"-y",
"@elyrail/mcp",
"--config",
"/absolute/path/to/elyrail.json"
]
}
}
}import { toAiSdkTools, ELYRAIL_SYSTEM_PROMPT } from "@elyrail/adapters/ai-sdk";
import { buildRuntime, loadConfig } from "@elyrail/mcp";
import { anthropic } from "@ai-sdk/anthropic";
import { generateText, stepCountIs } from "ai";
const runtime = await buildRuntime(await loadConfig("./elyrail.json"));
const result = await generateText({
model: anthropic("claude-sonnet-5-5"),
system: ELYRAIL_SYSTEM_PROMPT,
prompt: "Send 0.1 HYPE to the treasury.",
tools: toAiSdkTools(runtime.tools, runtime.ctx),
stopWhen: stepCountIs(5),
});elyrail init --dir my-agent --network testnet
elyrail keystore create --out my-agent/wallet.keystore.json
elyrail policy lint my-agent/policy.json
elyrail doctor --config my-agent/elyrail.jsonWhat stands between the agent and your funds
Threat model and residual risksDeny by default
A versioned policy lists what is allowed: recipients, contracts, selectors, tokens, caps, venues, markets. Everything else fails with a typed reason.
Simulated before signing
Every transaction runs through eth_simulateV1. Transfers and approvals in the result must match what the tool declared, or the action is refused.
Approval bound to the hash
Above a threshold, a person approves the exact signing hash. A different transaction cannot reuse the approval.
Kill switch
A file flag halts all signing, survives restarts, and is checked again just before each signature. Agents have no tool that reaches it.
Keys stay in one module
Encrypted keystores (scrypt, AES-256-GCM). Keys are held as bytes in one class, never passed to tools, never logged.
Hash-chained audit log
Every decision is appended to a log where each entry commits to the previous one. Edits and deletions break verification.
Venues
Addresses come from each venue's official docs and were checked on chain. Unverified entries are listed and cannot be used by write tools.
| Venue | Contract | Status | Elyrail |
|---|---|---|---|
| Uniswap v4 | 0x1B341F…b03C1a | verified | swap_uniswap_v4, uniswap_v4_quote |
| Uniswap v3 | 0x2d0141…c4Fe65 | verified | no tool yet |
| Uniswap v2 | 0xE783DE…19EbAd | verified | no tool yet |
| 0x | 0x000000…C22734 | verified | no tool yet (API key required) |
| LI.FI | 0x24E6dA…bd6Dc5 | verified | no tool yet |
| KyberSwap | 0x6131B5…6337b5 | unverified | no tool yet |
| Enso | None | not on Elysium | None |
No swap venue is deployed on Elysium testnet. Swap tools work on mainnet only.
Roadmap
- HYPE bridge toolWaiting for the bridge calls to be documented by Kinetiq.planned
- HyperCore market-data reads on ElysiumWaiting for the precompile in Elysium's network upgrade.planned
- KyberSwap, 0x and LI.FI routesAddresses are in the registry; no tools yet.planned
- Log export to external storageInterface exists; no exporter ships yet.planned
- On-chain agent registry, operator bond, action logSpecification stage. Aligns with ERC-8004 (Draft).planned