Dynamic fee hook on Base
Uniswap v4 Hook Contract 0x201fbd2839bec513040024b37dae97b401e96acc on Base · 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 unverified hook charges per-address swap fees of unconfirmed size through return deltas, routes them to a collector, and lets a governor or guardian pause trading, so some traders may pay more than others.
How it works step by step
- Serves a single registered pool for one token paired against a base asset, using a fixed pool fee and tick spacing.
- Charges per-address swap fees, stored per account as a fee level with a scheduled update time, using a fee calculator and collector contract.
- Checks liquidity adds and removals against pool registration and possibly a minimum protocol depth, and reads an external capital oracle.
- A governor or guardian can pause trading, and fee changes appear to go through an update delay.
- Swap behaviour
- Swaps are checked against a trading-paused flag and registration state, and the hook can take a fee from swap amounts through return deltas. The fee is looked up per address and recorded with an external collector, but exact rates cannot be confirmed from bytecode.
- Liquidity behaviour
- Adding and removing liquidity both run hook checks that read the registration and paused state, so withdrawals could revert under some conditions. The exact conditions, such as whether a pause or minimum depth check blocks removals, cannot be confirmed from bytecode.
- Fee behaviour
- Per-address fee levels are stored as 16-bit values (likely basis points, so up to about 655%), with scheduled effective times and a fee update delay. Fees appear to be sent to a collector contract, but the exact rates and caps are unknown.
- Owner & admin controls
- A governor and guardian appear able to pause trading and set per-address fee values with a delay. Caps on these fee values could not be verified.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: restricts pool setup to the canonical pool; beforeAddLiquidity: gates deposits; beforeRemoveLiquidity: runs checks on withdrawals; beforeSwap: enforces pause and computes fee; afterSwap: settles fee after the swap; beforeSwapReturnDelta/afterSwapReturnDelta: take fee tokens from swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A governor and guardian hold control over pausing and fee settings, and changes are subject to an update delay. Their exact limits are unknown without verified source.
Risk to user funds: The hook can deduct fees from swap input or output through return deltas, at rates that cannot be confirmed from bytecode. LP withdrawals pass through a hook check whose blocking conditions are unverified.
Security findings
- [medium] Trading pause switch: A privileged function toggles a trading-paused flag that the swap callback checks, so swaps can be halted.
- [medium] Withdrawal callback enabled: beforeRemoveLiquidity runs on every withdrawal and reads the pool state. Whether it can block LP exits cannot be confirmed from bytecode.
- [medium] Unverified fee caps: Return-delta fees are driven by per-address 16-bit fee settings whose maximum could not be verified.
Contract details
- Verified source
- No
- Bytecode size
- 13,929 bytes
- Upgradeable proxy
- No
- Detected patterns
- oracle, return-delta
Pools using Dynamic fee hook
- USDC / NARA (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today