Access control hook on Ethereum
Uniswap v4 Hook Contract 0x9d93bbe60c5b50d834c2ed874144d25d85df52cc on Ethereum · Access control
- 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 takes a basis-point fee on swaps through return deltas, credits it to its own accounting, and routes a share to a team wallet, so swappers pay the fee on each trade while liquidity removal is also gated by the hook.
How it works step by step
- Initializes a single pool on afterInitialize and stores the pool id and initialized flag
- Takes a fee on swaps through beforeSwap and afterSwap return deltas, with a BPS-denominated fee constant
- Credits fees to a per-address credits mapping and a totalCredits counter that can be withdrawn later
- Splits accrued value between a team wallet (TEAM_BPS) and a research allocation (RESEARCH_BPS)
- Settles currency with the PoolManager via unlock, take, mint and burn (ERC6909 claims) inside unlockCallback
- Gates liquidity removal in beforeRemoveLiquidity and exposes flush and withdraw helpers
- Swap behaviour
- beforeSwap and afterSwap run on every swap and use return deltas to take a fee denominated in BPS from the swap amount, which is then credited to the hook and partly routed to the team wallet; the exact direction-dependent split could not be fully confirmed from bytecode, so trades in either direction are treated as paying the same fee.
- Liquidity behaviour
- beforeRemoveLiquidity is enabled and gates liquidity removal; no addLiquidity callback is enabled, so adding liquidity is not hooked.
- Fee behaviour
- A hook-level fee in BPS (FEE_BPS) is taken via return deltas on swaps and accrued as credits; a team share (TEAM_BPS) and research share (RESEARCH_BPS) are derived from it. The pool's static fee is POOL_FEE.
- Owner & admin controls
- withdraw(address) and flush() are nonpayable and their access checks could not be fully confirmed from decoded bytecode; teamWallet is a readable address that receives fee share. No explicit owner getter or pause function was decoded.
Enabled Uniswap v4 callbacks
afterInitialize, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize records the pool and initialization state; beforeSwap and afterSwap take fees through return deltas (beforeSwapReturnDelta and afterSwapReturnDelta); beforeRemoveLiquidity gates liquidity removal.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A privileged key that controls withdraw, flush or the team wallet could redirect accrued fee credits; the presence of these controls was inferred from selectors and not confirmed.
Risk to user funds: The hook takes a fee on swaps through return deltas and holds ERC6909 claims and credited balances on the PoolManager, so accrued value sits in hook-controlled accounting and can be withdrawn by its privileged functions.
Security findings
- [medium] Return-delta fee capture: beforeSwap and afterSwap use return deltas to take value from every swap, so the hook can alter the amounts users receive.
- [medium] Currency movement and ERC6909 claims: The hook calls take, mint and burn through unlock and holds claims on the PoolManager, so it can move and custody pool funds.
- [medium] Privileged withdraw and flush: withdraw and flush are nonpayable functions that move accrued credits; their access control could not be confirmed from decoded bytecode.
- [low] Liquidity removal gating: beforeRemoveLiquidity is enabled, so the hook could block or condition LP withdrawals if its logic reverts.
- [info] No source available: Without verified source, admin roles, upgradeability and exact fee direction cannot be fully verified.
Contract details
- Verified source
- No
- Bytecode size
- 8,534 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, return-delta, self-unlock
Pools using Access control hook
- ETH / ROUTR (1.25% fee) — 24h volume $0, TVL $0, 0 swaps today