ShellHook on Ethereum

Uniswap v4 Hook Contract 0x5f56db915353bee5068a7cc01826666d331ee0cc on Ethereum · Custom pricing · Verified contract

Volume (24h)
$0
Value locked (TVL)
<$0.01
All-time volume
$0
Pools using this hook
1
Swaps (24h)
2 (1 traders)
Total swaps
2

What it does

Every swap of a registered token against WPRL pays a creator-set tax of 1% to 5%, split between token holders (at least half) and the creator, so trading costs more for buyers and sellers alike regardless of direction.

How it works step by step

  • Charges a creator-chosen trading tax between 1% and 5% on every swap of a registered token against WPRL, taken in WPRL via the pool manager
  • Splits each tax payment between the token's holders (streamed to the token contract, which is notified) and the creator (accrued in creatorOwed and claimable by anyone triggering claimCreator)
  • Uses beforeSwap to tax exact-input swaps where WPRL is the specified currency and exact-output swaps where WPRL is the specified currency, and afterSwap to tax the unspecified WPRL leg otherwise
  • Restricts pool initialization to the factory and only accepts pools whose pair is WPRL plus a registered token
  • Stores per-token config (creator, taxBps, holderBps, exists) set once by the factory, with holderBps floored at 50%
Swap behaviour
Swaps of a registered token against WPRL pay a tax of taxBps (1% to 5%) in WPRL. For exact-input swaps the tax is taken from the WPRL input (amount times taxBps over 10000); for exact-output swaps it is grossed up so the seller still receives the requested amount. The tax is returned as a hook delta, so it is charged on top of the pool's zero LP fee. Swaps where WPRL is not the specified leg are taxed in afterSwap on the WPRL output. Swaps that do not involve WPRL on either side are not taxed because the pool key can only be a Shell pool.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
The pool LP fee is static at 0. The hook takes the trading tax as a return delta of taxBps on the WPRL side of each swap. Of that tax, holderBps (at least 50%, set by the creator at launch and fixed) goes to the token contract as holder rewards and the remainder accrues to the creator.
Owner & admin controls
Owner can call setFactory once to set the factory address and can call renounceOwnership to set owner to zero. The creator of each token can change the creator payout address via setCreator. Parameters taxBps and holderBps are immutable after registration. There is no pause, no upgrade mechanism and no fee-rate setter visible in the source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool creation to the factory and validates the pair. beforeSwap takes the tax on the WPRL specified leg and returns a before-swap delta. afterSwap takes the tax on the WPRL unspecified leg and returns an after-swap delta. Return-delta permissions are required so the hook can take the tax as part of the swap accounting.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner has no ability to change tax rates, redirect funds or pause trading after setFactory. The owner can only set the factory once and can renounce. Each creator controls where their creator share is paid via setCreator. The contract is not upgradeable.

Risk to user funds: The hook holds WPRL transiently while distributing tax within a swap and transfers holder shares to token contracts and creator shares into creatorOwed. It does not hold pool token balances. Users are exposed to the 1% to 5% tax and to any revert in the token's notify function, which would block swaps.

Security findings

  • [info] Hook takes value via return deltas: beforeSwap and afterSwap return deltas that move up to 5% of WPRL output or input out of every swap of a registered token. Traders pay the tax on every swap.
  • [low] Owner can set factory once: The owner controls the one-time setFactory call. Until it is called, the hook cannot register tokens or initialize pools, and an incorrect factory address set by the owner would be permanent.
  • [low] Holder transfer depends on token notify: Holder share is transferred to the token contract and then notify() is called. If the token's notify reverts, swaps revert and trading of that token is blocked. The behaviour depends on the external token contract, which is not part of this analysis.
  • [info] claimCreator callable by anyone: Anyone may trigger payout of creatorOwed to the creator address. Funds always go to the stored creator, so this is a convenience rather than a risk.

Contract details

Verified source
Yes (ShellHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
4,614 bytes
Upgradeable proxy
No
Detected patterns
erc20, moves-currency, ownable, return-delta, tax

Pools using ShellHook