Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0xf69b19df85120f596cd7513f5baece9f0675b0c4 on Robinhood Chain · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook appears to adjust swap amounts after each trade using a dynamic fee schedule and sends a protocol share to a treasury, but the exact rates and which trade direction pays more could not be determined without source.
How it works step by step
- Records a per-pool state value at initialization (afterInitialize writes a tick-like int24 into storage keyed by pool id).
- Runs beforeSwap and afterSwap logic that reads and updates that stored value, indicating state tracking across swaps.
- Returns a hook delta from afterSwap (afterSwapReturnDelta is enabled), so it can take or give a share of swap amounts.
- Exposes a view stateOf(bytes32) that returns the stored value for a pool.
- Includes protocol share, fee min/max/slope and treasury constants, suggesting a fee schedule that scales with a threshold and a protocol cut of fees.
- Uses ERC6909 claim minting (mint(address,uint256,uint256) is referenced), so it can mint claim tokens for taken amounts instead of transferring them out.
- Swap behaviour
- beforeSwap is non-view and updates storage, and afterSwap can return a delta that adjusts the swap's net amounts. Exact direction-dependent fee effects cannot be confirmed from decoded bytecode alone.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are present as view callbacks and appear to only read state or revert, not to change balances.
- Fee behaviour
- Fees appear to be dynamic, bounded by FEE_MIN/FEE_MAX and scaled by FEE_SLOPE and MAX_THRESHOLD, with a PROTOCOL_SHARE taken to TREASURY. The exact formula cannot be recovered without source.
- Owner & admin controls
- TREASURY and PROTOCOL_SHARE are exposed as constants, so no mutable owner or parameter-change function was found in the dispatch table. No pause or upgrade function was identified.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeSwap, afterSwap, afterSwapReturnDelta
beforeInitialize and afterInitialize set up the per-pool state; beforeSwap updates that state before each swap; afterSwap updates state and returns a delta that changes the swap's net amounts; afterSwapReturnDelta enables that delta; the liquidity and donate callbacks are present as view hooks that do not change state.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: No privileged setter was found, so a key holder appears unable to change fees or the treasury address after deployment. This conclusion depends on the absence of a non-decoded selector.
Risk to user funds: The hook can take value from swaps through its return delta and mint ERC6909 claims for the treasury share. It does not appear to hold a custodial balance, but the taken portion comes from user swap flow.
Security findings
- [medium] Return-delta fee capture: afterSwapReturnDelta is enabled and the bytecode references ERC6909 mint and a return-delta heuristic, so the hook can take a share of swap output. The taken amount is fixed by the bytecode, which could not be fully verified.
- [medium] Unverified source: No verified source is available, so the fee formula, threshold logic and treasury transfer path are inferred from selectors and storage only and could contain behavior not visible here.
- [low] Stateful swap hooks: beforeSwap and afterSwap write to storage keyed by pool id, which is expected for a dynamic fee but means each pool's behavior depends on the stored value.
- [info] No mutable admin found: The dispatch table shows only pure constants for treasury and fee parameters and no setter, owner or upgrade selector, so the parameters appear immutable.
Contract details
- Verified source
- No
- Bytecode size
- 9,728 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, return-delta
Pools using Dynamic fee hook
- ETH / USDG (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today