# Hookr agent skill: Monad

No account, no API key; your wallet signs every call. Paths are relative to https://hookr.fun.

## Chain

- Chain: Monad, chain id 143
- Public RPC: https://rpc.monad.xyz
- Explorer: https://monadscan.com
- Hookr is independent and not affiliated with or endorsed by Robinhood.
- ERC-8004 identity registry `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`, same on Robinhood Chain (4663)

## Addresses

App-pinned addresses; redeploys change them.

- HookrRoot: `0x89c9FB50d1f03192230FFB1c279BB6E7d3Fe6aCc`
- HookrRouter: `0xC2Bc9a3fe6c4Ce8C2F7EB4655b0869b01D8c93C9`
- HookrQuoter: `0x445D7891381Aa7F91F5048EdBC6a611ccBDe7865`
- HookrLauncher: `0x1cf2748A6670572425eAbf9Ab9e5BC4eb2eB8Ef4`
- HookrRules, the release's: `0x4a71c270b1520F94064268102AebD744b0DE7942`
- HookrRegistry: `0x463c82beA1a52F4Cc05ca0741a24F0AD24bA4602`
- HookrTreasury: `0x2242F7FC75606500503075f29ea8cDA684EfB4a9`
- HookrFamilyLock: `0xfAFEcE64099C1E791C4B46189c277f00c0c7e00b`
- HookrOwnedRootFactory: `0xA6c2a401597301dFf57A59bC8F70a9622499f3ec`
- PoolManager: `0x188d586Ddcf52439676Ca21A244753fA19F9Ea8e`
- PositionManager: `0x5b7eC4a94fF9beDb700fb82aB09d5846972F4016`
- Permit2: `0x000000000022D473030F116dDEE9F6B43aC78BA3`

Universal Router: `0xFdf682F51FE81Aa4898F0AE2163d8A55c127fbC7`.

SDK: `npm install hookr-sdk viem`, /docs/pools/sdk. hookr-sdk 1.8.1 carries these addresses as `HOOKR_1_MONAD` and builds
quote and swap calls (`buildQuote`, `buildSwap`, `swapAllowance`); your wallet signs.

## Pool key and pool id

```
PoolKey = {
  currency0: lower(subject, quote),  // numeric compare; 0x0 (MON) sorts first
  currency1: higher(subject, quote),
  fee: 0x800000,  // dynamic-fee flag, not a real fee
  tickSpacing: <the pool's>,
  hooks: HookrRoot,
}
poolId = keccak256(abi.encode(PoolKey))  // bytes32
```

Or read `launcher.memberKey(subject, quote, tickSpacing, root) view returns (PoolKey key, bool available)`.

## Read a pool's Hook Blocks

```
root.poolConfig(poolId) view returns (PoolConfig)
core.config(poolId) view returns (RulesConfig)  // core = the PoolConfig's rules address
```

`PoolConfig` names the core, one advisory (0x0 = none), `liquidityOwner` and `baseLpFeePips`.
Both structs freeze at launch. `RulesConfig` fields, in order (pips = 1e-6, bps = 1e-4):
guardEndBlock, maxFeePips, snipeTaxPips, snipeFloorPips, snipeDecaySeconds, dynamicFeeSens, burnBps, lpBps, potBps, royaltyBps, protocolShareBps, potEveryNBuys, maxBuyQuoteAmount, potMinBuyQuote, royaltyTo, integrator.

- `guardEndBlock` uint40: launch guard end on Monad's clock (block timestamp / 12), 0 = off
- `potBps` uint16: King of the Pool's share of what is left of arbitrage recapture profit (bps), 0 = off
- `protocolShareBps` uint16: Hookr's share of block charges (bps)
- `potEveryNBuys` uint32: reserved, must be 0
- `maxBuyQuoteAmount` uint128: Anti-Snipe max buy per 12-second step, 0 = off
- `potMinBuyQuote` uint128: 0
- `integrator` address: listed integrator, 0x0 = none

## Quote and swap

```
router.swap(Swap s, address engagement, uint256[] campaigns) payable
  returns (uint256 amountIn, uint256 amountOut)  // engagement 0x0, campaigns [] for none
Swap = { key, zeroForOne, amountSpecified, amountBound, sqrtPriceLimitX96, recipient, deadline }
quoter.quote(Swap s, address payer) returns (ExecutionReceipt)  // not view: eth_call
```

HookrRouter pays `recipient` and refunds unused MON. `amountSpecified` is negative for exact input;
`amountBound` is the minimum out (or maximum in), never zero. `sqrtPriceLimitX96`: 4295128740 if
`zeroForOne`, else 1461446703485210103287273052203988822378723970341, to fill in full. Native input goes as `msg.value`;
for an ERC-20, approve the router itself, not Permit2.

Universal Router: `V4_SWAP`, same `PoolKey`, empty `hookData`, Permit2; quote with `quoter.quoteExactInputSingle`
or `quoteExactOutputSingle`. Every Hook Block applies either way.

With arbitrage recapture on, a swap carries the lane's `gasFloor` (`root.laneOf(poolId)`)
plus its own gas. `eth_estimateGas` includes the floor: send the larger of
the estimate and the floor, plus 5%. Monad charges the whole limit. Its base fee is never under 100
gwei, and a swap on a pool with arbitrage recapture carries the lane's floor (`gasFloor`).

## Provide liquidity

Uniswap v4 `PositionManager`: `Actions.MINT_POSITION(poolKey, tickLower, tickUpper, liquidity, amount0Max,
amount1Max, owner, hookData=0x)` then `SETTLE_PAIR`; an ERC-20 leg goes through Permit2. While a pool's
launch guard is open only its `liquidityOwner` can add. `guardEndBlock` counts 12-second
steps: compare it with the latest block's timestamp divided by 12, never `eth_blockNumber`.

## Open pools

```
launcher.launch(Token token, address root, Member[] members, uint256 deadline) payable
  returns (bytes32 familyId, address subject)
Token = { existing, name, symbol, supply, salt }
Member = { quote, tickSpacing, sqrtPriceX96, tickLower, tickUpper, liquidity, amount0Max,
  amount1Max, config: PoolConfig, rules: RulesConfig, recapture: RecaptureConfig }
```

One pool per member. New token: `existing` 0x0, nonzero `supply`; `launcher.predictToken(you, token)`
gives its address. Existing token: `existing` set, the rest empty. `msg.value`: the native budgets plus
`launcher.launchFee()`, exactly; unused budget is refunded. `recapture` all zero opens a pool without arbitrage recapture; for arbitrage recapture (on by default in the app and over MCP) send `traderBps` 0, `lpBps` 10000, `releaseBlocks` 36000. The caller owns the positions and creates a new token.
`protocolShareBps` must meet `minProtocolShareBps()`, or the treasury's if higher. `launchWithBuy` adds a
creator buy, `launchAdvised` an advisory, `launchFamily` per-pool settings.

Launchpads: /docs/guides/integrating-as-a-launcher. Code for any Hook Blocks: /builder#integrate.

## Claim

```
core.claimable(currency, account) view returns (uint256)
core.claim(currency) returns (uint256)        // pays msg.sender
core.claimTo(currency, to) returns (uint256)  // pays to
```

The pool's core (`PoolConfig`'s `rules`) credits what it owes an account (arbitrage recapture rebates,
royalties, integrator fees, partial-fill refunds) per currency across its
pools; read `claimable` there first.

## MCP server

https://hookr.fun/api/mcp?network=monad, POST only, no key, /docs/mcp: read pools, quote, check a
trade, build unsigned swap, claim and launch calls. It never sends; your wallet signs.
`hookr_build_launch` opens a new token's pool on MON in one call, arbitrage recapture on unless `arbRecapture`
is false. Jobs (relay signed swaps for their fee): /docs/integrations/agent-jobs.
At 15% impact, unread impact or a look-alike token no answer is `ok`; `hookr_build_swap`'s `accept` builds it anyway.

## Safety checks

1. Quote before every swap, with a real minimum out; stop at 15% impact.
2. Read the launch guard and every Hook Block before trading a new token.
3. Never sign what the simulation did not pass.
4. Figures are one block's read; re-read before relying on them.

Full docs: /docs and /llms.txt. Source and review: https://github.com/Hookr-fun/hookr-contracts.
