Fee sharing hook on Unichain
Uniswap v4 Hook Contract 0xb4960cd4f9147f9e37a7aa9005df7156f61e4444 on Unichain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $765
- All-time volume
- $1.40M
- Pools using this hook
- 777
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 743,415
What it does
A fee-sharing hook that takes a share of swap output and distributes it to a fee recipient, a creator and a referral tree.
How it works step by step
- Takes a fee from swap output using afterSwapReturnDelta and take()
- Splits the collected fee between a total protocol fee, referral levels L1 to L3 and a creator fee
- Looks up referral relationships through uniReferral and getReferralTree
- Lets role holders set the fee recipient address
- Runs logic after liquidity is added via afterAddLiquidity
- Swap behaviour
- After each swap the hook takes a fee from the unspecified currency via return delta and distributes it through take() to the fee recipient and referral addresses.
- Liquidity behaviour
- afterAddLiquidity is enabled and the hook implements afterRemoveLiquidity and before-liquidity views; liquidity is not blocked, but the bytecode does not show a clear custom accounting path for liquidity.
- Fee behaviour
- Fee constants are exposed as views (TOTAL_FEE, REFERRAL_FEE, CREATOR_FEE, L1/L2/L3_REFERRAL_FEE, FEE_DENOMINATOR) and a feeRecipient is stored. After swaps the hook appears to take a share of the swap output via return delta and route it to the fee recipient, a creator, and a referral tree (uniReferral, getReferralTree).
- Owner & admin controls
- AccessControl with DEFAULT_ADMIN_ROLE and ADMIN_ROLE; role holders can grant, revoke and renounce roles (grantRole, revokeRole, renounceRole), and a role admin can call setFeeRecipient to redirect the fee recipient address. No pause or upgrade function found.
Enabled Uniswap v4 callbacks
afterAddLiquidity, afterSwap, afterSwapReturnDelta
afterAddLiquidity: runs logic after liquidity is added to the pool. afterSwap: runs fee/referral distribution logic after each swap. afterSwapReturnDelta: lets the hook claim a portion of the swap's unspecified currency as a delta, which is how it takes its fee.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: Holders of DEFAULT_ADMIN_ROLE or ADMIN_ROLE can change the fee recipient and grant themselves or others roles, so a privileged key could redirect the hook's fee revenue to an arbitrary address.
Risk to user funds: The hook can take a portion of the output token on each swap via return delta and transfer it to the fee recipient and referral parties, so traders pay an extra fee on swaps routed through this pool. It cannot be confirmed from bytecode alone whether it can block swaps.
Security findings
- [medium] Hook takes tokens on swaps: The hook uses afterSwapReturnDelta and calls take(), so it can withdraw a share of swap output from the pool manager on every swap.
- [medium] Admin can redirect fee recipient: setFeeRecipient is callable by privileged roles and the fee recipient is stored in a single slot, so the destination of collected fees can be changed at any time.
- [low] Fee parameters not verifiable without source: Fee percentages and referral tree addresses are read from external contracts or storage; without source it is unclear whether these can be changed by admins.
- [info] Standard role-based access control: Role management is standard OpenZeppelin AccessControl; no pause mechanism or upgrade proxy was detected in the selectors.
Contract details
- Verified source
- No
- Bytecode size
- 6,276 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Fee sharing hook
- ETH / PINK (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / DROP (0.30% fee) — 24h volume $0, TVL $4.43, 0 swaps today
- ETH / 0.0001 (0.30% fee) — 24h volume $0, TVL $0.34, 0 swaps today
- ETH / UGHIBLY (0.30% fee) — 24h volume $0, TVL $0.03, 0 swaps today
- ETH / DVT (0.30% fee) — 24h volume $0, TVL $0.11, 0 swaps today
- ETH / TEE (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / W (0.30% fee) — 24h volume $0, TVL $0.36, 0 swaps today
- ETH / PIXIE (0.30% fee) — 24h volume $0, TVL $1.45, 0 swaps today
- ETH / unimon (0.30% fee) — 24h volume $0, TVL $4.91, 0 swaps today
- ETH / ZOOO (0.30% fee) — 24h volume $0, TVL $0.04, 0 swaps today
- ETH / schnoz (0.30% fee) — 24h volume $0, TVL $0.17, 0 swaps today
- ETH / BERRY (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / DE (0.30% fee) — 24h volume $0, TVL $0.62, 0 swaps today
- ETH / CETH (0.30% fee) — 24h volume $0, TVL $0.58, 0 swaps today
- ETH / OYEN (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- ETH / MAI (0.30% fee) — 24h volume $0, TVL $0.51, 0 swaps today
- ETH / KRAK (0.30% fee) — 24h volume $0, TVL $0.22, 0 swaps today
- ETH / Superchain (0.30% fee) — 24h volume $0, TVL $0.85, 0 swaps today
- ETH / MEMESZN (0.30% fee) — 24h volume $0, TVL $0.42, 0 swaps today
- ETH / Pope (0.30% fee) — 24h volume $0, TVL $1.24, 0 swaps today