Dynamic fee hook on Robinhood Chain
Uniswap v4 Hook Contract 0x3b0dbf4e9dd18ac50e1988e857bbf638a57d6080 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 charges a dynamic swap fee that decays over time and can be adjusted separately for buys and sells by the owner, so trade costs depend on the direction and the fee level at the moment of the swap.
How it works step by step
- Sets a separate buy fee and sell fee for the pool, with a fee setter controlled by the owner
- Charges a fee that decays over time from an initial value toward a base level, using a half-life parameter (HALF_LIFE, decayStart, INITIAL_FEE)
- Computes the active fee for a swap direction through currentFee(bool), which the pool uses when the hook overrides the fee
- Enforces a maximum owner-settable fee (MAX_OWNER_FEE) and reverts with FeeTooHigh when exceeded
- Uses two-step ownership transfer (requestOwnershipHandover, completeOwnershipHandover) and ownership renounce
- Swap behaviour
- beforeSwap is implemented and returns a fee for the swap direction computed from currentFee; the exact per-direction result depends on the decayed fee at call time and cannot be fully determined from bytecode alone.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses a dynamic fee computed by the hook: separate buy and sell fee values, decaying from INITIAL_FEE over HALF_LIFE, updated by the owner through setFee(bool,uint24) and capped by MAX_OWNER_FEE.
- Owner & admin controls
- Owner can set buy and sell fees via setFee up to MAX_OWNER_FEE, transfer ownership, and renounce ownership; ownership handover is two-step.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap
beforeInitialize is used to set up the pool's initial fee state; beforeSwap is used to return the direction-dependent dynamic fee override.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner key controls fee levels for both trade directions and can renounce or transfer that control; a compromised key could raise fees up to the owner cap on every swap.
Risk to user funds: The hook does not appear to hold or move user tokens; exposure is limited to the fee taken on swaps, which the owner can adjust within the cap.
Security findings
- [medium] Owner-settable swap fee: setFee(bool,uint24) lets the owner change the buy or sell fee at any time, bounded only by MAX_OWNER_FEE, so traders can face higher costs in one direction after a fee change.
- [info] Hook does not move funds directly: The bytecode shows fee-override logic and ownership functions; no return-delta or token transfer selectors were observed in the dispatch table.
- [info] Unverified source: Without verified source, the exact fee formula and decay math cannot be confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 3,963 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, ownable