Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0xe35a363963dd10275fc2c6ae503ba65712830880 on Robinhood Chain · Dynamic fee
- Volume (24h)
- $1.17K
- Value locked (TVL)
- $2.20K
- All-time volume
- $27.61K
- Pools using this hook
- 1
- Swaps (24h)
- 17 (3 traders)
- Total swaps
- 232
What it does
A Uniswap v4 hook that lets the owner set a dynamic swap fee and enable or disable liquidity additions for its pool.
How it works step by step
- Stores an owner-set fee (uint24) and exposes it via currentFee() and dynamicFee().
- Applies the configured fee on swaps through beforeSwap.
- Gates liquidity additions with a liquidityEnabled boolean checked in beforeAddLiquidity.
- Keeps additional packed parameters in storage slots 0 and 1 updated by owner setters.
- Reverts on invalid fee or chance values using InvalidFee and InvalidChance errors.
- Swap behaviour
- beforeSwap reads the owner-configured fee and related parameters and applies them to the swap, with no evidence of token transfers or return deltas taken by the hook.
- Liquidity behaviour
- beforeAddLiquidity checks a liquidityEnabled flag; when disabled it presumably reverts adds. beforeRemoveLiquidity and afterRemoveLiquidity/afterAddLiquidity are present but appear to be pass-through stubs. No liquidity is taken by the hook.
- Fee behaviour
- Fee is a owner-settable uint24 stored in slot 0 (setFee) and exposed via currentFee() and dynamicFee(); the swap callback reads these values to determine the fee applied, with errors InvalidFee() present, suggesting bounds checking on fee values.
- Owner & admin controls
- Owner (storage slot 0, address) can call setFee(uint24), setLiquidityEnabled(bool), and a function taking (uint24,uint16) and another taking (uint32,uint32,uint32) that write packed parameters in slots 0 and 1; owner() is exposed. No pause or upgrade mechanism identified beyond the liquidity toggle.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap
beforeAddLiquidity: gates liquidity additions using the owner-controlled liquidityEnabled flag. beforeSwap: reads the owner-set fee and chance-related parameters to set the swap fee override for the pool.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner can set arbitrary fee values within validation bounds, toggle liquidity additions on or off for the pool, and reconfigure the packed parameters that affect swap behaviour, so a compromised key could raise fees sharply or block new deposits.
Risk to user funds: The hook does not appear to custody or transfer user tokens directly; its main impact is on pricing through the fee and on whether liquidity can be added, so exposure is indirect.
Security findings
- [medium] Owner-controlled swap fee: setFee(uint24) lets the owner change the swap fee at any time; the bound check (InvalidFee) cannot be verified without source, so the maximum achievable fee is unknown.
- [low] Owner can disable liquidity additions: setLiquidityEnabled(bool) lets the owner stop new liquidity from being added to the pool while swaps keep working.
- [info] Unclear chance-based logic: Selectors for InvalidChance() and multiple config setters suggest a randomised or probabilistic element whose logic cannot be fully decoded here.
- [info] No upgrade path found: No proxy or upgrade selectors were identified, so the hook appears immutable once deployed, but ownership can be transferred via owner-controlled functions if present.
Contract details
- Verified source
- No
- Bytecode size
- 4,508 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable
Pools using Dynamic fee hook
- SPY / USDG (Dynamic fee) — 24h volume $1.17K, TVL $2.20K, 17 swaps today