Fee sharing hook on Celo

Uniswap v4 Hook Contract 0xa08e6cbe1edce506d948835d7a1ef8e371a940cc on Celo · Fee sharing

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

What it does

Takes a swap fee on pools it is attached to and splits it between two configured fee recipients.

This read was written for the hook 0xf6f5…c0cc on Polygon 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 fee on swaps through beforeSwapReturnDelta and afterSwapReturnDelta
  • Calls take() on the pool manager to collect the fee currency
  • Splits collected fees between feeRecipientA and feeRecipientB
  • Exposes TOTAL_FEE and FEE_DENOMINATOR so the fee rate can be read on-chain
  • Liquidity callbacks are present but do not modify state
Swap behaviour
beforeSwap and afterSwap apply the hook fee via return deltas and transfer the fee share to the two fee recipients through the pool manager.
Liquidity behaviour
Liquidity add and remove callbacks (before/after) are present as view-only stubs with no state-changing logic detected.
Fee behaviour
Exposes TOTAL_FEE, FEE_DENOMINATOR, feeRecipientA and feeRecipientB getters, indicating a swap fee taken by the hook and split between two recipients; the exact split and fee rate cannot be confirmed from bytecode alone.
Owner & admin controls
Storage slot 0 is written by selector 0xcb6d3ad1 and slot 1 by 0x4b86e165, both single-address setters likely gated by admin (NotAdmin error present); admin() getter exists. Exact guarded parameters cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap and afterSwap run custom logic on swaps; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take a share of swap amounts via return deltas, using take() on the pool manager to move currency to the fee recipients.

Security & trust assessment

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

Who controls it: The admin address can likely change one or both fee recipient addresses (storage slots 0 and 1 are written by setter selectors), redirecting collected fees to a chosen address.

Risk to user funds: The hook takes a portion of swap currency through return deltas and forwards it to the fee recipients, so swappers pay the hook fee on routed swaps; liquidity itself is not directly moved by the hook.

Security findings

  • [medium] Swap return delta takes currency: Hook calls take() on the pool manager and returns non-zero deltas, so it extracts value from every swap it is attached to.
  • [medium] Mutable fee recipients: Fee recipient addresses are stored in mutable slots written by setter selectors, so a privileged key could redirect fee flow.
  • [info] Unverified source: Without verified source the exact fee rate, guard conditions and possible pause logic cannot be confirmed from decoded bytecode.

Contract details

Verified source
No
Bytecode size
3,794 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Fee sharing hook