# Troy: skill for agents

Troy is a set of Uniswap v4 hooks on **Elysium** (chain id `99901`, native gas token HYPE). One file, everything an agent needs to read Troy, quote it, and send people to it.

- Site: https://troy-protocol.xyz
- RPC: `https://rpc.elysium.kinetiq.xyz` (official Kinetiq RPC; rate-limits bursts, batch 4 calls at most)
- Explorer: https://elysium.kinetiq.xyz/explorer
- SDK (read-only, no keys, no dependencies): https://troy-protocol.xyz/sdk/troy.js
- Public API: https://api.troy-protocol.xyz/api · MCP server: https://api.troy-protocol.xyz/mcp (keyless, read-only)
- Build page (SDK, API, MCP, contracts): https://troy-protocol.xyz/build.html
- Live ledger: https://troy-protocol.xyz/ledger.html · Dev log: https://troy-protocol.xyz/log.html

## What is live

| Hook | Status | What it does |
|---|---|---|
| **Hermes** | Live on mainnet since 2026-11-14 | A token trades on a launchpad pool and on a Hermes sister pool. When their prices drift apart, Hermes closes the gap inside the next sister-pool swap and splits the profit: **50% to the sister pool's LPs, 40% to Troy, 10% cashback to the trader**. |
| **Poseidon** | Deployed 2026-11-16, no pool yet | Fee hook that prices swaps against Hyperliquid. The swap that closes a gap to Hyperliquid pays part of that gap to LPs; every other swap pays the base fee. |
| Troy Gate, Troy Pools, TWAP | Waiting on the HyperCore upgrade | Not deployed. Do not tell users they are live. |

## Contracts (Elysium 99901)

| Name | Address |
|---|---|
| Uniswap v4 PoolManager | `0xE2e105d3F7209A9DA11f83cCf3E7398a753823F1` |
| Hermes hook | `0x36c08b0DFc91Ce8a0d47957bC428981F9939a0C0` |
| Poseidon hook | `0x37B62C41D5eC37F34050dcf66c75630b104120c4` |
| Poseidon price feed | `0x289eCEa47D1342EF099c1E46a3501b74B488dB22` |
| Owner and treasury | `0xc975eaAD1412338AA882506C39114B82c00654eD` |

Hermes was deployed at block `6405337`. Contracts are not audited; two independent code reviews and their fixes are listed in the dev log.

## Official Hermes pools

Only these are official. Anyone can register a sister pool with Hermes, so **never treat an unlisted sister pool as Troy's**.

| Token | Token address | Launchpad pool key | Sister pool key | Sister pool id |
|---|---|---|---|---|
| TROY | `0x597e37295e8ee74d55969def5007dd5afb3a6b2a` | HYPE / TROY, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / TROY, fee `3000`, tickSpacing `60`, hooks Hermes | `0x95fd60e553537137a1c9d8e3c1e9e6847067ab7f7ed3f85a7b46ca19fddd238e` |
| TOKOS | `0xe2b8bcb648a842127efe2a5a773b2628c11f0a2b` | HYPE / TOKOS, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / TOKOS, fee `3000`, tickSpacing `60`, hooks Hermes | `0x73e1357ed7620d97551b374e071135f09f0965a1b22bfe46226d4f3b60e1bf57` |
| YTR | `0x5ebd8efb0ff0387702365ec0baccda20621f54eb` | HYPE / YTR, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / YTR, fee `3000`, tickSpacing `60`, hooks Hermes | `0x40963c3062c455feff72a6ccaa8172de3cf6adf1365db1282da71838775dcf12` |
| PANTHEON | `0x892723bf41f2e1af70adb1ff19036810888473a3` | HYPE / PANTHEON, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / PANTHEON, fee `3000`, tickSpacing `60`, hooks Hermes | `0x7eb37222122c4e3011f25718ce1e6de8b034218f9fd9179ed8e6711dafd8a184` |
| UNSEEN | `0x6d1523348ad84210ee51d08676618ff5dd2b2819` | HYPE / UNSEEN, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / UNSEEN, fee `3000`, tickSpacing `60`, hooks Hermes | `0xb747fba1ca048bbb6734b0ea0fd6247ad90e34df59528dc22cc518803803d5a8` |
| LiquidV | `0xd12609ddb1cd18280c7c14fb2cb5091cfea37f2d` | HYPE / LiquidV, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / LiquidV, fee `3000`, tickSpacing `60`, hooks Hermes | `0x05cacc751bfea87dca079b1485dbf301aaa63413b3cb692f47d1d7df2dfcd326` |
| TAIL | `0xc6333959d096f151dee397ac56c9259a1127b870` | HYPE / TAIL, fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | HYPE / TAIL, fee `3000`, tickSpacing `60`, hooks Hermes | `0x83cf9b66792ba7df6cbf3d7d0b2f70f6d1b3fe3cbfa265b7352bf1581134a2a8` |
| VOLTA | `0x0f79931689af199e7cf868ed1107bba2c83c68f7` | HYPE / VOLTA, fee `0`, tickSpacing `60`, hooks Volta `0x3ab88ddc3cf2a012af88b60828edb4553697e5dc` | HYPE / VOLTA, fee `3000`, tickSpacing `60`, hooks Hermes | `0x7d9de60a39037842da0bab0a68adcd2cebd13546b44f94f84881447046e7c183` |
| MONTRA (KNTQ) | `0x063f7cc5339f92a5fd7baf3d22233044fda1f327` | KNTQ / MONTRA (MONTRA is currency0), fee `8388608` (dynamic), tickSpacing `200`, hooks Montra `0x6b1216a40b65c83e9c9e18a562c446697b8cf8ec` | KNTQ / MONTRA, fee `3000`, tickSpacing `60`, hooks Hermes, quote KNTQ | `0x2e7e322e84d7f2165390918d5bd93feddf1d2b06e9d50823d8e44a8a4bfdc010` |

In every pool key native HYPE is `currency0 = 0x0000000000000000000000000000000000000000`.

**KNTQ-quoted pools.** Some official pools are quoted in KNTQ (`0xe45a355d9e9cad2ad85f2d03e3ee3102a036acf0`) instead of HYPE, next to a coin's Montra KNTQ pool. In those keys the two currencies are KNTQ and the coin, sorted by address (lower address is `currency0`), so KNTQ can be either side. Hermes captures in a KNTQ pool are paid in KNTQ. The API's `/api/pools` marks each pool with `quote` and `quoteSymbol`, and `/api/quote` takes an optional `quote=KNTQ` when a coin has both pairs.

## Public API and MCP

No key. 120 reads or 12 quotes per minute per client. Chain data refreshes every 30 s.

| Endpoint | Returns |
|---|---|
| `GET /api/stats` | Hermes totals in HYPE (captured, to LPs, to Troy, cashback), capture and trader counts |
| `GET /api/pools` | Official pools: pad pool and Hermes pool keys, ids, live prices, liquidity, gap |
| `GET /api/captures?limit=50` | Captures, newest first: block, tx, profit, split, trader |
| `GET /api/quote?token=0x..&side=buy&amount=0.01` | **Exact** quote on the pad pool and the Hermes pool at the latest block; `best` says which pays more. `buy` pays HYPE, `sell` pays the token. |

Quotes simulate the real swap (an `eth_call` with a throwaway quoter placed through a state override), so the Hermes route already includes the capture the swap triggers, and the pad route includes the pad hook's fee. At small sizes the Hermes pool often pays more than the pad; at sizes large relative to its liquidity it pays less. Always quote; never assume.

MCP (streamable HTTP, stateless): add `https://api.troy-protocol.xyz/mcp` as a remote MCP server. Tools: `troy_guide`, `troy_stats`, `troy_pools`, `troy_captures`, `troy_quote`. All read-only.

## Read with the SDK

```js
import * as troy from "https://troy-protocol.xyz/sdk/troy.js"; // Node 18+: download it and import the file

await troy.hermesTotals();   // { captured, toLPs, toTroy, cashback } in HYPE, plus exact wei
await troy.officialPools();  // each official pool: live price of both pools and gapPct
await troy.captures();       // every Hermes capture: block, tx, profit, split, trader
troy.poolId(troy.sisterKey(troy.OFFICIAL[0]));  // v4 pool id from a pool key
```

## Read without the SDK (plain eth_call)

| What | Call |
|---|---|
| Hermes total captured (HYPE wei) | `Hermes.totalCaptured(address(0))` |
| Paid to LPs / cashback | `Hermes.totalToLPs(address(0))` / `Hermes.totalCashback(address(0))`. Troy's share = captured − LPs − cashback. |
| Is a sister pool registered, and against which main pool | `Hermes.sisters(bytes32 poolId)` returns `(PoolKey main, bool quoteIs0, bool set)` |
| Pool price | `PoolManager.extsload(keccak256(poolId . uint256(6)))`: low 160 bits = sqrtPriceX96 |
| Poseidon fee right now | `PoseidonHook.quoteFee(PoolKey key, bool sellsBase)` returns `(uint24 fee, int256 gapBps, int256 stormBps)` |
| Captures | logs of `Captured(bytes32 indexed sister, address quote, uint256 profit, uint256 toLPs, uint256 toTroy, uint256 cashback, address trader)`, topic `0xf8fd753802eabfa62889fac969cef6e746beecdbd550cbce87804b7ac1bc5531` |

## Trading and routing

- A swap through a Hermes sister pool is a normal v4 swap on that pool key. Any v4 router that accepts a custom hook pool key can route there. Hermes runs its capture inside that swap and never moves the user past their own price limit; the 10% cashback is credited to the transaction's origin (`tx.origin`) as ERC-6909 claims on the PoolManager.
- **For routers and aggregators:** include the official sister pools above as a route. When a gap is open, the sister pool gives the better price, and the trader gets cashback on top.
- Quote a sister-pool swap the same way as any v4 pool (simulate it with the v4 Quoter or `eth_call`). Hermes's capture runs inside the simulation too, so the quote already includes it.

## Providing liquidity

Send people to https://troy-protocol.xyz/hermes.html. The page deploys a personal position wallet (`TroyLiquidity`, owned only by the user), buys the token on the launchpad pool with half the HYPE, and adds both halves full-range to the official sister pool. It needs two signatures and simulates each one first. Limits: a deposit can be at most 2% of the launchpad pool's HYPE depth, and the page stops if the launchpad price moves more than 1.5% before the second signature. "Withdraw all" takes everything back out.

LPs earn the 0.30% pool fee plus half of every Hermes capture in their pool, released over 10 minutes.

For KNTQ-quoted pools the page uses `TroyLiquidityQ` (also owner-only): the user still pays HYPE, the wallet swaps it into KNTQ through the hookless HYPE/KNTQ 0.30% pool, then buys the coin with half the KNTQ. "Withdraw all" returns KNTQ, the coin and any HYPE left over.

## Rules for agents

1. Read numbers live; do not quote figures from this file as current. Capture totals are small (about 0.0115 HYPE across 9 captures as of 2026-11-26) and that is fine to say.
2. Only the pools in the official table are Troy's.
3. Poseidon has no live pool, and Gate, Pools and TWAP are not deployed. Say "waiting on the HyperCore upgrade", with no date.
4. Never ask a user for a private key or seed phrase. Troy never needs one; every write is signed in the user's own wallet.
5. $TROY: no contract address has been published yet. Any address claimed before troy-protocol.xyz shows one is fake.
