Token hook on Ethereum
Uniswap v4 Hook Contract 0x87515105e1b68e1bf254aadbb4be3996814ea8cc on Ethereum · Token
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 68 (21 traders)
- Total swaps
- 68
What it does
This hook taxes swaps through its return deltas, using stored buy and sell tax rates set at deployment, with the owner able to lower the buy tax.
How it works step by step
- Hook with beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap and beforeSwapReturnDelta/afterSwapReturnDelta enabled, so it can alter swap amounts and take currency via return deltas.
- Owner-gated: bind(address) sets a stored address (likely the paired pool or token) during setup, and beforeInitialize writes pool identifiers and a sqrt price floor into storage.
- Applies a directional tax to swaps using stored buyTaxBps and sellTaxBps values, with lowerBuyTax(uint256) capped by MAX_BUY_TAX_BPS.
- afterSwap reads stored state and can settle a currency amount through the pool manager (take call selector present in bytecode).
- Exposes owner functions renounceOwnership and transferOwnership, plus getters for tax settings, pool id, and related token addresses.
- Swap behaviour
- beforeSwap and afterSwap run on every swap; swaps are taxed by the hook via return deltas according to stored buy and sell tax bps, with buys and sells potentially paying different rates.
- Liquidity behaviour
- beforeAddLiquidity is enabled and returns a validation check on liquidity additions; beforeRemoveLiquidity and afterRemoveLiquidity selectors exist but their gating is not confirmed from decoded bytecode.
- Fee behaviour
- Taxes are applied through return deltas using stored buyTaxBps and sellTaxBps values, rather than the pool's static fee; exact tax rates cannot be read without storage values.
- Owner & admin controls
- Owner (Ownable) can bind an address, lower the buy tax via lowerBuyTax, transfer ownership, or renounce ownership; no pause or upgrade function was found.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize sets up pool-specific state; beforeAddLiquidity gates liquidity additions; beforeSwap and afterSwap apply the tax logic; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can rebind the stored address, lower the buy tax, and transfer or renounce ownership; a malicious owner could bind a manipulated address affecting swap execution.
Risk to user funds: The hook can take currency from swaps via return deltas and the take call; user funds are exposed to the tax logic and to whatever address is bound.
Security findings
- [medium] Hook takes currency via return deltas: Enabled return-delta permissions let the hook alter swap amounts and move currency to itself on each swap, so user trades pay the hook's tax.
- [medium] Owner-controlled bind address: bind(address) is callable by the owner and sets a storage address the swap path depends on; a malicious or wrong binding could redirect or misprice swaps.
- [low] Tax parameters set by owner: lowerBuyTax can only reduce the buy tax, but sellTaxBps has no visible setter in the dispatched selectors, so its value is fixed at deployment.
- [info] No pause or upgrade path found: No pause, upgrade, or proxy selectors were identified in the dispatch table.
Contract details
- Verified source
- No
- Bytecode size
- 5,734 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, tax