FloorHook on Ethereum

Uniswap v4 Hook Contract 0x0c7b136f059213d7a3db987e962d9f8f904560cc on Ethereum · Fee sharing · Verified contract

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

What it does

Charges a fixed 1% fee in ETH on every buy and sell of the registered token pool and sends it directly to a treasury address.

How it works step by step

  • Takes a fixed 1% fee in ETH on every swap in the single registered pool, regardless of direction.
  • Charges buys in beforeSwap when ETH is the specified currency, using a before-swap return delta.
  • Charges sells in afterSwap when ETH is the unspecified currency, using an after-swap return delta.
  • Sends collected ETH fees directly to the treasury via PoolManager.take, so the hook never custodies fees.
  • Restricts pool registration and initialization to a one-time-set launcher address.
Swap behaviour
On buys (ETH specified), a 1% ETH fee is taken in beforeSwap and sent to the treasury. On sells (ETH unspecified), a 1% ETH fee is taken in afterSwap and sent to the treasury. Zero-fee cases return zero delta.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
A fixed 1% (100 bps) fee is taken in ETH on every swap, both buys and sells. Buys are charged in beforeSwap when ETH is the specified currency; sells are charged in afterSwap when ETH is the unspecified currency. The fee is sent via PoolManager.take directly to the treasury address and is never custodied by the hook.
Owner & admin controls
Owner (Ownable2Step) can set the treasury address via setTreasury, rescue stray ETH or ERC-20 balances via rescue, and transfer or renounce ownership. The launcher address is set once by the owner and cannot be changed afterward. The 1% fee rate (FEE_BPS) is a constant and cannot be changed by anyone.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize restricts pool initialization to the launcher and the single registered pool. beforeSwap takes the 1% ETH fee on buys via a specified-currency return delta. afterSwap takes the 1% ETH fee on sells via an unspecified-currency return delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can claim the fee amounts.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner can redirect all future fee payments by changing the treasury address to any address, and can rescue any stray ETH or ERC-20 tokens held by the hook. The owner cannot change the fee rate or pause swaps.

Risk to user funds: The hook does not custody user funds; the 1% fee is sent directly to the treasury via PoolManager.take. Users are exposed to a fixed 1% ETH tax on every swap, and the owner can change where that tax is sent.

Security findings

  • [medium] Owner can redirect fee destination: The owner can call setTreasury at any time to redirect all subsequent 1% fees to an arbitrary address.
  • [info] Mandatory 1% ETH fee on all swaps: The hook uses beforeSwapReturnDelta and afterSwapReturnDelta to take 1% of swap amounts in ETH, so each swap is subject to this fee by construction.
  • [low] Owner rescue function for stray balances: The owner can call rescue to withdraw any ETH or ERC-20 balance held by the hook, though fees are sent directly to the treasury and should not accumulate in the hook.

Contract details

Verified source
Yes (FloorHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
5,583 bytes
Upgradeable proxy
No
Detected patterns
erc20, launchpad, moves-currency, ownable, return-delta

Pools using FloorHook