Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0x26ba8a6ca4028df9c655072f63bc316475542ac4 on Robinhood Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook charges swappers an owner-set surcharge that differs between market-open and market-closed periods and sends it to a treasury, while LPs pay no fee but have their adds and withdrawals tracked by the hook.
How it works step by step
- Adds an extra surcharge to swaps, taken from the swap through the hook's return-delta permission and sent to a treasury address.
- The surcharge uses one of two rates, an 'open' rate and a 'closed' rate, which suggests a market-hours calendar (for example stock-linked tokens trading outside market hours).
- Pools must be registered at initialization and appear tied to a per-token price feed ('stockFeed') set by the owner.
- Tracks liquidity adds and removals per pool and position in its own records; it runs on withdrawals, but no withdrawal fee is possible because liquidity return deltas are disabled.
- The owner can change the two surcharge rates (subject to a MAX_SURCHARGE_BPS constant whose value is not visible) and the treasury address.
- Swap behaviour
- Before and after each swap the hook checks whether the pool is registered and records per-pool timing data, then takes a surcharge (open or closed rate) from the swap and sends it to the treasury. Exact rates and the calendar logic cannot be read from bytecode.
- Liquidity behaviour
- The hook runs before adds and removals and stores per-position data. It cannot deduct LP tokens. Because the remove hook is enabled, it could revert withdrawals under some condition, but no such gating is clearly visible.
- Fee behaviour
- An extra surcharge in basis points applies on top of the pool fee, with separate open-hours and closed-hours rates. It is capped by a MAX_SURCHARGE_BPS constant of unknown value and paid to the treasury.
- Owner & admin controls
- The owner (two-step ownership transfer) can set the open and closed surcharge rates up to MAX_SURCHARGE_BPS, change the treasury address, and set price feeds for tokens. The cap's exact value is unknown from bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta
beforeInitialize: registers allowed pools and links feeds; beforeAddLiquidity: records position data; beforeRemoveLiquidity: records position data on withdrawal; beforeSwap: records per-pool timing or state; afterSwap: computes the surcharge and records state; afterSwapReturnDelta: takes the surcharge from the swap for the treasury.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A single owner controls the surcharge rates (within an unverified cap), the treasury recipient, and the token feed mappings.
Risk to user funds: Swappers pay a surcharge taken through the return delta, up to an unknown MAX_SURCHARGE_BPS cap. LP principal cannot be deducted, but withdrawals pass through a hook callback that has not been verified.
Security findings
- [medium] Owner-adjustable swap surcharge: setRates lets the owner change the open and closed surcharge rates. A MAX_SURCHARGE_BPS cap exists, but its value cannot be confirmed from unverified bytecode.
- [low] Hook runs on withdrawals: beforeRemoveLiquidity is enabled and writes position data. No fee can be charged on withdrawals, but any revert path in it could not be ruled out without source code.
- [info] Not a proxy: The contract is a direct deployment and cannot be upgraded.
Contract details
- Verified source
- No
- Bytecode size
- 11,065 bytes
- Upgradeable proxy
- No
- Detected patterns
- liquidity-management, moves-currency, ownable, return-delta
Pools using Dynamic fee hook
- USDG / MSTR (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDG / COIN (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today