FeeHook on Ethereum
Uniswap v4 Hook Contract 0x15cfd1e0b4e988c5a623ebbfc8aea00493b2c0cc on Ethereum · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 9 (4 traders)
- Total swaps
- 9
What it does
Every HONEY trade in this ETH/HONEY pool pays a flat 10% fee in ETH, with buys paying it off the ETH input and sells paying it off the ETH output, and that fee is split half to the Drones bees and half to a buyback that burns HONEY.
How it works step by step
- Charges a 10% fee on every HONEY trade in the ETH/HONEY pool: on buys the fee is taken from the ETH input in beforeSwap, on sells it is taken from the ETH output in afterSwap
- Also takes 10% of ETH royalties received from NFT marketplaces via receive(), and half of WETH royalties via shareWeth()
- Splits every collected fee 50/50: half is forwarded as ETH to the Drones contract for distribution to bees, half is kept to fund buybacks
- buyback() lets anyone spend the kept ETH to buy HONEY in the same pool without fee, burn it, and receive a 0.5% tip in ETH
- Holds buy fees as a minted ETH claim on the pool manager (claimed) that is redeemed once the manager holds enough ETH
- Swap behaviour
- Buys of HONEY with ETH (zeroForOne) pay a 10% fee on the ETH input via beforeSwap, reducing the amount swapped. Sells of HONEY for ETH pay a 10% fee on the ETH output via afterSwap. Exact-output swaps are rejected with ExactOutputDisabled. The buyback swap made by the hook itself is exempt from the fee.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Fixed 10% (FEE_BPS 1000) on all HONEY trades in both directions, taken in ETH. Fees are split 50% to forBees (paid to Drones) and 50% to forBurn (used for buyback and burn). Royalties received in ETH or WETH are also split in half. A 0.5% tip of the buyback pot goes to the buyback caller.
- Owner & admin controls
- The owner is set at deploy and immutable. The owner can call recoverStuck to withdraw all ETH held by the hook after 30 days of no payouts or buybacks, and rescueToken to transfer any ERC20 out (WETH only after the same 30-day dormancy). The fee rate, destinations and tick spacing are constants. There is no pause, upgrade proxy or parameter setter in the decoded interface.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap is used to take the 10% fee from ETH input on buys (and to block exact-output swaps). afterSwap is used to take the 10% fee from ETH output on sells and to redeem buy-fee claims and pay out the bees' share. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can keep the fee as a delta on the swap.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner cannot change the fee or destinations, but can withdraw all ETH the hook holds after 30 days of inactivity and can rescue any ERC20 the hook holds. There is no pause or upgrade mechanism.
Risk to user funds: The hook takes 10% of every HONEY trade and holds a transient ETH balance (forBees and forBurn plus buy-fee claims). It cannot touch pool liquidity. User trading funds are not held beyond the swap; the owner can reach the hook's accumulated fee ETH and any stray tokens after the dormancy condition.
Security findings
- [medium] Owner can drain held ETH after dormancy: recoverStuck lets the owner transfer the entire ETH balance, including bee and buyback funds, to any address once lastActivity is more than 30 days old. Anyone can call buyback or flush to reset lastActivity, but if the pot is idle the owner gains custody of it.
- [low] Owner can rescue arbitrary tokens: rescueToken transfers any ERC20 held by the contract to an address of the owner's choice. Non-WETH tokens, including HONEY sent by mistake, can be withdrawn immediately without any dormancy check.
- [info] Fee-on-swap delta gives hook control over swap outcome: The hook returns non-zero BeforeSwapDelta and afterSwap hookDelta, so it directly alters the amounts settled by the pool manager; users receive less ETH on buys and sells than the raw pool price.
- [info] Buyback swap bypasses hook fee via _buying flag: During buyback the _buying flag disables the fee in beforeSwap and afterSwap. The flag is set and cleared within the same unlockCallback, so it cannot be set by external callers.
- [info] Claimed buy fees depend on manager ETH balance: Buy fees are held as a claim until the pool manager holds at least that much ETH; if the manager balance stays low, the hook's ETH accounting lags and forBees payouts can be delayed.
Contract details
- Verified source
- Yes (FeeHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 6,707 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, moves-currency, ownable, return-delta, self-unlock