Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0x6c13bb6046d162ddc0114f1fdb3612945def1fc0 on Robinhood Chain · Dynamic fee
- Volume (24h)
- $0.04
- Value locked (TVL)
- $9.98
- All-time volume
- $0.04
- Pools using this hook
- 1
- Swaps (24h)
- 4 (1 traders)
- Total swaps
- 4
What it does
This hook sets a dynamic LP fee for each pool and recomputes it on swaps, so the fee you pay depends on the pool's stored state rather than a fixed rate.
How it works step by step
- Sets a dynamic LP fee for the pool through a previewFee function that takes the pool key and swap direction and returns a fee value
- Tracks per-pool state in a single mapping keyed by uint256, written during afterInitialize and read on swap and liquidity callbacks
- Calls updateDynamicLPFee on the pool manager, indicating it pushes a fee value into the pool after initialization
- Exposes a PROTECTION_DURATION constant and a getState view, suggesting a time-limited protection window tied to pool initialization
- Implements liquidity add and remove hooks before and after modifications, plus donate hooks in the view path
- Swap behaviour
- beforeSwap and afterSwap are implemented; beforeSwap is non-view and reads a fee via previewFee to determine the swap fee. The exact direction-dependent fee logic cannot be fully determined from decoded bytecode.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are all implemented; the decoded view signatures indicate they only read state and do not return deltas or take custody of tokens.
- Fee behaviour
- The hook sets a dynamic LP fee through updateDynamicLPFee and computes it with previewFee, which takes the pool key and a swap direction flag and returns a uint24 fee; the fee is recomputed from stored per-pool state.
- Owner & admin controls
- No owner, pause or upgrade functions were identified in the decoded selectors; parameter changes cannot be confirmed without source.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap
afterInitialize records pool state and sets the initial dynamic fee; beforeSwap and afterSwap run fee-related logic around swaps; liquidity callbacks observe or gate add and remove actions without modifying deltas.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: No owner or admin selector was found, so no single key is evident in the decoded bytecode; this should be re-checked against verified source.
Risk to user funds: Liquidity callbacks return no deltas and the decoded signatures show no token transfer or custody functions, so the hook does not appear to hold funds, though fee logic can change the cost of every swap.
Security findings
- [medium] Unverified source: Without verified source the exact fee formula and any privileged paths cannot be fully confirmed from bytecode alone.
- [info] Dynamic fee updates via pool manager: The hook calls updateDynamicLPFee, so the fee it computes is applied directly to the pool; a flawed fee formula would affect all swappers in that pool.
- [info] Protection window constant: PROTECTION_DURATION suggests a time-limited window after initialization during which fee or swap behaviour may differ.
Contract details
- Verified source
- No
- Bytecode size
- 13,874 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee
Pools using Dynamic fee hook
- USDG / FRONG (Dynamic fee) — 24h volume $0.04, TVL $9.98, 4 swaps today