FeeSplitLib on Ink
Uniswap v4 Hook Contract 0xb272467941f4d2431963b103e7e604c1e737aac8 on Ink · Fee sharing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $24
- All-time volume
- $35
- Pools using this hook
- 5
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 48
What it does
This hook takes a configurable tax on swaps and sends the proceeds to creators, protocol, a backed floor, token burns, holder airdrops and buybacks, so traders pay a higher fee while the tax is active and LPs are not directly favoured by this mechanism.
How it works step by step
- Hooks the pool's swap path (afterSwap and beforeSwapReturnDelta) so a hook tax is taken from swap fees and handed to FeeSplitLib for distribution.
- FeeSplitLib splits each fee amount into a creator share, a protocol share (routed via ProtocolRevenueDistributor), an optional HKIT share, and a hook pot.
- The hook pot is further routed by configured bps to FloorVault (backed floor), auto-burn, deepen-LPs, HolderAirdropVault, or a hook-to-creator cut, with any rounding dust going to protocol.
- Creator proceeds go to FeeEscrow, BuybackVault vesting streams, or ProtocolRevenueDistributor depending on flags and the native token.
- beforeInitialize, beforeAddLiquidity and beforeRemoveLiquidity are enabled, so pool initialization and liquidity changes pass through hook logic that is not visible in the decoded summary.
- Contract is upgradeable behind a proxy; the implementation is the one analysed here.
- Swap behaviour
- On swaps the hook uses beforeSwap and afterSwap to take a hook tax from the swap fee (via return deltas) and forwards it into FeeSplitLib, which divides it between creator, protocol, floor, burn, airdrop and buyback destinations; the exact taxed amount depends on the per-pool bitmask configuration (hookTaxBps and module bps) and is not fixed in the source shown.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity are enabled; the visible source does not show their logic, so liquidity callbacks are present but their behaviour could not be fully determined from the input.
- Fee behaviour
- Fees are base fee plus hookTaxBps (capped by ProtocolConstants.MAX_TOTAL_FEE_BPS, stated as 10%), optionally with a dynamic fee range and anti-snipe opening tax; the collected fee is split roughly 60/10/30 base shares plus routed hook-pot modules, and the hook pot is fully routed to configured sinks.
- Owner & admin controls
- Owner-controlled: setOperator grants operator rights on the vaults and distributor; owner can change ops treasury, native token, flywheel mode, fee rail, buyback executor, and can reassign ownership; the implementation is behind an upgradeable proxy, so the owner or proxy admin can replace the logic.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta
beforeInitialize: pool setup checks or config recording. beforeAddLiquidity and beforeRemoveLiquidity: liquidity gating or accounting hooks. beforeSwap: fee/tax computation and return-delta fee capture. afterSwap: distribution of collected tax through FeeSplitLib. beforeSwapReturnDelta: lets the hook take a share of swap amounts, which moves user or pool funds.
Security & trust assessment
Risk level: high (verified source, medium confidence).
Who controls it: The owner and operators can reconfigure fee destinations, reassign ownership, and grant operator rights that can move accounted balances in vault contracts; a proxy admin can replace the entire hook logic.
Risk to user funds: Swap-time tax and hook-pot routing mean the hook holds or forwards traders' fee amounts through FeeSplitLib into external vault contracts, and upgradeability means pool and user funds depend on trust in the admin key.
Security findings
- [high] Upgradeable proxy: Hook delegates every call to implementation 0x784634c0916a97076bba3a4ff5fb51ea2c3dec34; whoever controls the proxy admin can swap the logic and change fee routing or the tax without users' consent.
- [high] Hook takes funds via return deltas: beforeSwapReturnDelta is enabled and the hook routes tax into many external vaults, so the hook can capture a portion of every swap, which directly moves user funds.
- [medium] Configurable hook tax: hookTaxBps and routing percentages are set per pool in a bitmask; the cap is 10% total steady fee in the library but the source for the cap constant was omitted, so the real maximum could not be verified.
- [medium] Operator and owner powers over vaults: Owner can add operators who can credit, deposit and drain accounting in FloorVault, FeeEscrow, BuybackVault and HolderAirdropVault; the owner can also redirect ops treasury and buyback executor.
- [info] Liquidity callbacks not fully visible: beforeAddLiquidity and beforeRemoveLiquidity are enabled but their implementation was not included in the provided source, so their effect on LPs could not be assessed.
Contract details
- Verified source
- Yes (FeeSplitLib)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 22,178 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- erc20, fee-sharing, return-delta, upgradeable
Pools using FeeSplitLib
- ETH / HTST (0.00% fee) — 24h volume $0, TVL $24, 0 swaps today
- LINK / wAAPLx (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- LINK / wAMZNx (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- LINK / wGOOGLx (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- LINK / wNVDAx (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today