Rewards hook on Base
Uniswap v4 Hook Contract 0x98cc9a95f63d42a78ac148cad835305243d420cc on Base · Rewards
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 26 (18 traders)
- Total swaps
- 26
What it does
This hook charges a basis-point toll on swaps and collects it through return deltas, with buy limits and per-pool toll settings, so swappers pay the toll while LPs are not directly affected.
How it works step by step
- Charges a toll on swaps, expressed in basis points and bounded by a MAX_TOLL_BPS constant, with a BASE_TOLL_BPS baseline and per-pool toll values stored by pool id
- Tracks per-pool statistics such as swap counts and accumulated toll totals in storage
- Limits buys through a MAX_BUY constant and reverts with BuyTooLarge when exceeded
- Records a buys mapping per address, suggesting per-account buy accounting
- Takes currency from the pool manager via a take call and uses return deltas to alter the swap amounts it settles
- Maintains a reserve value and a token/feed reference, suggesting the toll is captured for a reserve rather than given to LPs
- Swap behaviour
- beforeSwap and afterSwap run on every swap. beforeSwap can return a delta that adjusts the swap and charges a toll, while afterSwap updates totals and buy records. Which trades pay more or less cannot be confirmed without source, since the toll logic depends on the swap direction and buy limits in the decoded bytecode.
- Liquidity behaviour
- Liquidity add and remove callbacks are exposed as view stubs and are not expected to change state, so liquidity is not directly taxed by the hook.
- Fee behaviour
- The hook applies a toll in basis points taken through return deltas on swaps, with a base toll and a per-pool toll value. The pool's own LP fee is separate from this toll.
- Owner & admin controls
- An OPERATOR function and a poolManager reference exist, suggesting an operator role, but the decoded bytecode does not show how the operator is set or what parameters it can change. Whether toll values can be updated after deployment is unclear.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize registers pools and their per-pool parameters. beforeSwap computes and applies the toll and buy check through a return delta. afterSwap records swap statistics and buy accounting. afterSwapReturnDelta and beforeSwapReturnDelta let the hook take a share of swap currency.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: A privileged operator may be able to change toll rates and manage pool parameters that affect the amount of every swap.
Risk to user funds: The hook holds or receives swap currency through return deltas and take calls, and buy limits can block trades, so user funds are directly exposed to the toll and the hook's accounting.
Security findings
- [high] Hook takes currency via return deltas: Before and after swap return deltas let the hook alter the amounts settled to users, so every swap through the pool pays the toll to the hook.
- [medium] Operator role without visible bounds: An OPERATOR function and per-pool toll storage exist, but the decoded bytecode does not show a hard cap on updates beyond MAX_TOLL_BPS, so the operator may be able to change tolls.
- [medium] Buy limit can block swaps: The BuyTooLarge revert in the swap path can block large buys, which is a restriction on user trades.
- [low] Proxy or upgrade status unknown: No source is available, so upgradeability and any admin-controlled logic cannot be ruled out.
Contract details
- Verified source
- No
- Bytecode size
- 8,143 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, tax