RealmHook on Robinhood Chain
Uniswap v4 Hook Contract 0xae4c0cf7c3feb79e0c244edbc6a3f8a3290940cc on Robinhood Chain · Launchpad · Verified contract
- Volume (24h)
- $9.80K
- Value locked (TVL)
- $1.26K
- All-time volume
- $160.67K
- Pools using this hook
- 278
- Swaps (24h)
- 190 (81 traders)
- Total swaps
- 2,276
What it does
A swap hook for Realm launchpad tokens that charges an LP fee and a time-limited buy/sell tax in ETH on trades after graduation, routing LP fees to a fee router and taxes to the token's fee receivers.
How it works step by step
- Blocks swaps on tokens that have not yet graduated from the launchpad
- Charges an ETH-side fee on every buy and sell, split into an LP fee and a creator tax
- Withholds fees in beforeSwap for exact-input buys and exact-output sells, and in afterSwap for the other two legs
- Forwards LP fees to SwapLpFeeRouter, falling back to the treasury if the router reverts
- Forwards taxes to the token's accrueFees() so its fee receivers are paid
- Emits RealmSwapBuy, RealmSwapSell and RealmPoolState events for indexing; the RealmHook variant also emits post-swap price and liquidity
- Swap behaviour
- Graduated tokens only; swaps on non-graduated tokens revert. Each swap leg withholds its combined LP fee plus tax (capped at 20%) on the ETH side, in beforeSwap or afterSwap depending on whether the ETH amount is known at that point. Exact-output legs are grossed up so the swapper still receives the requested amount.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Each swap leg charges an LP fee plus a time-limited buy/sell tax on the ETH side, with the combined rate capped at 20% (MAX_OVERALL_FEE_BPS = 2000). Exact-input buys and exact-output sells are charged in beforeSwap; exact-output buys and exact-input sells are charged in afterSwap. LP fees go to SwapLpFeeRouter (with fallback to treasury); taxes go to the token via accrueFees().
- Owner & admin controls
- No owner or admin role on the hook; it is ownerless and immutable. Router and treasury addresses are fixed at construction. Fee rates are set per token via IRealmToken.getSwapFees, outside this hook's control.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: enforces graduation and withholds fees on exact-input buys and exact-output sells. afterSwap: settles fees on the remaining legs and routes LP fees and taxes. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a fee slice out of the swap amounts.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key on the hook. Trust sits in the external contracts it calls: the FEE_ROUTER (an upgradeable UUPS proxy per the source comments) and each token's getSwapFees/accrueFees logic, which set rates and fee distribution.
Risk to user funds: The hook takes fee slices of ETH from swaps and forwards them immediately to the router, treasury, or token. It holds ETH only transiently within a swap. It cannot block swaps for non-graduated tokens (it reverts those by design) but cannot pause or freeze a pool. Exposure to user funds is bounded by the per-leg fee cap and the trust placed in the router and token contracts.
Security findings
- [info] Hook takes currency via return deltas: The hook calls poolManager.take and transfers ETH to the router, token, and treasury. Fees are taken from swap deltas, so the hook can hold ETH transiently during a swap.
- [medium] Upgradeable router receives LP fees: The LP fee is forwarded to an upgradeable router proxy. A malicious or buggy upgrade could redirect or trap fees; the fallback sends the LP fee to the treasury only on router revert.
- [medium] Token-controlled fee rates up to 20%: Per-token fee rates come from IRealmToken.getSwapFees. Each token can set lpFeeBps and taxBps up to a combined 20% per leg, so swappers on a given token can face up to 20% in fees.
- [low] Stranded ETH and no rescue path: The hook is trusted only to pair currency0 with native ETH, enforced by UnexpectedPoolCurrency, and to only operate on graduated tokens. ETH left in the contract is accepted as stuck with no rescue path.
Contract details
- Verified source
- Yes (RealmHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 7,010 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, moves-currency, return-delta, tax
Pools using RealmHook
- ETH / BENJI (1.00% fee) — 24h volume $6.38K, TVL $52, 97 swaps today
- ETH / RDSTR (1.00% fee) — 24h volume $2.62K, TVL $0.29, 38 swaps today
- ETH / test (1.00% fee) — 24h volume $339, TVL $0.16, 29 swaps today
- ETH / COMS (1.00% fee) — 24h volume $170, TVL $0.82, 2 swaps today
- ETH / MEEKO (1.00% fee) — 24h volume $56, TVL $0.27, 2 swaps today
- ETH / HOODCATE (1.00% fee) — 24h volume $56, TVL $0.27, 2 swaps today
- ETH / CUE (1.00% fee) — 24h volume $56, TVL $0.27, 2 swaps today
- ETH / VLAD (1.00% fee) — 24h volume $28, TVL $0.14, 2 swaps today
- ETH / VIH (1.00% fee) — 24h volume $28, TVL $0.14, 2 swaps today
- ETH / RCS (1.00% fee) — 24h volume $17, TVL $0.08, 2 swaps today
- ETH / BLUEFROG (1.00% fee) — 24h volume $17, TVL $0.08, 2 swaps today
- ETH / VANAR (1.00% fee) — 24h volume $11, TVL $0.05, 2 swaps today
- ETH / HAMMER (1.00% fee) — 24h volume $6.69, TVL $32, 2 swaps today
- ETH / RDOG (1.00% fee) — 24h volume $5.52, TVL $0.03, 2 swaps today
- ETH / RCAT (1.00% fee) — 24h volume $0.22, TVL $401, 1 swaps today
- ETH / REALCAT (1.00% fee) — 24h volume $0.15, TVL $0.04, 1 swaps today
- ETH / RLMCAT (1.00% fee) — 24h volume $0.14, TVL $114, 1 swaps today
- ETH / BAGS (1.00% fee) — 24h volume $0.08, TVL $0.19, 1 swaps today
- ETH / RCAT (1.00% fee) — 24h volume $0, TVL $87, 0 swaps today
- ETH / REALM (1.00% fee) — 24h volume $0, TVL $484, 0 swaps today