Fee sharing hook on Arc
Uniswap v4 Hook Contract 0x268b41c0614d066dfc858455cb8f733deb3b04cc on Arc · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $793
- All-time volume
- $1.93M
- Pools using this hook
- 83
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 24,888
What it does
A Uniswap v4 hook that takes a configurable fee on swaps in registered pools and splits it between creator, treasury, referral and jackpot recipients.
How it works step by step
- Takes a configurable total fee from swaps on pools it manages via return deltas.
- Splits collected fees among creator, treasury and referral shares using stored share values.
- Tracks registered tokens and pools and records liquidity additions via afterAddLiquidity.
- Supports referral-tree bookkeeping and jackpot ticket accounting (addTickets, triggerJackpot).
- Uses role-based access control so that privileged roles can change fee parameters and recipients.
- Swap behaviour
- beforeSwap and afterSwap are enabled and use return deltas, so the hook takes a fee from each swap and distributes it according to the stored fee split.
- Liquidity behaviour
- afterAddLiquidity is enabled and the hook reads and writes registration state for the pool. beforeAddLiquidity and beforeRemoveLiquidity are only view-level in the dispatch table and do not appear to alter liquidity flows.
- Fee behaviour
- Total fee is stored in a storage slot set via setTotalFee and split among creator, treasury, referral and a jackpot-style mechanism using setFeeSplit with shares read from storage (creatorFeeShare, treasuryFeeShare, referralFeeShare). Fee shares are applied in beforeSwap/afterSwap, which return deltas, so the hook takes a portion of swap currency as a fee.
- Owner & admin controls
- Role-based access control with DEFAULT_ADMIN_ROLE and ADMIN_ROLE (grantRole, revokeRole, renounceRole). Admin-gated setters include setTotalFee, setFeeSplit, setFeeRecipient, setLauncher, setWhitelistedRelayer, registerToken and parameter setters 0x34d65475, 0x6addd3cc and 0xe0b0f6c9. A reads-only mapping keyed on a constant slot is gated by an access modifier on several writers.
Enabled Uniswap v4 callbacks
afterAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterAddLiquidity: records or processes liquidity additions for registered pools. beforeSwap: computes and applies the fee split via return delta. afterSwap: finalizes fee accounting and referral or jackpot bookkeeping after the swap. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take a portion of swap amounts as fees, so it can move pool currency.
Security & trust assessment
Risk level: medium (decoded bytecode, medium confidence).
Who controls it: Holders of DEFAULT_ADMIN_ROLE or ADMIN_ROLE can change the total fee, the fee split, the fee recipient and the launcher, and can whitelist relayers and register tokens. A malicious or compromised admin could raise fees substantially or redirect fee recipients.
Risk to user funds: The hook can take a portion of swap input or output via return deltas, and admin functions can raise that portion. It is not clear from the decoded bytecode whether it can block swaps outright or hold residual balances.
Security findings
- [info] Return-delta fee capture: The hook takes currency via beforeSwapReturnDelta and afterSwapReturnDelta, so it actively moves funds during swaps rather than only observing them.
- [medium] Admin-adjustable fee rate: setTotalFee and setFeeSplit are admin-callable and can change the fee rate and distribution without a timelock visible in the bytecode.
- [medium] Admin can redirect fee destination: setFeeRecipient and setLauncher can redirect collected fees or the launcher address; the storage layout shows no timelock.
- [low] Dependence on external contracts: The hook calls external functions such as take and addTickets on other contracts, so its correctness depends on those contracts, which are not verified here.
Contract details
- Verified source
- No
- Bytecode size
- 13,244 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Fee sharing hook
- USDC / AKA (0.00% fee) — 24h volume $0, TVL $705, 0 swaps today
- USDC / AKA (0.00% fee) — 24h volume $0, TVL $0.16, 0 swaps today
- USDC / LILO (0.00% fee) — 24h volume $0, TVL $3.60, 0 swaps today
- USDC / AKACAT (0.00% fee) — 24h volume $0, TVL $0.15, 0 swaps today
- USDC / Caesar (0.00% fee) — 24h volume $0, TVL $0.58, 0 swaps today
- USDC / akafun (0.00% fee) — 24h volume $0, TVL $3.57, 0 swaps today
- USDC / AKACAT (0.00% fee) — 24h volume $0, TVL $8.68, 0 swaps today
- USDC / AKADOG (0.00% fee) — 24h volume $0, TVL $0.92, 0 swaps today
- USDC / MASK (0.00% fee) — 24h volume $0, TVL $0.88, 0 swaps today
- USDC / AKA (0.00% fee) — 24h volume $0, TVL $0.26, 0 swaps today
- USDC / AKAT (0.00% fee) — 24h volume $0, TVL $0.08, 0 swaps today
- USDC / AKADABRA (0.00% fee) — 24h volume $0, TVL $2.64, 0 swaps today
- USDC / AKA (0.00% fee) — 24h volume $0, TVL $1.69, 0 swaps today
- USDC / VJAR (0.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- USDC / AKA (0.00% fee) — 24h volume $0, TVL $1.73, 0 swaps today
- USDC / XNAN (0.00% fee) — 24h volume $0, TVL $12, 0 swaps today
- USDC / AK (0.00% fee) — 24h volume $0, TVL $25, 0 swaps today
- USDC / AROS (0.00% fee) — 24h volume $0, TVL $9.81, 0 swaps today
- USDC / AKA (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / Architects (0.00% fee) — 24h volume $0, TVL $0.73, 0 swaps today