Hook on Ethereum

Uniswap v4 Hook Contract 0x593bb4ed90aa9c1520797768c89d0c6f31802145 on Ethereum · Fee sharing · Verified contract

Volume (24h)
$7.10K
Value locked (TVL)
$0
All-time volume
$7.10K
Pools using this hook
1
Swaps (24h)
7 (7 traders)
Total swaps
7

What it does

An ETH-pair hook that charges a fixed, immutable creator fee of up to 10% on ETH received by token sellers and on ETH withdrawn by LPs, while buys pay no hook fee.

This read was written for the hook 0x841e…a145 on Ethereum and reused here: the two run the same code.

How it works step by step

  • Only allows pools where one side is native ETH.
  • When someone sells the token for ETH, a fixed creator fee is taken from the ETH they receive and sent to the creator.
  • When an LP removes liquidity, the same percentage is taken from the ETH portion of their withdrawal and sent to the creator.
  • The fee rate is fixed at deployment and can never exceed 10%.
  • Buys (ETH to token) pay no hook fee.
Swap behaviour
On sells (token to ETH), the hook takes a fixed percentage of the ETH output and sends it to the creator, so the seller receives less ETH. Buys are not charged by the hook.
Liquidity behaviour
Adding liquidity is untouched. On removal, the same fixed percentage is deducted from the ETH portion of the withdrawal and sent to the creator, but withdrawals are never blocked.
Fee behaviour
A fixed creator fee set at deployment (0% to a hard cap of 10%, immutable) applies to ETH received on sells and to ETH withdrawn by LPs; it goes directly to the creator address. The pool's normal LP swap fee also applies.
Owner & admin controls
The creator can only transfer the creator role (fee recipient) to another address. The fee rate is immutable and capped at 10%.

Enabled Uniswap v4 callbacks

beforeInitialize, afterRemoveLiquidity, afterSwap, afterSwapReturnDelta, afterRemoveLiquidityReturnDelta

beforeInitialize: rejects pools without native ETH; afterSwap + afterSwapReturnDelta: deducts the creator fee from ETH output on sells; afterRemoveLiquidity + afterRemoveLiquidityReturnDelta: deducts the creator fee from ETH returned to withdrawing LPs.

Security & trust assessment

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

Who controls it: The creator key can only reassign who receives fees. It cannot change the fee rate, pause trading, or block withdrawals.

Risk to user funds: Sellers lose the fixed fee (0% to 10%) of ETH received, and LPs lose the same share of ETH they withdraw. LP principal cannot be locked or drained beyond that fee.

Security findings

  • [low] Withdrawal fee on LP ETH: LPs lose the fixed fee (up to 10%) of the ETH they withdraw, including principal, which is unusual compared to most pools. Withdrawals cannot be blocked.
  • [info] Fixed, capped fee: The fee rate is set once at deployment, cannot exceed 10%, and cannot be changed by anyone.
  • [info] Unaudited code: The source states it is educational and unaudited, though the logic is short and simple.

Contract details

Verified source
Yes (Hook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
3,042 bytes
Upgradeable proxy
No
Detected patterns
fee-sharing, moves-currency, return-delta

Pools using Hook