Token hook on Base
Uniswap v4 Hook Contract 0x592c03e0bcff0284f97d2cd5adfe3193222b60cc on Base · Token
- Volume (24h)
- $18.98K
- Value locked (TVL)
- $0
- All-time volume
- $18.98K
- Pools using this hook
- 1
- Swaps (24h)
- 99 (77 traders)
- Total swaps
- 99
What it does
A token launch hook that charges owner-set buy and sell fees (up to a built-in cap) on swaps, sends them to a fee receiver, and lets admins pause trading or blacklist traders, while LPs can always withdraw freely.
How it works step by step
- Charges separate buy and sell fees on swaps of a specific token's pool, with the fee rates stored by the owner and capped by a built-in fee cap constant (exact value not readable from bytecode).
- Blocks swaps until the owner or operator turns trading on, and only allows a whitelisted pool to be initialized.
- Lets the owner or operator blacklist addresses, which can stop those traders from swapping.
- Collects fees from swaps and sends them to a fee receiver, holding them as parked fees when they cannot be paid out right away. Anyone can later trigger settlement of parked fees.
- Includes emergency functions that let admins withdraw ETH, ERC20 tokens or NFTs held by the hook contract itself.
- Swap behaviour
- Swaps revert if trading is not yet enabled or the trader is blacklisted. When swaps go through, the hook takes a buy or sell fee from the swap amounts and forwards it to the fee receiver.
- Liquidity behaviour
- No liquidity callbacks are enabled, so LPs can add and withdraw freely and the hook cannot block or charge withdrawals.
- Fee behaviour
- Separate buy and sell fee rates are set by the owner through updateFees, limited by a hard-coded fee cap whose exact percentage cannot be confirmed from bytecode. Fees can be disabled, and collected fees go to an admin-set fee receiver.
- Owner & admin controls
- The owner and operator can enable or disable trading, blacklist or unblacklist traders, change buy and sell fees up to the built-in cap, disable fees, change the fee receiver and operator, grant access, and withdraw tokens 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 blacklist and can take the buy fee; afterSwap takes the sell fee and pays or parks it; the swap return-delta permissions let the hook deduct those fees from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner and an operator hold control over trading on/off, blacklists, fee rates within the cap, and the fee receiver. At worst they can halt swaps or block specific traders from selling.
Risk to user funds: The hook can deduct the configured buy or sell fee from swaps, up to an unverified cap, and emergency-withdraw only funds sitting in the hook itself. LP principal in the PoolManager cannot be locked or drained.
Security findings
- [medium] Admin can pause trading: The owner or operator can turn trading off, causing all swaps to revert with TradingNotOpen.
- [medium] Trader blacklist: Admins can blacklist addresses, which may prevent specific users from swapping, including selling.
- [low] Adjustable fees with unverified cap: Buy and sell fees can be changed by the owner up to a fee cap constant; the exact cap is not visible without verified source.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook can never block or charge LP withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 8,312 bytes
- Upgradeable proxy
- No
- Detected patterns
- access-control, dynamic-fee, erc20, liquidity-management, moves-currency, ownable, return-delta, self-unlock
Pools using Token hook
- ETH / CARDI (0.00% fee) — 24h volume $18.98K, TVL $0, 99 swaps today