Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0xe2a79e73df563b45df5c98ec1e4a103e00789880 on Robinhood Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $812
- Pools using this hook
- 13
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 15
What it does
A Uniswap v4 hook that applies an owner-configurable dynamic swap fee, can pause trading, and restricts liquidity provision to a whitelist.
How it works step by step
- Sets a dynamic swap fee for pools through a beforeSwap fee override
- Stores a packed fee configuration in storage and exposes it through feeConfig and configOf
- Allows the owner to pause swaps through setPaused
- Restricts adding liquidity to whitelisted addresses in beforeAddLiquidity
- Counts swaps per pool through swapCount
- Records pool configuration at initialization in afterInitialize
- Swap behaviour
- beforeSwap checks the pause flag, computes an overridden dynamic fee from stored configuration, and increments a per-pool swap counter.
- Liquidity behaviour
- beforeAddLiquidity checks whether the sender is whitelisted and may revert otherwise, gating who can add liquidity. No remove-liquidity logic beyond the default hook stub is apparent.
- Fee behaviour
- Fee is set dynamically by the hook: the beforeSwap path reads a fee configuration packed into storage slot 1 (several uint24 and uint16 fields) and per-pool configuration from mapping slot 6, and returns an override fee for the pool. Owner-controlled setters write these fee parameters. Exact fee formula could not be determined from bytecode alone.
- Owner & admin controls
- Owner (slot 0) can pause and unpause swaps via setPaused, whitelist addresses via setWhitelisted, set a gas threshold via setGasThreshold, set fee configuration via the 0x65a08c0e and 0xa21725ef setters, set per-pool configuration via 0x66f47293 and 0x8963ee0d, set the static fee via 0x24fee4cc, and transfer ownership via transferOwnership. Ownership is a single address with no timelock or multisig detected.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, beforeSwap
afterInitialize records pool-level configuration on pool creation. beforeAddLiquidity restricts liquidity provision to whitelisted addresses. beforeSwap computes and applies the dynamic fee override, checks the pause flag, and increments a per-pool swap counter.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner can pause all swaps, change fee parameters including the fee level, whitelist or remove addresses from liquidity provision, and transfer control of the hook to any address. A compromised owner key could raise fees to punitive levels or halt trading.
Risk to user funds: The hook does not appear to take custody of tokens or return deltas, so it does not hold user funds directly. It can block swaps through the pause flag and can block liquidity additions through the whitelist, and its fee logic determines how much swappers pay.
Security findings
- [medium] Owner-adjustable dynamic fee: The owner can call the fee configuration setters to change the fee parameters used in beforeSwap. Bounds are enforced by an FeeTooHigh error in the bytecode, but the cap value could not be verified.
- [medium] Owner can pause swaps: setPaused flips a boolean read by beforeSwap, so the owner can halt all swaps in the pool at any time.
- [info] Whitelist-gated liquidity provision: beforeAddLiquidity reverts for non-whitelisted senders, so only the owner-approved set can add liquidity.
- [low] Single-step ownership transfer: Ownership is a single slot with transferOwnership and no two-step acceptance pattern was detected; a mistaken transfer would be irreversible.
Contract details
- Verified source
- No
- Bytecode size
- 7,910 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable, pausable
Pools using Dynamic fee hook
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / MICRODOG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- DJT / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- DJT / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / HIMS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- DJT / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- DJT / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- DJT / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today