Fee sharing hook on Ethereum
Uniswap v4 Hook Contract 0x3ef0cf6fca3b67de18882393cd34515033fc00cc on Ethereum · Fee sharing
- Volume (24h)
- $46
- Value locked (TVL)
- $0
- All-time volume
- $46
- Pools using this hook
- 1
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 1
What it does
This hook skims an owner-set buy fee and sell fee from swaps of one token (exempt addresses pay nothing) and sends it to a claimable recipient, while LPs can withdraw freely.
This read was written for the hook 0x2227…c0cc on Ethereum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.
How it works step by step
- Charges a separate percentage fee on buys and on sells of a specific token traded through pools using this hook.
- Takes the fee directly out of swap amounts and holds it in the Uniswap v4 PoolManager on the hook's behalf, tracking a running total.
- Lets a fee recipient claim the accumulated fees.
- Lets the owner change the buy and sell fee rates and exempt chosen addresses (it checks the original sender via the Universal Router) from fees.
- Swap behaviour
- On each swap the hook works out whether it is a buy or sell of the tracked token and deducts the matching fee from the swap input or output, unless the trader is marked exempt. The fee is taken from the PoolManager to the hook's account.
- Liquidity behaviour
- No liquidity callbacks; LPs can add and withdraw freely.
- Fee behaviour
- Separate buy and sell fees set in basis points by the owner, capped by a maximum value stored in the contract whose exact level cannot be confirmed from bytecode. Collected fees go to a recipient address via claim, on top of the pool's normal LP fee.
- Owner & admin controls
- The owner can set the buy and sell fee rates (apparently bounded by a maxBps limit of unverified size), mark addresses as fee-exempt, and transfer or renounce ownership.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: computes and takes the fee on exact-input side; afterSwap: takes the fee from swap output; beforeSwapReturnDelta/afterSwapReturnDelta: let the hook deduct fee amounts from swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner controls fee rates and exemptions; the worst case is raising buy or sell fees up to the contract's unverified maxBps cap.
Risk to user funds: The hook can deduct its buy or sell fee from traders' swap amounts, up to an unverified cap; LP principal is not touched and LPs can withdraw freely.
Security findings
- [medium] Owner-adjustable buy/sell fees: The owner can change buy and sell fees at any time; a maxBps cap exists but its value is not verifiable from bytecode, so fees could be higher than expected.
- [low] Fee exemption list: The owner can exempt specific addresses from fees, giving some traders cheaper swaps than others.
- [info] LP withdrawals unaffected: Remove-liquidity callbacks are disabled, so the hook cannot block or charge LP withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 3,918 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta
Pools using Fee sharing hook
- ETH / TALLY (0.30% fee) — 24h volume $46, TVL $0, 1 swaps today