Dynamic fee hook on Ethereum
Uniswap v4 Hook Contract 0x0d632a51eead86db6527b24e0afe3bd4cf848888 on Ethereum · Dynamic fee
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 2 (2 traders)
- Total swaps
- 2
What it does
This hook can take or supply tokens during swaps through its return delta, so whether trades pay more or less depends on logic not visible in the decoded bytecode.
How it works step by step
- Exposes a beforeAddLiquidity callback that is a view function and does not modify liquidity or fees in the decoded logic
- Exposes a beforeSwap callback that is nonpayable and calls the pool manager's take and swap selectors, indicating it can settle currency movements during a swap
- Uses beforeSwapReturnDelta, so the value returned from beforeSwap can alter the net amounts the pool settles for the swap, letting the hook take or supply tokens
- Stores an owner address in slot 0 and a mapping from a uint256 key to an address in slot 1, where a routes(bytes32) view reads that mapping
- Provides a setOwner(address) function and a 12-argument nonpayable function (selector 0x13fb8180) that writes the routes mapping, likely to register pool-to-route mappings
- Derives a pool id from the PoolKey via a pure poolId function
- Swap behaviour
- beforeSwap is nonpayable and calls take and swap on the pool manager selectors, and beforeSwapReturnDelta is enabled, so the hook can take or supply currency and change the swap's net settlement; the exact trade routing and which swaps pay more or less cannot be determined from decoded bytecode alone.
- Liquidity behaviour
- beforeAddLiquidity is a view function that appears to only read state and is not expected to block or alter liquidity additions; no removal callback is enabled.
- Fee behaviour
- No dynamic fee callback is enabled; fee handling is not determinable from decoded bytecode, and any fee or delta adjustment would have to come through beforeSwapReturnDelta.
- Owner & admin controls
- An owner address stored in slot 0 can call setOwner to transfer ownership; the owner also reads from the routes mapping setup, and no pause or upgrade mechanism was identified in the decoded functions.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeAddLiquidity is used to observe or gate liquidity additions; beforeSwap is used to run custom logic and route currency during swaps; beforeSwapReturnDelta lets the hook return a delta that changes how much the swap settles.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single owner key can change ownership and likely configure routes that the hook uses during swaps, so a compromised or malicious owner could alter how swap currency is settled.
Risk to user funds: The hook can take and supply currency during beforeSwap through return deltas and manager calls, so it can hold or move pool and user funds during swaps; the exact extent depends on logic not visible in decoded bytecode.
Security findings
- [high] Return delta with currency movement: beforeSwapReturnDelta is enabled and beforeSwap calls take and swap selectors, so the hook can move tokens and alter swap settlement, which could extract value from swappers or LPs depending on the logic.
- [medium] Owner can transfer control: setOwner(address) lets the current owner reassign ownership with no visible timelock or two-step confirmation in the decoded code.
- [medium] Owner-configured routing: The 12-argument function writes into the routes mapping, so a privileged party may be able to redirect or configure pool routing, though the exact effect is not confirmed without source.
- [info] Unverified source: No verified source is available, so the precise logic inside beforeSwap and the routes configuration could not be fully checked.
Contract details
- Verified source
- No
- Bytecode size
- 5,045 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta
Pools using Dynamic fee hook
- ETH / USDC (0.01% fee) — 24h volume $0, TVL $0, 2 swaps today