Fee sharing hook on Ethereum
Uniswap v4 Hook Contract 0x97b500c8f73cf8e9e30697d941dc07f953358888 on Ethereum · Fee sharing
- Volume (24h)
- $6.14K
- Value locked (TVL)
- $8.13K
- All-time volume
- $6.14K
- Pools using this hook
- 1
- Swaps (24h)
- 79 (29 traders)
- Total swaps
- 79
What it does
A fee-sharing hook that takes a share of swap flow via return deltas, accrues fees and manages its own seeded liquidity position on this pool.
How it works step by step
- Adds and manages a protocol-seeded liquidity position on a single pool (seedLP, lpPoolId, tickLower, tickUpper)
- Takes a fee from swaps through beforeSwap return deltas and tracks it in accruedFees and totalFeesLifetime
- Routes accrued fees to feeRecipient through claimFees
- Gates liquidity additions in beforeAddLiquidity and observes removals in before/afterRemoveLiquidity
- Uses the PoolManager unlock callback to settle currency movements
- Exposes stats and quote helpers for off-chain display
- Swap behaviour
- beforeSwap is non-view and can adjust swap deltas (beforeSwapReturnDelta) to capture a fee; afterSwap also observes swaps and totalSwaps is tracked.
- Liquidity behaviour
- beforeAddLiquidity is gated and the hook seeds its own LP position (seedLP, lpPoolId, hasLP, lpBurned, tickLower/tickUpper); beforeRemoveLiquidity and afterRemoveLiquidity also exist, so the hook appears to manage a protocol-owned liquidity position.
- Fee behaviour
- Fees are accrued by the hook via beforeSwap return deltas and tracked in storage (accruedFees, totalFeesLifetime, claimFees) and paid to feeRecipient; the exact fee rate cannot be determined without source.
- Owner & admin controls
- Owner-gated functions detected via ownable tag: transferOwnership(address), renounceOwnership(), rescueStuckTokens(address,uint256,address) and seedLP/seedClaims style setup calls; owner can rescue tokens and transfer control. No pause or upgrade function identified in the decoded selectors.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeAddLiquidity gates or observes liquidity additions to the seeded position; beforeSwap runs swap-time logic and fee accounting; beforeSwapReturnDelta lets the hook alter swap deltas, which means it can take or give currency during swaps.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can rescue stuck tokens, transfer ownership and set fee recipient related state; a compromised owner key could redirect accrued fees or drain tokens held by the hook.
Risk to user funds: The hook takes currency through return deltas and holds seeded LP and fee balances, and the owner can rescue token balances, so user swap flows and hook-held funds depend on the owner key and the hook's fee logic.
Security findings
- [medium] Return-delta fee capture: beforeSwapReturnDelta is enabled, so the hook can take a share of swap currency and move funds on each swap.
- [medium] Owner token rescue: rescueStuckTokens(address,uint256,address) is owner-callable and can transfer arbitrary ERC20 balances held by the hook, including accrued fees and seeded liquidity balances.
- [low] Self-unlock currency movement: The hook uses unlock/unlockCallback self-unlock flow and take/transfer calls to move currency against the PoolManager.
- [info] Single owner key: Contract is ownable with transferOwnership and renounceOwnership; control of ownership is a single-key risk.
Contract details
- Verified source
- No
- Bytecode size
- 15,412 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, fee-sharing, liquidity-management, moves-currency, ownable, return-delta, self-unlock
Pools using Fee sharing hook
- ETH / BID (1.00% fee) — 24h volume $6.14K, TVL $4.92K, 79 swaps today