Fee sharing hook on Ethereum

Uniswap v4 Hook Contract 0xf7eadeba2eba60831ccd95e83802c6857edb28cc on Ethereum · Fee sharing

Volume (24h)
$1.26K
Value locked (TVL)
$503
All-time volume
$89.47K
Pools using this hook
1
Swaps (24h)
23 (22 traders)
Total swaps
412

What it does

A Uniswap v4 hook that skims a fee from swaps and splits it between the owner, a prize pool, the platform, and an automated buyback-and-burn of the token.

How it works step by step

  • Records the pool key and open tick when the pool is initialized
  • Takes a fee from swaps using before and after swap return deltas
  • Splits accumulated fees into owner, prize, platform, and buyback buckets
  • Performs buybacks of the token using accumulated ETH, rate-limited by a block gap and a basis-point cap
  • Burns bought-back tokens and tracks the total burned
  • Lets the owner withdraw its fee share via sendOwnerFee
Swap behaviour
beforeSwap and afterSwap take a fee through return deltas and update accumulators for owner, prize, platform, and buyback shares.
Liquidity behaviour
beforeAddLiquidity and afterAddLiquidity/afterRemoveLiquidity callbacks exist and beforeAddLiquidity writes a flag in storage slot 3 offset 1, suggesting liquidity additions are gated or tracked (likely a seeding/launch phase). The hook can return liquidity-related deltas; exact behaviour is unclear.
Fee behaviour
Fees are split into several accumulators (ownerShare, prizeShare, platformTotal, feeTotal, buybackEth, burnShare) tracked in storage slots 4 to 10. Swaps appear to take a fee via beforeSwap/afterSwap return deltas and distribute it to owner, prize, platform and buyback buckets. Exact fee rates are not determinable from the decoded input (FEE, LP_FEE, PLATFORM_FEE and BUYBACK_CAP_BPS are view constants whose values were not read).
Owner & admin controls
An owner (OWNER()) can bind the arena address once via bindArena (slot 0 written by a41e8a0c); the owner's fee share is withdrawn through sendOwnerFee(). No pause or upgrade mechanism is visible in the decoded selectors, but the contract cannot be fully verified without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize records the pool key and open tick at pool creation. beforeAddLiquidity gates or records seeding liquidity. beforeSwap and afterSwap take fees and update accumulators via return deltas (beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook can take or give currency during swaps). Remaining callbacks are present in the bytecode but their use is not confirmed.

Security & trust assessment

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

Who controls it: The owner can call bindArena once and trigger sendOwnerFee to withdraw the owner's accumulated share. Whether the owner can alter fee parameters or pause swaps could not be confirmed from the selectors alone.

Risk to user funds: The hook holds and moves pool currency through return deltas and take/unlock calls, so traders and LPs are exposed to the fee skim on swaps and to whatever the buyback and fee distribution do with the accumulated balances. Full exposure cannot be assessed without source.

Security findings

  • [medium] Swap return deltas take currency from traders: The hook enables beforeSwapReturnDelta and afterSwapReturnDelta, so it can take a share of every swap's currency. Users pay the fee implicitly through the swap delta.
  • [medium] Hook moves currency and self-unlocks for buybacks: The bytecode includes an unlockCallback and calls take() and unlock(), so the hook moves tokens out of the PoolManager, including during buyback(). Buyback timing is recorded via lastBuybackBlock, but the bytecode does not show a clear minimum-output check from the selectors alone.
  • [medium] Arena binding access control unverified: bindArena writes the arena address to slot 0 and is callable externally. If it is not restricted to the owner or to a one-time initialization, an attacker could redirect ARENA-linked flows. Access control on this call could not be verified from the decoded input.
  • [info] Analysis limited to decoded bytecode: Without verified source the exact fee rates, the owner's ability to change them, and the access control on bindArena cannot be confirmed. Conclusions here rest on selectors and storage access patterns.

Contract details

Verified source
No
Bytecode size
11,473 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta, self-unlock

Pools using Fee sharing hook