Fee sharing hook on Ink

Uniswap v4 Hook Contract 0x785bf95f6ee6c5e634c222a633f003a83d9c28cc on Ink · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$1.25K
All-time volume
$158.23K
Pools using this hook
25
Swaps (24h)
0 (0 traders)
Total swaps
758

What it does

A Uniswap v4 hook that appears to run a token-launch fee and holder-reward scheme: it takes a fee on swaps (buy-side fee in basis points, capped by a maximum), splits collected fees between creators, a platform share, and token holders, and lets holders claim accrued fees.

How it works step by step

  • Records each pool's configuration and a pool id per pool, with a pool stock value and a creator split value stored per pool.
  • On beforeSwap and afterSwap, computes a buy-side fee in basis points (a beam fee, bounded by a maximum fee constant) and takes it through return deltas.
  • Splits the collected fee between a platform share (fixed basis-point constant), creator recipients (up to a maximum number of creator slots) and a holder reward pool.
  • Tracks holder accrued amounts and per-holder claimable balances, which holders can pull or claim.
  • Uses external registry, locker, distributor and treasury contracts that the hook references for routing and config.
  • Blocks or restricts liquidity additions and removals through beforeAddLiquidity and afterRemoveLiquidity style logic, with lifecycle callbacks on initialization and donations.
Swap behaviour
Swaps trigger beforeSwap and afterSwap. The hook computes a fee and claims a portion of the swap amount via return deltas, then routes the fee to the platform, creators and holder accounting.
Liquidity behaviour
Liquidity add and remove calls pass through hook callbacks (beforeAddLiquidity, afterRemoveLiquidity and related views). The bytecode shows these are wired in, though the exact restrictions cannot be confirmed without source.
Fee behaviour
Fees are dynamic, not static: a current buy fee in basis points is read per pool and capped by a maximum fee constant. Fees are split among platform share, creator recipients and holders, and taken via return deltas.
Owner & admin controls
A treasury address and an admin address can be changed by privileged setters (setTreasury, setAdmin, adminSetCreatorRecipient, setCreatorRecipient). Creator recipients per pool can be reassigned. Exact pause or upgrade capability cannot be determined from the decoded functions.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize and afterInitialize-style setup records pool configuration; beforeAddLiquidity and afterRemoveLiquidity gate or observe liquidity; beforeSwap and afterSwap compute and take the fee; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of swap amounts.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: A privileged admin or treasury key can change treasury, admin and creator recipient routing, which determines where fees go. Fee parameters may also be adjustable by that key.

Risk to user funds: The hook can hold and move swap-derived value through return deltas and fee accounting, and maintains holder and creator balances in storage. It does not appear to hold arbitrary pool principal, but it does capture a portion of swap flow on every trade.

Security findings

  • [medium] Privileged recipient reassignment: Admin and treasury setters, plus adminSetCreatorRecipient, can redirect fee recipients for pools. A compromised admin key could redirect creator and platform fee flows.
  • [medium] Hook takes swap amounts via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook takes a share of every swap it touches. Fee caps limit the rate, but the hook holds a direct claim on swap value.
  • [info] Owner-adjustable fee configuration: A current buy fee is read per pool and bounded by a maximum constant. The mechanism that sets it could not be confirmed without source, so the actual ceiling and who can change it are unknown.
  • [info] Unverified source: No verified source is available, so function bodies, access modifiers and upgrade paths are inferred from selectors and storage only.
  • [info] External dependency surface: The hook references registry, locker, distributor and treasury contracts. Their trust assumptions are outside the bytecode reviewed here.

Contract details

Verified source
No
Bytecode size
13,121 bytes
Upgradeable proxy
No
Detected patterns
return-delta

Pools using Fee sharing hook