Hook
EthereumHook is a Uniswap v4 hook on Ethereum. Runs code on every swap. Can take tokens from swaps. Takes a cut when LPs withdraw. Runs at pool creation.
- Contract name
- Hook
How this hook works
Trading taxA trading tax hook. It takes a cut of every trade.
Takes a cut of every trade
On top of the normal pool fee, it keeps a share of each trade. It can never be above 10%. The fee is paid out in the same trade.
The code that does this (afterSwap):function _afterSwap(address, PoolKey calldata key, SwapParams calldata params, BalanceDelta delta, bytes calldata) internal override returns (bytes4, int128) { if (params.zeroForOne) return (this.afterSwap.selector, 0); int128 ethOut = delta.amount0(); if (ethOut <= 0) return (this.afterSwap.selector, 0); uint256 fee = uint256(uint128(ethOut)) * creatorFeeBps / 10_000; poolManager.take(key.currency0, creator, fee); emit CreatorFeeTaken(creator, fee); return (this.afterSwap.selector, int128(int256(fee))); }
Who controls it: Nobody. The hook has no admin functions, and the code cannot be changed.
What do these labels mean? Based on the hook’s published code.
What it can do
Its code executes inside each trade in pools that use it.
It can take or add tokens during a swap. Fees, burns and custom curves work this way, and so do scams.
It can change what LPs get back when they remove liquidity.
It runs when a pool is created, often to lock in that pool’s settings.
Hook history
- Took its fee from a trade 132 times
Latest transactions
- 0x29d53748…445229 block 26,401,140
- 0x1416f035…6b7283 block 26,401,140
- 0x0c97845e…1d13fd block 26,401,135
- 0xce982000…44d62b block 26,401,135
- 0x02a6f4f8…b66b91 block 26,401,132
- 0xdc56e8fe…6eb396 block 26,401,132
- 0xc9f47d79…ebf46b block 26,401,128
- 0x6c5eacc6…681d83 block 26,401,124
- 0x77ea2247…3deeef block 26,401,124
- 0x8809a727…617fe0 block 26,401,121
Counted from what the hook recorded on-chain across all its pools, for every action in its published code, plus token transfers in and out of it.