Token hook on Ethereum
Uniswap v4 Hook Contract 0xbe901fb9cb0da1a5387bd9778efa96721048a0cc on Ethereum · Token
- Volume (24h)
- $496
- Value locked (TVL)
- $0
- All-time volume
- $496
- Pools using this hook
- 1
- Swaps (24h)
- 7 (4 traders)
- Total swaps
- 7
What it does
A token tax hook that takes owner-adjustable buy and sell taxes (capped by an unverified maximum) from swaps and sends them to a tax recipient, while leaving LP deposits and withdrawals untouched.
How it works step by step
- Charges a buy tax and a sell tax on swaps in a single token's pool, taken directly from swap amounts.
- Tracks the total tax collected and lets the collected tax be swept to a tax recipient address.
- Only allows one pool to be initialized with the hook, which is tied to a specific token.
- Appears to check the token's tradingEnabled() flag, so swaps may be blocked until trading is turned on.
- The owner can update the tax rates and the tax recipient, with a MAX_TAX_BPS constant present as a cap.
- Swap behaviour
- On each swap the hook takes a buy or sell tax from the swap amounts using return deltas and pulls it out of the pool manager. Swaps may revert if the token reports trading is not yet enabled.
- Liquidity behaviour
- No liquidity callbacks are enabled; LPs can add and withdraw freely.
- Fee behaviour
- Separate buy and sell tax rates in basis points are applied on top of the pool's swap fee and sent to the tax recipient. The rates are adjustable by the owner up to a MAX_TAX_BPS cap whose exact value cannot be read from bytecode.
- Owner & admin controls
- The owner can change the buy and sell tax rates (capped by MAX_TAX_BPS, exact value unknown) and change the tax recipient. Trading enablement appears controlled by the token contract's owner.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: locks the hook to a single pool for its token; beforeSwap: checks trading status and may take tax on the input side; afterSwap: takes tax on the output side; beforeSwapReturnDelta/afterSwapReturnDelta: let the hook deduct the tax from swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner controls tax rates and the tax recipient address. The worst case is raising taxes to the unknown MAX_TAX_BPS cap or redirecting tax income.
Risk to user funds: The hook takes a percentage of traders' swap amounts as tax, bounded by an unverified MAX_TAX_BPS cap. LP principal cannot be locked or drained.
Security findings
- [medium] Adjustable buy/sell taxes: The owner can change buy and sell taxes taken from swaps via return deltas; a MAX_TAX_BPS cap exists but its value is not verifiable from bytecode.
- [low] Trading gate: Swaps appear to depend on the token's tradingEnabled() flag, so trading can be blocked before launch.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook cannot block or tax LP withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 6,923 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, tax
Pools using Token hook
- ETH / TG (0.00% fee) — 24h volume $496, TVL $0, 7 swaps today