Fee sharing hook on Unichain
Uniswap v4 Hook Contract 0xcc2efb167503f2d7df0eae906600066aec9e8444 on Unichain · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $12.01K
- All-time volume
- $1.57M
- Pools using this hook
- 114
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 551,558
What it does
A fee-sharing hook that skims a fee from swaps and distributes it to a referral tree, a creator and a fee recipient.
How it works step by step
- Charges a total fee on swaps, defined by TOTAL_FEE over FEE_DENOMINATOR.
- Splits the collected fee among L1, L2 and L3 referral levels and a creator fee.
- Uses afterSwapReturnDelta to take the fee from swap output currency.
- Calls the pool manager take function to withdraw fee currency.
- Stores a feeRecipient address that receives the remaining fee share.
- Manages admin and role permissions via AccessControl.
- Swap behaviour
- afterSwap computes a fee on swap output, takes it through the pool manager via a return delta, and routes it to referral and creator shares and the fee recipient.
- Liquidity behaviour
- afterAddLiquidity is enabled and the hook implements afterRemoveLiquidity and before/after liquidity selectors as ABI entries; the bytecode does not clearly show custom liquidity logic beyond the permission flag, so liquidity handling appears to be pass-through.
- Fee behaviour
- The hook exposes TOTAL_FEE, FEE_DENOMINATOR, REFERRAL_FEE, L1/L2/L3_REFERRAL_FEE and CREATOR_FEE constants and a feeRecipient, indicating afterSwap takes a fee from swap output and distributes it across a referral tree and a creator, with the remainder going to feeRecipient. Exact percentages are not readable from the decoded input.
- Owner & admin controls
- AccessControl with DEFAULT_ADMIN_ROLE and ADMIN_ROLE; role holders can grant and revoke roles and call setFeeRecipient to change where fees are sent. Source is unverified so the exact role gating is inferred from selectors only.
Enabled Uniswap v4 callbacks
afterAddLiquidity, afterSwap, afterSwapReturnDelta
afterAddLiquidity: runs after liquidity is added, likely for bookkeeping. afterSwap: runs after each swap to compute and collect fees. afterSwapReturnDelta: lets the hook take a share of the swap's output currency via a return delta, which is how fees are skimmed from swaps.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: Holders of DEFAULT_ADMIN_ROLE or ADMIN_ROLE can grant roles to new addresses and redirect fee revenue by changing feeRecipient, potentially diverting protocol or referral fees.
Risk to user funds: The hook can take a fee in the swap output currency on every swap through its return delta and withdraws currency from the pool manager; it does not appear to hold a long-term user balance, but it does participate in every swap's settlement.
Security findings
- [medium] Hook takes swap output via return delta: afterSwapReturnDelta lets the hook take part of swap output via the pool manager, so the hook directly moves user-facing currency on every swap.
- [medium] Privileged fee recipient change: setFeeRecipient is callable by privileged roles and redirects accumulated fee flows, so a compromised admin key could divert fees.
- [info] Pool currency withdrawals: Bytecode references a take(address,address,uint256) call to the pool manager, meaning the hook withdraws currency from the pool on swaps.
- [info] Unverified source: No verified source is available, so fee math, role gating and upgradeability cannot be confirmed from the code.
Contract details
- Verified source
- No
- Bytecode size
- 6,261 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Fee sharing hook
- PINKLADY / SOL (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / HOOF (0.01% fee) — 24h volume $0, TVL $2.71K, 0 swaps today
- ETH / ABE (0.01% fee) — 24h volume $0, TVL $1.06K, 0 swaps today
- UDOG / UNI (0.01% fee) — 24h volume $0, TVL $4.42K, 0 swaps today
- ETH / PINK (0.01% fee) — 24h volume $0, TVL $1.04K, 0 swaps today
- UNI / UCAT (0.01% fee) — 24h volume $0, TVL $391, 0 swaps today
- KOA / SOL (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today
- UNI / UDERP (0.01% fee) — 24h volume $0, TVL $958, 0 swaps today
- ETH / DOGE (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today
- UDOG / UNI (0.01% fee) — 24h volume $0, TVL $160, 0 swaps today
- ETH / GNUS (0.01% fee) — 24h volume $0, TVL $755, 0 swaps today
- ETH / UNIK (0.01% fee) — 24h volume $0, TVL $0.53, 0 swaps today
- FBCT / SOL (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / WYNNPIG (0.01% fee) — 24h volume $0, TVL $54, 0 swaps today
- Upepe / UNI (0.01% fee) — 24h volume $0, TVL $12, 0 swaps today
- SOL / UDOG (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / Unimon (0.01% fee) — 24h volume $0, TVL $50, 0 swaps today
- ETH / UNE (0.01% fee) — 24h volume $0, TVL $2.17, 0 swaps today
- ETH / COOL (0.01% fee) — 24h volume $0, TVL $3.16, 0 swaps today
- FUNM / SOL (0.01% fee) — 24h volume $0, TVL $0, 0 swaps today