Fee sharing hook on Ink
Uniswap v4 Hook Contract 0x988def0198f52ded18d7265be2b787db3ca630cc on Ink · Fee sharing
- Volume (24h)
- $3.36K
- Value locked (TVL)
- $15.10K
- All-time volume
- $521.98K
- Pools using this hook
- 1
- Swaps (24h)
- 14 (10 traders)
- Total swaps
- 3,891
What it does
A Uniswap v4 hook that appears to take a fee on swaps and send it to a treasury address, with the fee rate and treasury exposed through view functions.
How it works step by step
- Records or validates pool state on initialization via beforeInitialize and afterInitialize
- Runs custom logic before each swap through beforeSwap
- Runs custom logic after each swap through afterSwap
- Adjusts swap currency deltas through beforeSwapReturnDelta and afterSwapReturnDelta
- Calls take() on the PoolManager to withdraw a fee amount
- Exposes feePips() and treasury() as view functions describing the fee and its destination
- Swap behaviour
- beforeSwap and afterSwap run custom logic, and return deltas let the hook take a fee amount from the swap's currency via take().
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Exposes feePips() and treasury(), and the hook calls take(), suggesting it skims a fee on swaps and routes it to a treasury address; exact fee math could not be confirmed without source.
- Owner & admin controls
- No owner or pause selectors found; treasury() and feePips() are exposed as views, and no setter for them was decoded, so admin controls are not determinable from bytecode alone.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize and afterInitialize inspect or record pool setup; beforeSwap and afterSwap run custom swap logic; beforeSwapReturnDelta and afterSwapReturnDelta let the hook adjust the swap's currency deltas, which the take() call uses to move a fee amount.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: Treasury and fee parameters are exposed as views; if they are settable by an owner key that could not be detected here, that key could redirect fee proceeds or change the fee rate.
Risk to user funds: The hook can take a portion of swap currency through the return-delta mechanism and send it to the treasury, so traders may pay an extra fee; it does not appear to hold LP principal, but this could not be fully verified.
Security findings
- [medium] Hook moves swap currency via return deltas: The hook calls take() and has beforeSwapReturnDelta and afterSwapReturnDelta enabled, so it can withdraw currency from the PoolManager during swaps.
- [low] Fees routed to a treasury address: Fee destination is exposed through treasury(), so proceeds are routed to an address the pool does not control.
- [info] Unverified source limits analysis: No source is verified and no storage layout was inferred, so the setter logic, fee caps and any upgrade path cannot be checked.
Contract details
- Verified source
- No
- Bytecode size
- 2,904 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Fee sharing hook
- WETH / IKA (Dynamic fee) — 24h volume $3.36K, TVL $15.10K, 14 swaps today