Rewards hook on Ethereum
Uniswap v4 Hook Contract 0xf501a969b9e1ea070da17fefbdc45d2c9153e0cc on Ethereum · Rewards
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 2
- Swaps (24h)
- 41 (22 traders)
- Total swaps
- 41
What it does
This hook charges a capped tax on swaps in configured pools and routes it to the platform, creator, buyback and reward buckets, so traders pay the tax on each swap while liquidity providers receive no extra fee.
How it works step by step
- Hook exposes beforeInitialize, beforeSwap, afterSwap and both return-delta flags, so it can take a cut of swap amounts and settle them itself through the PoolManager
- Maintains per-pool configuration (configs mapping keyed by address) set at pool creation via a 9-parameter setup call that defines tax and split parameters with hard-capped maximum tax
- Accumulates platform fees (platformOwed, claimPlatform) and creator fees (creatorOwed, claimCreator) in separate balance mappings
- Runs a buyback routine (buyback) that uses accumulated funds to acquire tokens, with burnBucket tracking burned amounts
- Uses an unlockCallback re-entrant pattern to settle accounting through the PoolManager, and a notifyReward call suggests distribution of rewards to a staking hub
- Ownable, with setHub and setCreator administrative functions and renounceOwnership
- Swap behaviour
- beforeSwap and afterSwap run on every swap; they compute a tax in basis points (bounded by HARD_MAX_TAX_BPS) and use return deltas to take a portion of the swap amount, which is split between platform, creator, buyback and reward buckets. Exact direction-dependent rates cannot be fully confirmed from decoded bytecode.
- Liquidity behaviour
- No explicit liquidity callbacks are enabled; the hook is described by the heuristic tags as liquidity-management, but no add/remove liquidity hooks are present in the permissions.
- Fee behaviour
- A tax is taken from swaps via return deltas, rather than through the pool's LP fee; the tax rate is stored per pool in configs and capped by HARD_MAX_TAX_BPS. Recipients are the platform, creator, buyback/burn and reward buckets.
- Owner & admin controls
- Owner can set the hub address (setHub) and creator addresses (setCreator), and can renounce ownership. Pausing or a fee-rate change function was not identified from the selectors, but parameters are set through configuration at pool creation.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize registers and configures each new pool; beforeSwap computes and gates the tax before the swap executes; afterSwap settles the tax amount after the swap; beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency from the swap.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner controls the hub and creator routing and can renounce ownership; a privileged key could redirect accumulated platform, creator and reward funds to addresses it selects.
Risk to user funds: The hook holds swap-derived fee balances and moves currency through the PoolManager via take and settle calls, so it can hold and move funds taken from swaps; it does not appear to block swaps outright.
Security findings
- [medium] Return-delta tax on every swap: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take currency from every swap of configured pools, so user swap output is reduced by the tax.
- [medium] Owner can change hub and creator routing: setHub and setCreator let the owner redirect where reward and creator funds are sent, which affects accumulated balances.
- [medium] Unverified source: No verified source is available, so the exact tax math, buyback execution and whether tax rates can be changed after deployment could not be confirmed.
- [info] Buyback uses hook-held funds: The buyback function spends accumulated fees to acquire tokens, which is a trust point if the routing or price is manipulable.
Contract details
- Verified source
- No
- Bytecode size
- 11,766 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, liquidity-management, moves-currency, ownable, return-delta, rewards, self-unlock, tax
Pools using Rewards hook
- KINDLE / IMD (0.00% fee) — 24h volume $0, TVL $0, 39 swaps today
- TEST / IMD (0.00% fee) — 24h volume $0, TVL $0, 2 swaps today