ZeroRWAHook on Robinhood Chain
Uniswap v4 Hook Contract 0xecad6eb41f714ee7c733afc21e0fbe80d1eec0cc on Robinhood Chain · Dynamic fee · Verified contract
- Volume (24h)
- $371
- Value locked (TVL)
- $375
- All-time volume
- $563
- Pools using this hook
- 3
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 35
What it does
A Uniswap v4 hook that charges a per-token swap fee on ETH-paired pools and routes the fee to the token creator and the protocol.
This read was written for the hook 0x4717…c0cc on Robinhood Chain and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Stores a per-token fee in basis points, set once at token launch from owner-allowed tiers
- Takes the fee in ETH (currency0) on both exact-input and exact-output swaps using beforeSwap and afterSwap return deltas
- Sends the taken ETH to the factory through poolManager.take and calls depositFees
- Factory splits fees 90% to the token creator and 10% to the protocol, or 100% to the protocol if the creator has renounced fees
- Owner manages the set of allowed fee tiers and the one-time factory address
- Swap behaviour
- On swaps where ETH is the input or output, the hook takes a fee in ETH through return deltas, sends it to the factory, and records it for distribution. Swaps with zero fee or unrecognized direction return zero deltas.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Per-token fee in bps stored in tokenFeeBps keyed by the non-ETH token (currency1). Set once by the factory at launch from owner-allowed tiers (default 1% to 10%). Fee is taken as a delta on swaps in currency0 (ETH) and sent to the factory via poolManager.take, then recorded through depositFees, which splits 90% to the creator and 10% to the protocol unless creator fees are renounced, in which case the protocol keeps the whole amount. Reverts with TokenNotRegistered if a swap is for a token without a configured fee.
- Owner & admin controls
- Owner (Ownable) can set allowed fee tiers via setFeeAllowed (100 to 9900 bps range), set the factory address once via setFactory, transfer or renounce ownership. Factory can set per-token fees via setTokenFee (once per token, from an allowed tier) and setRenouncedFee (drops token fee to RENOUNCED_FEE_BPS=10). No pause or upgrade mechanism found in the decoded ABI.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: takes the fee on exact-input ETH-to-token or exact-output token-to-ETH swaps and returns a specified-token delta. afterSwap: takes the fee on the opposite swap directions using the realized delta and returns an unspecified-token delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a share of the swap amounts as fees.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, high confidence).
Who controls it: The owner cannot directly seize user funds, but can change which fee tiers are allowed for future launches and can transfer or renounce ownership. The factory (which the owner can set once) controls per-token fee assignment and can route fees; a compromised factory or owner key could set fees to the maximum allowed tier (99%) for new tokens and direct protocol revenue. Owner can also change the factory only once, so the factory choice is effectively permanent.
Risk to user funds: The hook can take a fee in ETH from every swap on registered tokens, paid to the factory. It cannot freeze or move LP principal directly and has no pause. Users are exposed to whatever fee tier was set at launch, up to the owner-enabled maximum, and to any change in the factory.
Security findings
- [medium] Hook takes ETH on swaps via return deltas: Fee is taken by poolManager.take to the factory address on every qualifying swap, meaning the hook moves real ETH out of the pool. Fee amounts are fixed at launch but the owner can add higher tiers via setFeeAllowed.
- [medium] Owner can enable very high fee tiers for new launches: setFeeAllowed permits any fee from 0.01% to 99.99% with no cap on the upper bound beyond below 100%, and owner can enable any tier. Fees set for a token are fixed once assigned, which limits post-launch abuse for existing tokens but not for new launches.
- [low] Factory address is set once and immutable: The factory address is set once through setFactory and cannot be changed afterwards; if set to a faulty contract, fee deposits and token fee assignment would be affected permanently.
- [info] Two fee calculation paths may stack: afterSwap computes fees on the realized delta in a branch that can differ from beforeSwap, so the two hooks can both charge a fee on some paths; the exact combined fee depends on the swap path and is not fully verified here.
Contract details
- Verified source
- Yes (ZeroRWAHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 7,125 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, ownable, return-delta
Pools using ZeroRWAHook
- SPY / CHART (0.00% fee) — 24h volume $371, TVL $375, 1 swaps today
- NVDA / AI (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- SPCX / ASTEROID (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today