Fee sharing hook on Tempo

Uniswap v4 Hook Contract 0x7169a78a59f136876e724b648fbb339a42f46888 on Tempo · Fee sharing

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
5
Swaps (24h)
19 (15 traders)
Total swaps
53,041

What it does

Appears to be a fee-sharing hook that may route part of swap value to a token jar, but without verified source the exact mechanism could not be confirmed.

How it works step by step

  • Records pool-specific data (pseudo TVL and token mapping) during pool initialization
  • Stores a token jar address in slot 0 that can be updated via pollTokenJar
  • Checks liquidity on beforeAddLiquidity
  • Uses beforeSwap with return-delta to adjust swap settlement
  • Calls take, settle and sync to move currency during swaps
  • Exposes quote functions for swap amounts
Swap behaviour
beforeSwap is enabled with return-delta permission and the hook calls take, settle and sync, so it likely takes a portion of swap value during swaps; the precise computation is not determinable from the input.
Liquidity behaviour
beforeAddLiquidity is enabled and checked, and a pseudoTotalValueLocked view and poolIdToTokens mapping suggest tracking of pool liquidity per pool id; no removal hook is enabled in permissions.
Fee behaviour
Not determinable from decoded bytecode; the hook declares beforeSwap and beforeSwapReturnDelta and includes a token jar and a pollTokenJar function, which suggests it may divert part of swap value to a token jar, but the fee computation could not be confirmed.
Owner & admin controls
Storage slot 0 holds an address that is read and written by pollTokenJar and beforeInitialize, and is read by tokenJar, indicating an admin-settable token jar address; no owner or pause function was decoded, and no upgrade mechanism was identified. The exact authority of the slot 0 writer could not be determined without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize records pool-related state into storage slots 2 and 3 and writes the token jar address; beforeAddLiquidity is enabled for liquidity checks or accounting; beforeSwap runs custom swap logic and calls out to a quote-token or pool-manager interaction; beforeSwapReturnDelta lets the hook alter the swap's settled amounts, and the bytecode includes take, settle and sync calls consistent with moving currency.

Security & trust assessment

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

Who controls it: Could not determine whether a privileged key controls the token jar address in storage slot 0 or any parameters; if a single key can set the token jar it could redirect value taken from swaps.

Risk to user funds: The hook has return-delta permission and performs currency transfers via take, settle and sync, so it can hold or redirect a portion of swap value; the exact amounts and conditions are not determinable from bytecode alone.

Security findings

  • [medium] Hook takes currency via return delta: beforeSwapReturnDelta is enabled and the bytecode includes take, settle and sync calls, so the hook can move currency and adjust the swap's net delta.
  • [medium] Token jar destination is mutable: Storage slot 0 is written during initialization and pollTokenJar, so the token jar destination appears to be set at runtime rather than fixed.
  • [info] No verified source: Without verified source, the fee logic, access control on pollTokenJar and the purpose of the quote functions could not be confirmed.

Contract details

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

Pools using Fee sharing hook