Fee sharing hook on Ethereum
Uniswap v4 Hook Contract 0xfe81d4bf52c79b0a1f00ddda3dbfadc9f91118cc on Ethereum · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook skims a share of swap currency through return deltas and credits it to creator and team balances that can be claimed later, though the exact fee rate and which trade directions pay more could not be determined from the bytecode.
How it works step by step
- Hook with beforeSwap and afterSwap callbacks that can return deltas, so it can take a share of swap amounts as currency movements into its own accounting
- Tracks per-pool state keyed by pool id via poolIdOf and poolInfo, and records a creator-earned amount per pool
- Maintains a per-creator fee ledger (creatorFees, totalUnclaimed) that creators and a team recipient can withdraw through claimCreator and claimTeam
- Supports transferring creator rights between addresses via transferCreator, gated by a NotCreator check
- Has pulse and rate-related views (pulseOf, START_RATE, INACTIVITY, BPS) and a ping function, suggesting time-based or activity-based logic in swaps
- Calls take and transfer on the pool manager and ERC20 tokens to pay out accumulated balances
- Swap behaviour
- beforeSwap and afterSwap are both enabled and can return deltas, so the hook can adjust swap amounts and skim a portion of the traded currency during swaps; the exact formula could not be determined from decoded bytecode alone, so it is unclear which trade directions pay more or less.
- Liquidity behaviour
- beforeAddLiquidity is enabled and may gate or inspect liquidity additions; no liquidity removal callback is enabled.
- Fee behaviour
- Fees appear to be skimmed by the hook via return deltas on swaps and accrued to creator and team ledgers rather than set as a dynamic LP fee; exact rates are not determinable from the input.
- Owner & admin controls
- Creator-level control: creators can claim their fees and transfer creator rights (transferCreator). A team recipient can claim team fees (claimTeam). No pause or upgrade functions were identified in the dispatched selectors; ownership and upgradeability could not be fully confirmed from bytecode.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize records pool setup on pool creation; beforeAddLiquidity checks liquidity additions; beforeSwap can return a delta to take or adjust currency before the swap; afterSwap records swap results and can return a delta for post-swap accounting; beforeSwapReturnDelta and afterSwapReturnDelta allow the hook to move currency.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A creator address controls its own accrued fees and can transfer that role; a team recipient address controls team fee claims. No owner-wide parameter setters were identified in decoded selectors.
Risk to user funds: The hook can take a share of swap currency through return deltas and holds accrued balances, so user swap proceeds flow partly into hook-controlled accounting.
Security findings
- [medium] Hook takes currency via return deltas: beforeSwapReturnDelta and afterSwapReturnDelta are enabled and the bytecode calls take and transfer, so the hook moves a share of user swap proceeds into its own accounting.
- [info] Creator and team claim paths: claimCreator, claimTeam and transferCreator control withdrawal of accrued fees; a compromised creator key could redirect the creator's accrued balance.
- [medium] Source not verified: No verified source is available, so the exact fee formula, any upgrade or owner paths and the rounding behaviour could not be audited.
Contract details
- Verified source
- No
- Bytecode size
- 11,641 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, fee-sharing, moves-currency, return-delta
Pools using Fee sharing hook
- TEST / SHIB (0.00% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- TEST2 / BNB (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today