Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xf5ed16b166ff7253b60731a091460cf78c54e0c4 on Ethereum · Fee sharing

Volume (24h)
$1.99
Value locked (TVL)
<$0.01
All-time volume
$1.99
Pools using this hook
1
Swaps (24h)
2 (1 traders)
Total swaps
2

What it does

A swap hook that takes a configurable share of swap value through return deltas and uses it for buyback-and-burn, with fee and share parameters adjustable by a privileged setter.

How it works step by step

  • Records the pool key and initialization state in beforeInitialize
  • Applies configurable fee and share parameters during beforeSwap
  • Captures a portion of swap output via afterSwapReturnDelta in afterSwap
  • Accumulates value and performs buybackAndBurn with tracked burn totals
  • Queues parameter updates through setParams with a delayed effective time
  • Exposes previewQuote so integrators can estimate the computed result
Swap behaviour
beforeSwap computes fee and parameter-driven adjustments, and afterSwap updates burn accounting and can return a balance delta (afterSwapReturnDelta) that captures part of swap output for the hook.
Liquidity behaviour
No liquidity callbacks are enabled in the permissions (beforeAddLiquidity/beforeRemoveLiquidity selectors exist but are not part of the enabled hook permissions), so liquidity operations are not intercepted by the hook.
Fee behaviour
The hook manages a configurable fee parameter set (uint24 fee-like field, packed uint8 step/share values, MAX_FEE_STEP and MAX_SHARE_STEP bounds). Fees are set via setParams with queued, delayed effectiveness; previewQuote exposes the computed quote. Exact fee distribution could not be confirmed without source.
Owner & admin controls
setParams is nonpayable and callable through the hook's externally exposed interface; access is gated by stored admin/owner state that could not be confirmed without source. Parameter changes are queued (queuedParams, queuedEffectiveAt) and take effect later, which limits instant changes but still allows the privileged party to alter fee and bounty parameters. registry() and initializer() are exposed, suggesting an initializer/registry pattern; upgradeability was not confirmed.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, afterSwapReturnDelta

beforeInitialize: records pool key/initialization state (poolKey, poolId, poolInitialized). beforeSwap: reads parameters and computes swap-side fee/adjustment logic. afterSwap: updates accounting counters (totalTokensBurned and related state) after each swap. afterSwapReturnDelta: lets the hook return a balance delta from afterSwap, so it can take a portion of swap output and redirect it to its own accounting.

Security & trust assessment

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

Who controls it: A privileged key can queue new fee and step parameters through setParams and may control the buyback/burn path, shifting the economics of swaps for all traders and LPs; it could also change the bounty/share structure that determines who receives hook-taken value.

Risk to user funds: The hook can hold and move value through afterSwapReturnDelta and buyback/burn accounting, so a share of swap flows is held or redirected by the hook. Users are exposed to fee and share changes made by the privileged setter, but the hook does not appear to block swaps outright based on decoded selectors alone.

Security findings

  • [medium] Hook takes value via return deltas: afterSwapReturnDelta is enabled, so the hook can take tokens from swap outputs via return deltas, meaning a portion of trader output is captured by the hook.
  • [medium] Privileged parameter control over fees: setParams is nonpayable and governs fee and share steps; parameter changes are queued but a privileged account still controls the economics of every swap.
  • [low] Buyback and burn path depends on hook-held funds: buybackAndBurn is externally callable and moves accumulated value into burns; it depends on stored accounting that could not be verified without source.
  • [info] Self-unlock pattern: Bytecode shows self-unlock behaviour (unlockCallback) and an initializer, so the hook may call back into the PoolManager to settle balances; exact control flow could not be fully verified.

Contract details

Verified source
No
Bytecode size
13,618 bytes
Upgradeable proxy
No
Detected patterns
return-delta, self-unlock

Pools using Fee sharing hook