Likely fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xe61b90b6e74eaa5dfa2a1a365bced49ce3f9e444 on Ethereum · Fee sharing

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

What it does

This hook appears to skim a share of swap fees into a treasury and rewards mechanism for liquidity providers and the protocol, while letting normal pool trading continue.

How it works step by step

  • Records a deployment block per pool at initialization (beforeInitialize writes a mapping in slot 4)
  • Computes a fee via calculateFee(address,bool) and takes a treasury share defined by treasuryBips
  • Takes a return delta after swaps so part of the swap value is settled to the hook
  • Routes collected value to a treasury address and a rewardsMachine address stored in contract state
  • Mints or burns ERC-6909 claims and reacts to liquidity additions in afterAddLiquidity
Swap behaviour
afterSwap runs after each swap and afterSwapReturnDelta is enabled, so the hook can take a cut of the swap amounts and route it to the treasury or rewards contract.
Liquidity behaviour
afterAddLiquidity is implemented (both the view-style and the nonpayable selector 0x9f063efc are present), and mint/burn/transferFrom selectors plus take/settle indicate the hook may interact with pool currency and ERC-6909 claims when liquidity is added; no removal-side hook is enabled in the permissions.
Fee behaviour
calculateFee(address,bool) is exposed as a view function, and the hook reads a treasuryBips value from storage, suggesting a share of fees is routed to a treasury; the exact formula and whether it is applied to swap output or taken as a return delta could not be confirmed from the bytecode alone.
Owner & admin controls
Storage slot 0 (treasury address) and slot 2 (rewardsMachine address) and slot 1 (treasuryBips) are set by the nonpayable selector 0x474582c5 with arguments (address,uint256,address,uint256), which looks like a setter callable by a privileged party; the caller check was not confirmed from decoded bytecode, so it is unknown whether it is restricted to an owner. An owner() getter selector appears in the bytecode but the hook's use of it could not be confirmed.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize records the deployment block per pool (mapping in slot 4 written by dc98354e); afterAddLiquidity runs after liquidity is added and may mint claims or rewards; afterSwap runs after each swap and may take a fee or distribute rewards; afterSwapReturnDelta lets the hook alter the amounts settled after a swap, which is how it can skim value from the swap.

Security & trust assessment

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

Who controls it: A privileged key that can change the treasury address, treasury bips, or rewards machine address could redirect a share of fees or reward flows to itself and alter the fee take on every swap.

Risk to user funds: The hook can take currency from swaps through the return-delta mechanism and can move tokens via transfer and transferFrom, so a portion of swap value may be diverted to the treasury or rewards machine; it can likely not freeze pool funds from the selectors seen, but this is not conclusively determined.

Security findings

  • [medium] Return delta can alter swap settlement: The hook has afterSwapReturnDelta enabled and the bytecode writes and moves currency (take, settle, transfer, transferFrom selectors present), so it can alter the amounts a swapper settles.
  • [high] Unverified access control on configuration setter: Slots 0, 1 and 2 (treasury, treasuryBips, rewardsMachine) are written by selector 0x474582c5; if this setter is not access-restricted, anyone could redirect fees or rewards.
  • [info] Unverified source: No verified source is available, and selector names are inferred by evmole, so the exact behaviour and access checks could not be fully confirmed.

Contract details

Verified source
No
Bytecode size
14,655 bytes
Upgradeable proxy
No
Detected patterns
erc6909-claims, moves-currency, return-delta

Pools using Likely fee sharing hook