Fee sharing hook on Polygon
Uniswap v4 Hook Contract 0x1b1f802f0537cbb784157bbb70a2f48c8eec8088 on Polygon · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 6
What it does
A Uniswap v4 hook that takes a percentage fee on swaps in one pool and holds it for the owner to withdraw.
How it works step by step
- Runs custom logic in beforeSwap on every swap in the pool
- Takes a fee in basis points (HOOK_FEE_BPS) from swap amounts using a return delta
- Accumulates taken fees per token in feeBalance storage
- Allows an owner or executor-controlled flow to withdraw fees with withdrawFees
- Can pause swaps through a swapsEnabled flag toggled by the owner
- Swap behaviour
- beforeSwap runs on every swap, can be blocked when swapsEnabled is false, and takes a basis-point fee from the swap via a return delta.
- Liquidity behaviour
- Liquidity add and remove callbacks exist as view stubs that do not modify state; no liquidity-specific logic is clearly active.
- Fee behaviour
- A hook fee is taken on swaps in basis points (HOOK_FEE_BPS, denominator BPS_DENOMINATOR) and accumulated per token in feeBalance, withdrawable by the owner; the pool itself uses V4_POOL_FEE.
- Owner & admin controls
- Owner (transferOwnership, withdrawFees) can withdraw accumulated hook fee balances via withdrawFees. Owner can set the executor address and toggle swapsEnabled via setSwapsEnabled, which can pause swaps. Executor role is set by owner-controlled setExecutor. No upgrade mechanism detected.
Enabled Uniswap v4 callbacks
beforeSwap, beforeSwapReturnDelta
beforeSwap is used to run custom swap logic and beforeSwapReturnDelta lets the hook return a delta so it can take a cut of the swap amount and move currency.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can withdraw accumulated fees, pause swaps through setSwapsEnabled, and change the executor, so a privileged key controls fee revenue and trading availability.
Risk to user funds: The hook takes a share of swap currency via return deltas and holds it in fee balances, which the owner can withdraw. Swaps can be blocked by the owner, but existing LP positions are not directly seized by the decoded logic.
Security findings
- [medium] Owner can pause swaps: setSwapsEnabled lets the owner halt swaps through the hook, blocking all trades routed through this pool.
- [medium] Hook holds user-derived tokens: beforeSwapReturnDelta with moves-currency tags means the hook takes tokens from swaps and holds them in feeBalance until withdrawn.
- [low] Owner can withdraw accumulated fees: withdrawFees lets the owner transfer accumulated fee balances to any address.
- [info] Single-key administration: Ownable pattern with transferOwnership and an executor role gives a single key broad control over the hook.
Contract details
- Verified source
- No
- Bytecode size
- 5,470 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta
Pools using Fee sharing hook
- RNT / USDT0 (0.50% fee) — 24h volume $0, TVL $0, 0 swaps today