Dynamic fee hook on Arbitrum
Uniswap v4 Hook Contract 0x2324835cd31dca5fd2d469e0b18b447bbd3fd088 on Arbitrum · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 20
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A dynamic-fee hook that sets a per-pool fee rate at pool initialization and overrides the swap fee in beforeSwap, with an owner-adjustable default and per-pool rates, and a fee receiver address.
How it works step by step
- afterInitialize registers the pool in the hook's storage, and a mapping of pool ids records which pools are configured
- beforeSwap looks up the effective fee rate for the pool (per-pool rate if set, otherwise the default) and returns it as an override fee
- setDefaultFeeRate and setPoolFeeRate let the owner change the fee rate globally or for a specific pool
- getEffectiveFeeRate and defaultFeeRate expose the current fee configuration to readers
- setFeeReceiver sets the address that receives collected fees, and the hook can move tokens via take/settle/sync calls to the pool manager
- Lending-protocol selectors (supply, withdraw, depositETH, withdrawETH) and an adminCall function suggest the hook can deposit idle assets into Aave or call arbitrary contracts
- Swap behaviour
- beforeSwap returns a fee override based on the effective fee rate for the pool, and the hook requests a return delta, so it can alter the amounts exchanged on swaps. afterSwap is also present and may act on swap results.
- Liquidity behaviour
- Liquidity add and remove callbacks (before/after) are exposed as view-style handlers that return the selector without modifying state. Liquidity itself is not managed by the hook.
- Fee behaviour
- The hook overrides the swap fee: each pool uses its own fee rate if set, otherwise the global default. Collected fees appear to be routed to feeReceiver, though the exact routing path cannot be confirmed from bytecode alone.
- Owner & admin controls
- The owner can change the default fee rate, set per-pool fee rates, change the fee receiver, call emergencyWithdraw, and execute arbitrary calls through adminCall. Pausing and upgrade mechanisms were not identified in the bytecode.
Enabled Uniswap v4 callbacks
afterInitialize, beforeSwap, beforeSwapReturnDelta
afterInitialize registers each new pool. beforeSwap applies the dynamic fee override and return delta. Other permissions are not enabled.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner key can set every pool's fee, change the fee receiver, withdraw tokens, and run arbitrary calls, so a compromised key could redirect or drain funds held by the hook.
Risk to user funds: The hook can hold tokens (through return-delta settlement and possibly Aave deposits) and can move them via emergencyWithdraw and adminCall, so user and pool funds routed through the hook are exposed to owner action.
Security findings
- [medium] Owner-controlled fee rate: setDefaultFeeRate and setPoolFeeRate allow the owner to change the fee applied to every swap. The bytecode does not show a visible cap, so a fee could be set very high and extract value from traders.
- [high] Arbitrary external call: adminCall(address,bytes,uint256) lets the owner execute arbitrary calldata against any target with any value, which can move any asset the hook holds or controls.
- [high] Emergency withdrawal: emergencyWithdraw(address,address,uint256) can transfer tokens out of the hook to an owner-chosen destination.
- [medium] Hook takes tokens via return delta: beforeSwapReturnDelta is enabled and the bytecode contains take, settle and sync calls, meaning the hook can settle currency with the pool manager and alter swap amounts.
- [info] Lending integration holds funds: Aave supply, withdraw and WETH gateway selectors indicate the hook may deposit idle balances into an external lending pool, adding counterparty and integration risk.
Contract details
- Verified source
- No
- Bytecode size
- 17,117 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Dynamic fee hook
- aArbARB / ARB (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbUSDT / USD₮0 (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- FRAX / aArbFRAX (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / aArbWETH (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ezETH / aArbezETH (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- rsETH / aArbrsETH (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- MAI / aArbMAI (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbEURS / EURS (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbWBTC / WBTC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbDAI / DAI (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbwstETH / wstETH (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- AAVE / aArbAAVE (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- weETH / aArbweETH (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbLINK / LINK (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbtBTC / tBTC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbUSDCn / USDC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- GHO / aArbGHO (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbrETH / rETH (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbUSDC / USDC (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- aArbLUSD / LUSD (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today