Fee sharing hook on Monad

Uniswap v4 Hook Contract 0x7a2524ce937f206844b9508eec8f6486800a40cc on Monad · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$5.99K
All-time volume
$1.93M
Pools using this hook
11
Swaps (24h)
0 (0 traders)
Total swaps
27,939

What it does

Takes a fee on swaps through this pool and routes part of it to a token creator, based on fee settings read from an external contract.

How it works step by step

  • Hooks beforeSwap and afterSwap to run logic on every swap in the pool.
  • Uses beforeSwapReturnDelta and afterSwapReturnDelta to take a share of swap currency.
  • Reads totalFeeBps and tokenCreatorFeeBps from an external contract to compute the fee split.
  • Calls take on the pool manager to move the fee amount out to recipients.
  • Exposes view helpers for cultRewards, cultFactory, poolManager and getHookPermissions.
Swap behaviour
beforeSwap and afterSwap are both implemented and use return deltas, so the hook can take a portion of the swap currency and pay it out to fee recipients.
Liquidity behaviour
beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors are present as view stubs with no state-changing logic observed.
Fee behaviour
Reads totalFeeBps() and tokenCreatorFeeBps() from an external contract and appears to split a fee between a token creator and the protocol during swaps; exact split logic not confirmed from bytecode.
Owner & admin controls
Storage slot 0 mapping is written by selector 0xc5991afa (address,address) which is nonpayable and not a known admin function, so a privileged setter may exist; owner() (0x8da5cb5b) and totalFeeBps/tokenCreatorFeeBps are referenced as external calls, indicating fee parameters are read from another contract. No pause or upgrade function identified.

Enabled Uniswap v4 callbacks

beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeSwap and afterSwap are used to read pool and token mappings and likely adjust swap amounts; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to take a share of swap currency, which is the main economic effect. Liquidity callbacks are not enabled.

Security & trust assessment

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

Who controls it: A privileged key controlling the address-to-address mapping at slot 0 or the external fee configuration could redirect fee recipients or change fee rates, affecting swap proceeds.

Risk to user funds: The hook can take a share of swap currency through return deltas and move it via pool manager take calls. It does not appear to hold custody beyond transient balances, and no withdrawal-blocking function was identified.

Security findings

  • [medium] Swap-time fee extraction via return delta: Hook takes currency via return deltas in swap callbacks and calls take(address,address,uint256) on the pool manager, so part of each swap's output is diverted from the pool.
  • [medium] Unverified state-changing setter: Selector 0xc5991afa (address,address) is nonpayable and writes the slot 0 mapping; its access control could not be verified from bytecode.
  • [low] Dependence on external fee configuration: Fee rates and recipient logic depend on external calls to totalFeeBps, tokenCreatorFeeBps and owner, so the hook's behaviour can change if those external contracts are upgraded.

Contract details

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

Pools using Fee sharing hook