Fee sharing hook on Base
Uniswap v4 Hook Contract 0x64b54c01afcb36a405a2615e65b5e22a52b28044 on Base · Fee sharing
- Volume (24h)
- $66
- Value locked (TVL)
- $3.49K
- All-time volume
- $2.43M
- Pools using this hook
- 20
- Swaps (24h)
- 1 (1 traders)
- Total swaps
- 38,413
What it does
A Uniswap v4 hook that charges owner-set buy and sell fees on swaps and routes the collected value to an operations wallet and a BTC treasury.
How it works step by step
- Charges a buy fee or sell fee in basis points on swaps, with the rate set by the owner
- Takes the fee from the swap output through afterSwapReturnDelta, so users receive less than the pool quote
- Skips fees for addresses in the fee exclusion mapping managed by setFeeExclusion
- Tracks total ETH accumulated for BTC and total ETH earmarked for operations
- Routes accumulated value to an operational wallet and a BTC treasury wallet set by the owner
- Uses ERC6909 claim and mint or burn calls to hold fee value inside the pool manager
- Swap behaviour
- afterSwap computes a buy or sell fee in basis points, takes it from the swap output using the return delta, excludes whitelisted addresses, and accumulates the ETH portion for operations and BTC allocation.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Owner-set buy and sell fee rates (buyFeeBips, sellFeeBips) are charged in afterSwap through the return delta, with a per-address fee exclusion list; accumulated ETH is tracked for operations and BTC treasury allocations.
- Owner & admin controls
- Owner (Ownable with two-step ownership handover) can set buy and sell fee bips via updateFees, change operationalWallet and btcTreasury addresses via updateWallets, and exempt addresses from fees via setFeeExclusion; owner can transfer or renounce ownership.
Enabled Uniswap v4 callbacks
afterSwap, afterSwapReturnDelta
afterSwap: takes a fee from the swap output after each swap and records accumulated ETH; afterSwapReturnDelta: lets the hook adjust the swap delta so the fee is credited to the hook.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: The owner can raise fees (bounded by a FeeTooHigh check, exact cap unknown) and redirect the operational and BTC treasury wallets, directing fee revenue wherever the owner chooses.
Risk to user funds: The hook takes a percentage of swap output via return delta and holds accumulated ETH and tokens before forwarding them to operational and BTC treasury wallets, so user swap proceeds are reduced by the fee and pooled value sits in the hook until withdrawn.
Security findings
- [medium] Owner-adjustable swap fees: The owner can change buy and sell fee rates through updateFees; a FeeTooHigh guard exists but its ceiling cannot be confirmed without source.
- [medium] Owner-controlled fee recipient wallets: updateWallets lets the owner repoint where accumulated fee revenue is sent, which could redirect value to an arbitrary address.
- [info] Hook takes value from swaps: The hook uses afterSwapReturnDelta and transfers or mints currency to take fees from swaps, so it can alter the net amount users receive on every swap.
- [info] Single owner key with two-step handover: Ownership can be transferred or handed over; a single owner key controls fee and wallet parameters.
Contract details
- Verified source
- No
- Bytecode size
- 14,452 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, ownable, return-delta
Pools using Fee sharing hook
- ETH / BLOOM (0.30% fee) — 24h volume $66, TVL $3.49K, 1 swaps today
- ETH / BOS (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / BL00M (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / BLOOM (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / KB1 (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / wB1 (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / KB1 (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB10 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB10 (0.00% fee) — 24h volume $0, TVL $0.05, 0 swaps today
- ETH / AIFI (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / wB1 (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB10 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / TSTB4 (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today