Rewards hook on Ink

Uniswap v4 Hook Contract 0x7f9240e4f297a8ea9670ad40f931193df9e420cc on Ink · Rewards

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
2
Swaps (24h)
2 (1 traders)
Total swaps
2

What it does

This hook charges a fixed fee on swaps in the configured market, sending it to a treasury, so swappers pay the fee on every trade that goes through it while liquidity providers are not directly affected.

How it works step by step

  • Exposes a fixed fee in basis points via feeBps/FEE_BPS, a treasury address, and a market address, all as view getters
  • Implements beforeSwap and afterSwap callbacks that are nonpayable and can move currency through the pool manager (selector take(address,address,uint256) appears in the bytecode)
  • Uses beforeSwapReturnDelta and afterSwapReturnDelta permissions, so the hook can alter the swap amounts it returns to the pool manager
  • Keeps a single storage slot (slot 0) that is read and written during swap callbacks, most likely a running fee or total-fees accumulator exposed through totalFees
  • Reverts with NotMarket() and SellExactOutputUnsupported(), indicating the swap path is restricted to a specific market and to exact-input sells
  • Blocks liquidity add/remove and donate interactions only through standard view-style callbacks with no state changes observed in the decoded selectors
Swap behaviour
On each swap beforeSwap is called and the hook takes a fee (fixed FEE_BPS) from the swap currency through the pool manager, returning a delta that adjusts the swap; afterSwap then updates the stored total fee accounting. Swaps that are exact-output sells revert with SellExactOutputUnsupported, and swaps not routed through the configured market revert with NotMarket.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
A fixed fee in basis points (FEE_BPS / feeBps) is charged on swaps via return deltas and accumulated in totalFees, with proceeds directed to the treasury address. The pool's own static fee is not the only fee source.
Owner & admin controls
No owner, pause, upgrade or parameter-setter selectors were decoded, so no admin controls were found. Fee and treasury values appear to be fixed or set at deployment, but this cannot be confirmed without source.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize is used to validate pool setup; beforeSwap is used to restrict and fee-charge incoming swaps and return the adjusted delta; afterSwap is used to record fees and finalize the swap delta; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take a portion of the swap amounts directly.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, low confidence).

Who controls it: No admin selectors were decoded, so the hook appears non-upgradeable with fixed parameters, but a deployer could have embedded privileged logic that is not visible from selectors alone.

Risk to user funds: The hook can hold and move swap currency through the pool manager by taking a fee from swaps and sending it to the treasury, and it can revert swaps that do not match its market or direction rules.

Security findings

  • [medium] Hook takes currency via return deltas: The before and after swap return-delta permissions plus the take selector mean the hook moves user swap currency to the treasury on every swap, so the hook directly controls part of trader proceeds.
  • [low] Swap path gated by market check: NotMarket and SellExactOutputUnsupported reverts mean certain swaps will fail, which can block trades if the market address or swap direction is misconfigured.
  • [info] No source to verify fee logic: Without verified source, the exact fee calculation and any hidden owner-set parameters cannot be confirmed from the decoded functions.

Contract details

Verified source
No
Bytecode size
3,540 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Rewards hook