Fee sharing hook on Base
Uniswap v4 Hook Contract 0xbbf0b679aee2d9e158730280a29e31e3875065c7 on Base · Fee sharing
- Volume (24h)
- $55
- Value locked (TVL)
- $392
- All-time volume
- $134.52K
- Pools using this hook
- 61
- Swaps (24h)
- 10 (9 traders)
- Total swaps
- 4,140
What it does
This hook appears to take a share of swap and liquidity flows through a configurable fee and fee-recipient split, but the exact swap fee direction and amounts cannot be confirmed without source, and its upgradeable admin-controlled design means those terms can change.
How it works step by step
- Hook is a proxy; its logic is the implementation at 0x802b0c3ba6878e145d4af8a73caf892ec37ea48e, which was not verified, so behaviour is inferred from decoded selectors and storage only.
- Registers pools in beforeInitialize (storage maps keyed by pool id record a registered flag, the pool key and a timestamp/weight array), so only pools initialised through this hook are tracked.
- Exposes a beforeSwap entry point that reads per-pool fee-related parameters (uint24 fee fields and uint16 values) from packed storage, indicating a dynamic or configurable fee path.
- afterSwap and afterAddLiquidity/afterRemoveLiquidity write per-pool accounting (uint64 and uint48 mappings, a uint256 array), and the afterSwap/liquidity hooks return deltas, so the hook can take a share of swap output or liquidity flows.
- Has a feeRecipient, lpShareBps and a split/weights configuration (setFeeRecipient, a weights array with an InvalidWeightTotal error), suggesting protocol fees are split between a recipient and LPs.
- Includes pause, admin transfer, and UUPS-style upgrade functions (upgradeTo, proxiableUUID, OnlyImplementation error).
- Swap behaviour
- beforeSwap computes or reads a fee for the pool, and afterSwap updates per-pool accounting and returns a delta, so a portion of swap value is taken by the hook for the fee recipient and/or LPs; the exact split and whether buys or sells pay more could not be determined from bytecode.
- Liquidity behaviour
- afterAddLiquidity and afterRemoveLiquidity update per-pool accounting and return deltas, so liquidity flows may be partly redirected or accounted by the hook; no concrete mechanism could be confirmed.
- Fee behaviour
- Fees appear to be dynamic or hook-managed (beforeSwap, uint24 fee fields) and a share is routed to a feeRecipient and LP accounting via lpShareBps; exact fee values and formulas are not recoverable without source.
- Owner & admin controls
- An admin (accessible through acceptAdmin, transferAdmin, cancelAdminTransfer) can pause the hook (setPaused), change the fee recipient (setFeeRecipient), change the position manager or pool configuration, and upgrade the implementation via upgradeTo; the upgrade authority and any timelock were not determinable.
Enabled Uniswap v4 callbacks
beforeInitialize, afterAddLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize registers pools; beforeSwap sets or reads the swap fee; afterSwap takes a return delta from swaps for fee sharing; afterAddLiquidity and afterRemoveLiquidity take return deltas from liquidity changes for accounting or share; the swap and liquidity return-delta flags allow the hook to move currency.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A single admin key can pause the hook, upgrade the implementation, change the fee recipient and fee split, and transfer admin rights, so a compromised key could redirect a share of trades and liquidity flows or swap in malicious logic.
Risk to user funds: The hook can take a share of swap output and liquidity deltas through return-delta permissions and can be paused, and upgradeability means the code controlling those flows can change, so user funds in affected pools are exposed to the admin's actions.
Security findings
- [high] Upgradeable proxy with admin-controlled implementation: upgradeTo and an admin role allow the implementation to be swapped at any time, so the logic governing user funds can change without users' consent.
- [high] Hook takes currency via return deltas: After-swap and liquidity return-delta permissions let the hook take tokens from swaps and liquidity operations, and the admin-set fee recipient receives them.
- [medium] Pausable swaps and liquidity: setPaused and paused() indicate the admin can halt hook-gated operations, which can block trades or liquidity actions.
- [medium] Unverified source: No verified source is available, so fee formulas, the split logic and upgrade safety could not be reviewed and rely on decoded bytecode only.
- [medium] Admin fee recipient and split control: setFeeRecipient and the weight/lpShareBps configuration let the admin redirect or change the share of value taken from users.
Contract details
- Verified source
- No
- Bytecode size
- 221 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- dynamic-fee, fee-sharing, moves-currency, pausable, return-delta, upgradeable
Pools using Fee sharing hook
- ETH / NVDAc (Dynamic fee) — 24h volume $29, TVL $311, 3 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $26, TVL $81, 7 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / GOOGLc (Dynamic fee) — 24h volume $0, TVL $0.05, 0 swaps today
- ETH / AAPLc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / NVDAc (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today