Token hook on Base
Uniswap v4 Hook Contract 0xfd5b5d7be3c8d3eb3bf39503e9aa67aed84520cc on Base · Token
- Volume (24h)
- $23.44K
- Value locked (TVL)
- $0
- All-time volume
- $23.44K
- Pools using this hook
- 1
- Swaps (24h)
- 198 (53 traders)
- Total swaps
- 198
What it does
A token launch hook that charges admin-adjustable buy and sell fees (capped) sent to a fee receiver, and lets admins pause trading or restrict traders, while LPs can always withdraw freely.
How it works step by step
- Charges a separate buy fee and sell fee on swaps in its allowed pool, taken from the swap amounts and sent to a fee receiver address.
- Blocks trading until the owner or operator switches trading on, so swaps revert before launch.
- Keeps a restricted-address list and an authorized-access list managed by the owner/operator, which can gate who trades.
- Fees that cannot be paid out right away are parked and settled later through a separate function.
- Includes emergency withdrawal functions that let the admin pull ETH, ERC20 tokens or NFTs held by the hook contract.
- Swap behaviour
- Swaps revert until trading is enabled, and restricted addresses may be blocked. While trading is open, the hook takes a buy or sell fee from the swap amounts using return deltas, capped by a hard-coded fee cap whose exact value is not readable from bytecode.
- Liquidity behaviour
- No liquidity callbacks are enabled, so LPs can add and withdraw freely and the hook can never block withdrawals.
- Fee behaviour
- Separate buy and sell fees (stored in basis points) are deducted from swaps and sent to a fee receiver, with unsettled amounts parked for later settlement. The owner/operator can update the fees up to a built-in fee cap (exact cap unknown from bytecode) or disable them entirely.
- Owner & admin controls
- Owner and operator can enable or disable trading, change buy/sell fees up to the fee cap, disable fees, change the fee receiver, grant/revoke access, restrict or unrestrict users, and emergency-withdraw any assets held by the hook. Ownership uses a two-step transfer and can be renounced.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts which pool can use the hook; beforeSwap checks trading status and restrictions and can take fees; afterSwap collects fees and forwards them; beforeSwapReturnDelta and afterSwapReturnDelta let the hook deduct its fee from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: An owner and an operator control trading status, fees, trader restrictions and emergency withdrawals. The worst they can do is stop or selectively block trading and raise fees up to the cap, but not touch LP positions.
Risk to user funds: The hook can deduct its buy/sell fee from traders' swap amounts, up to an unverified fee cap, and admins can withdraw assets sitting in the hook such as parked fees. LP principal in the PoolManager cannot be locked or drained.
Security findings
- [medium] Admin can halt trading: The trading switch can be turned off by the owner/operator, making all swaps revert.
- [medium] Trader restriction list: Admins can mark addresses as restricted, which may prevent them from trading, creating possible selective blocking.
- [medium] Adjustable swap fees with unverified cap: Buy and sell fees can be changed up to a hard-coded cap that cannot be confirmed from bytecode.
- [info] LP withdrawals unaffected: Remove-liquidity callbacks are disabled, so LPs can always withdraw.
Contract details
- Verified source
- No
- Bytecode size
- 8,672 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, moves-currency, ownable, return-delta, self-unlock
Pools using Token hook
- ETH / EXECLANT (0.00% fee) — 24h volume $23.44K, TVL $0, 198 swaps today