TROY
Elysium
Open app
Troy Mandates + agent lane · live on Elysium

Give your bots a budget.
Not your keys.

Onchain accounts where a bot or AI agent can trade inside limits you set, and can never withdraw. For projects, treasuries, agent platforms and traders.

Any wallet, multisig or contract can own a mandate account. Its trades get the agent lane: half the pool fee.

New and unaudited. Start with small budgets. Only the owner can withdraw; an agent can only trade inside its limits.

Built for projects

Automate your treasury.
Without trusting the bot.

Today a project that wants a bot to trade hands it a hot wallet with the treasury in it. A mandate gives the bot a budget instead: it can trade, inside your numbers, and the money can only ever go back to you.

01

Buybacks and burns

Your buyback bot holds the treasury key.

It gets a daily budget and a price check instead.

Bought tokens stay in the account until the owner burns or moves them. A token without a Troy Oracle price trades only if you opt in, with its own per-trade cap and the bot's minimum-out.
02

Treasuries and DAOs

Rebalancing means a signer with full access.

The owner can be your multisig; the bot gets caps.

The multisig calls create() and owns the account. Withdrawals, limits and the agent stay with it.
03

Agent platforms

Users have to trust every agent with their funds.

One account per agent. Users fund it, the agent can't rug.

The agent can only swap back into the account. Each user stays the owner and can withdraw at any time.
04

Strategy vaults

Depositors take the manager's word for the risk.

Caps and a drawdown halt depositors can verify.

A vault contract can own the account; every limit is readable onchain and every trade is an event.
05

Market makers

A bot with a bad price feed can dump inventory.

Size and slippage limits checked against Troy Oracle.

Swaps through allowlisted v4 pools. The oracle check applies to tokens Troy Oracle prices (HYPE today) and $1 stables.
Why projects trust it

Limits are code.

1

Checked onchain, every trade

The account checks every limit inside the agent's own transaction. A trade that breaks one reverts, so nothing moves.

2

Funds only leave to the owner

The agent cannot withdraw, approve or send anywhere. The owner can withdraw everything, even while paused, halted or expired.

3

Priced against live Hyperliquid

Priced trades must return at least Troy Oracle's price minus your slippage. A stale price, older than 30 s, is refused, so a bot can't be walked into a bad fill.

4

Every action is an event

Agent changes, limits, deposits, withdrawals, halts and every trade are logged, so holders can audit the bot. Open the account dashboard

Tested against Elysium mainnet stateFork test on today's chain: the live HYPE/USDC 0.3% pool and the live Troy Oracle
Accepted2 HYPE soldfor 128.35 USDC, fair at Troy Oracle was 128.25: inside the 1% band
RefusedSame trade, price 3% worseoracle moved 3%: SlippageVsOracle, nothing moved
RefusedStale oracleprice older than 30 s: OracleStale
Always worksOwner withdrawalthe owner took every HYPE and USDC back

From test/mandates/MandateFork.t.sol in the public source, run against Elysium mainnet. The exact fill depends on the pool and oracle at that moment. Plus 41 unit tests and a fuzz: any agent trade either reverts with nothing moved or costs at most the slippage band.

Troy agent lane · live on Elysium

Give agents an account.
Then give them a lane.

The agent lane is a Uniswap v4 hook on a native HYPE/USDC pool. A trade from a Troy Mandates account pays 0.15%. Every other wallet pays 0.30%. Same pool, same liquidity, two lanes. LPs get flow from accounts with onchain limits, checked against Troy Oracle, instead of from searchers.

0.15%

Troy Mandates accounts

The hook asks the Troy factory if the sender is an account it created. Only those get the lane fee.

0.30%

Every other wallet

The normal fee. A contract that only pretends to be a mandate account pays this too.

gap fee

Closing a gap to Hyperliquid

0.30% plus half of the gap beyond it, whoever sends it, priced off Troy Oracle. The discount can't be farmed for arbitrage, and 80% of the surcharge goes to LPs.

Every lane swap, read from the chainFee paid per swap, from the PoolManager's Swap events

Reading the lane's swaps…

1

Can't be faked

The factory is pinned in the hook and can't be changed. It marks an account only when it deploys it, so a lookalike contract pays the full fee.

2

Can't be farmed

A trade that closes a gap to Hyperliquid pays the gap fee whoever sends it. The cheap lane is for normal flow, not stale-price arbitrage.

3

LPs keep the fees

LPs keep the whole 0.15% or 0.30%. Troy takes 20% of the gap surcharge only, never of the base fee.

4

Never blocks a swap

If Troy Oracle's price is older than 30 s, everyone pays 0.30%. No discount, no surcharge, no frozen pool.

New and unaudited. The gap is measured against Troy Oracle, which can run up to 30 s behind Hyperliquid. To trade it, allow the lane pool in step 5 below: your agent's swaps through it pay 0.15%, inside every limit you set. Source: src/agentlane/AgentLaneHook.sol, 23 unit tests and a mainnet-fork test.

For projects · set up in 3 steps

From multisig to running bot.
Three transactions.

1

Create the account

Call create() on the factory from your multisig or deployer. The caller is the owner, for good.

2

Allowlist and set budgets

In one multicall: the bot as agent, your tokens and pools, per-trade and daily caps, slippage, drawdown, expiry. Then deposit.

3

Point your bot at it

The bot signs swap on the account with its own key. It trades the account's funds, never its own, and never out.

Solidity · a treasury contract opens a mandate
// Owner = msg.sender of create(). A multisig or contract becomes the owner by calling create() itself.
interface IMandateFactory {
    function create() external payable returns (address account);
}
struct PoolKey { address currency0; address currency1; uint24 fee; int24 tickSpacing; address hooks; }
struct Limits { uint64 maxTradeUsd; uint64 maxDailyUsd; uint16 maxSlippageBps; uint16 maxDrawdownBps; uint32 cooldown; uint40 expiry; }
interface IMandateAccount {
    function setAgent(address agent) external;
    function setToken(address token, bool allowed, uint8 kind, uint32 asset) external;   // kind 1 = $1 stable, 2 = Troy Oracle asset
    function setPool(PoolKey calldata key, bool allowed, bool unpricedOk, uint64 maxUnpricedUsd) external;
    function setLimits(Limits calldata l) external;
    function deposit(address token, uint256 amount) external payable;
    function multicall(bytes[] calldata calls) external;
}

contract Treasury {
    address constant FACTORY = 0x6f043507729D617c78235dE20Bd4812b44be5E46;
    address constant USDC = 0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65;

    function openMandate(address bot) external returns (address acct) {   // guard it with your own access control
        acct = IMandateFactory(FACTORY).create();                        // this contract owns the account
        PoolKey memory hypeUsdc = PoolKey(address(0), USDC, 3000, 60, address(0));
        bytes[] memory c = new bytes[](5);
        c[0] = abi.encodeCall(IMandateAccount.setAgent, (bot));
        c[1] = abi.encodeCall(IMandateAccount.setToken, (address(0), true, 2, 159)); // HYPE, Troy Oracle
        c[2] = abi.encodeCall(IMandateAccount.setToken, (USDC, true, 1, 0));         // USDC at $1
        c[3] = abi.encodeCall(IMandateAccount.setPool, (hypeUsdc, true, false, 0));
        c[4] = abi.encodeCall(IMandateAccount.setLimits, (Limits(100e6, 500e6, 100, 1500, 30, uint40(block.timestamp + 30 days))));
        IMandateAccount(acct).multicall(c);
        IMandateAccount(acct).deposit{value: 1 ether}(address(0), 1 ether);   // fund it: only the owner can deposit or withdraw
    }
}
cast · the agent trades
# the agent: price the trade, simulate it from the agent address, then send. It trades the account's funds, never its own.
POOL="(0x0000000000000000000000000000000000000000,0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65,3000,60,0x0000000000000000000000000000000000000000)"
RPC=https://rpc.elysium.kinetiq.xyz

cast call $ACCOUNT "fairOut(address,address,uint256)(uint256)" \
  0x0000000000000000000000000000000000000000 0xb47c4C8F73F009CC0C0d3f92B388d13E293F0B65 1ether --rpc-url $RPC
# minOut a little inside fairOut x (1 - maxSlippage); a refused trade reverts with the rule's name

cast call $ACCOUNT "swap((address,address,uint24,int24,address),bool,uint256,uint256,uint256)(uint256)" \
  $POOL true 1ether $MIN_OUT $(($(date +%s)+120)) --from $AGENT --rpc-url $RPC   # simulate
cast send $ACCOUNT "swap((address,address,uint24,int24,address),bool,uint256,uint256,uint256)" \
  $POOL true 1ether $MIN_OUT $(($(date +%s)+120)) --account agent --rpc-url $RPC  # sell 1 HYPE for USDC
MandateFactory0x6f043507729D617c78235dE20Bd4812b44be5E46
Create an accountcreate() payable, returns the account, owner = msg.sender
The limits

You write the rules.
The contract enforces them.

Every rule is checked inside the agent's own transaction. A trade that breaks one is reverted, so nothing moves.

Allowed pools

The agent can only trade through pools you list, with their fee tier and hook pinned. Default: the HYPE/USDC 0.3% pool, no hook.

Up to 3 hops

Per-trade cap

Maximum dollar size of one trade, priced at Troy Oracle.

Default $100

Daily cap

Maximum dollar volume over a rolling 24 hours, counted in one-hour buckets.

Default $500

Slippage vs Troy Oracle

Each trade must return at least the oracle price minus your tolerance, after fees. If the oracle price is older than 30 seconds, the trade is refused.

Default 1%

Drawdown stop

If the account falls this far below its high-water mark, the agent is halted until you reset it. Deposits and withdrawals do not count as profit or loss.

Default 15%

End date and cooldown

The mandate expires on the date you pick. A fresh account cannot trade at all until you set limits. Optional wait between trades.

Default 30 days, 30 s cooldown

Pause and revoke

Pause stops the agent and nothing else. Revoke removes it in the same block.

Owner only

Withdraw, always

You can withdraw any token at any time: paused, halted, expired, or with the oracle down.

Owner only

Fee

A protocol fee on agent trades can be set between 0 and 0.10% of the output, never higher. It starts at 0.

Hard cap 10 bps

Worst case with a hostile agent, within one day: about your daily cap times your slippage tolerance (it can trade at the edge of the band), and never more than the drawdown line before it halts. With the defaults that is about $5 a day.

WhoCanCannot
You (owner)Everything: deposit, withdraw, set the agent, limits, tokens and pools, pause, reset a halt. Fixed when the account is created.–
The agentSwap the account's funds back into the account, inside your limits.Withdraw, approve, change settings, or send funds anywhere else.
Troy (factory)Set the protocol fee, 0 to 10 bps, and where it goes.Touch accounts, change the oracle or the pool manager, raise the fee above 10 bps.
For traders · create my agent account

Six steps.
Each one simulated first.

Before your wallet asks you to sign, this page runs the exact transaction against Elysium. If the contract would refuse it, you see why and nothing is sent.

1

Connect your wallet

Elysium mainnet, chain 99901. The page reads your address and asks the wallet to switch network if needed.

2

Create your account

The factory deploys a contract owned by your wallet. One-off, about 4.4M gas. If you already have one, it is found automatically.

3

Deposit

HYPE or USDC into your account. USDC needs an approval first; the page does both, each simulated.

4

Name your agent

The address your bot signs with. It gets trading rights only, saved together with the limits in step 5.

5

Set the limits

Conservative defaults are filled in, all editable: only HYPE, USDC and the HYPE/USDC 0.3% pool. Saving sends one transaction with the agent, the tokens, the pool and the limits.

6

Stay in control

Pause or revoke the agent, lift a drawdown halt after you have looked, and take your funds out at any time.

Dashboard

Your account,
read live from the chain.