Fee sharing hook on BNB Chain
Uniswap v4 Hook Contract 0xcc95a4a20ffbf989bde4892abbc36ccf1c9120cc on BNB Chain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0.68
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 494
What it does
A Uniswap v4 hook that charges a configurable swap fee on pools it manages and splits it between a platform recipient and per-pool creators.
How it works step by step
- Validates pool initialization and registers pools through the factory-gated registerPool.
- Takes a platform fee and a creator fee on swaps using before- and after-swap return deltas.
- Credits collected fees to a fee vault with per-pool creator attribution.
- Lets the owner adjust fee schedule (capped by MAX_TOTAL_FEE_BPS), platform recipient and pool creators.
- Exposes pass-through liquidity hooks with no custom liquidity logic observed.
- Swap behaviour
- beforeSwap and afterSwap take a fee from the swap via return deltas, sized by the fee schedule, and credit the amounts to the fee vault for the platform and pool creator.
- Liquidity behaviour
- beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity are exposed, but they appear to be standard permissive pass-through checks rather than custom liquidity logic.
- Fee behaviour
- Fees are split between a platform fee and a creator fee in basis points, with totals capped by MAX_TOTAL_FEE_BPS. The owner sets these via setFeeSchedule. Fees are taken from swap deltas through the return-delta mechanism and credited to a fee vault via creditFees, with creator and platform shares tracked per pool.
- Owner & admin controls
- Owner (Ownable2Step: transferOwnership then acceptOwnership, renounceOwnership available) can set factory address, platform recipient, fee schedule (creator and platform bps, capped by MAX_TOTAL_FEE_BPS) and per-pool creator addresses via setPoolCreator. Pool registration also sets pool parameters.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize is used to validate and register new pools (expected pool fee and key checks). beforeSwap and afterSwap take fees from swaps. beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a share of the swap amounts as a return delta, which is how fees are extracted.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner can change the platform recipient, fee split and factory address, and can route the fee share to any address. A malicious or compromised owner could redirect fee revenue or raise fees up to the cap.
Risk to user funds: The hook can take a portion of swap amounts through return deltas and send them to the fee vault and platform recipient. It does not appear to hold a custody balance beyond those fee credits; funds are routed according to owner-set parameters.
Security findings
- [medium] Hook takes swap deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled, so the hook can take tokens from every swap; the take is bounded by the owner-set fee schedule.
- [medium] Owner-adjustable fee destination and rate: Owner can change platformRecipient and feeSchedule at any time, so fee destination and rate are not fixed for users.
- [low] Owner can change factory and pool creator mapping: setFactory and setPoolCreator are owner-gated; a factory change could affect which pools are trusted.
- [info] Ownable with two-step ownership: Ownable with two-step transfer and renounce; no pause or upgrade proxy was observed in the selectors.
Contract details
- Verified source
- No
- Bytecode size
- 6,792 bytes
- Upgradeable proxy
- No
- Detected patterns
- ownable, return-delta
Pools using Fee sharing hook
- GMEB / BREW (0.00% fee) — 24h volume $0, TVL $0.68, 0 swaps today
- TSLAB / BREW (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today