Fee sharing hook on Ink
Uniswap v4 Hook Contract 0x9288f805b5adaa9ff2088fcd579f686c1b65c044 on Ink · Fee sharing
- Volume (24h)
- $314
- Value locked (TVL)
- $164
- All-time volume
- $314
- Pools using this hook
- 1
- Swaps (24h)
- 5 (3 traders)
- Total swaps
- 5
What it does
Takes a share of swap output through an afterSwap return delta and routes it as a protocol fee to a configured vault, sharing fees between the protocol and the pool.
How it works step by step
- Runs logic after each swap through the afterSwap callback
- Uses afterSwapReturnDelta to skim a portion of swap output as a fee
- Reads protocolFeeBps and MAX_PROTOCOL_FEE_BPS to bound the protocol fee rate
- Stores a configurator and vault address set once via configure
- Observes liquidity add and remove actions without taking liquidity deltas
- Swap behaviour
- After each swap, the afterSwap hook runs and, via afterSwapReturnDelta, can take a protocol fee from the swap output based on a configured basis-point rate.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors are dispatched, but the hook does not declare liquidity return-delta permissions, so it likely only observes or gates liquidity actions.
- Fee behaviour
- Protocol fee related selectors are present (protocolFeeBps, MAX_PROTOCOL_FEE_BPS, BPS_DENOMINATOR), suggesting a share of swap fees is taken by the hook via afterSwap return delta; exact split logic cannot be confirmed without source.
- Owner & admin controls
- A one-time configure(address,address) setter (selector 0xe470d5cf) writes two storage address slots (slot 0 and slot 1), likely the configurator and vault addresses; no owner pause, upgrade or parameter-change functions were identified in the decoded selectors.
Enabled Uniswap v4 callbacks
afterSwap, afterSwapReturnDelta
afterSwap: observes completed swaps and runs fee-sharing logic. afterSwapReturnDelta: lets the hook take a portion of the swap output as a delta, which is how fees are collected for the protocol or configurator.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The configurator and vault addresses are set through configure(address,address); whoever controls that setter or the configurator contract may influence where the taken fees are routed, and the protocol fee rate is governed by a value readable via protocolFeeBps.
Risk to user funds: The hook can take a share of swap output through return deltas and route it to the configured vault or configurator, so traders pay the fee; it does not appear to hold LP principal beyond what the pool manager settles, but this depends on the unverified afterSwap logic.
Security findings
- [medium] Return delta takes value from swaps: afterSwapReturnDelta lets the hook take tokens from every swap, so fee routing logic directly moves user-economics value.
- [medium] Unverified configuration setter: configure(address,address) is nonpayable and writes two storage slots; access control on this setter could not be verified from the bytecode alone.
- [info] Unused callback selectors: beforeSwap and afterInitialize related selectors exist but beforeSwap is not enabled in the permissions, so it is likely unused or a view helper.
Contract details
- Verified source
- No
- Bytecode size
- 3,886 bytes
- Upgradeable proxy
- No
- Detected patterns
- fee-sharing, liquidity-management, return-delta
Pools using Fee sharing hook
- ETH / TEST (0.30% fee) — 24h volume $314, TVL $5.52, 5 swaps today