Utility hook on Optimism
Uniswap v4 Hook Contract 0xb4f4ad63bcc0102b10e6227236e569dce0d97a80 on Optimism · Utility
- Volume (24h)
- $0
- Value locked (TVL)
- <$0.01
- All-time volume
- $31.72K
- Pools using this hook
- 4
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 19,746
What it does
A utility hook that tracks staking and rewards around Uniswap v4 pool liquidity and applies a configurable fee that can differ for whitelisted internal addresses.
How it works step by step
- Applies internal and external fee tiers on swaps, with the internal tier selected via an address whitelist
- Tracks per-user staked amounts and reward indices across liquidity add and remove events
- Mints or settles SuperDCA tokens and rewards as liquidity changes
- Exposes role-based admin functions for fees, mint rate and whitelist management
- Handles ownership of the SuperDCA token through manager and ownership functions
- Swap behaviour
- beforeSwap checks whether the sender is an internal address and applies the corresponding configured fee (internal or external) to the swap.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity callbacks track staked amounts per user and pool (storage slots for stakes and rewards), and the hook appears to mint or settle tokens during liquidity events.
- Fee behaviour
- Fees are set by setFee(bool,uint24) with separate internal and external pool fee values; the hook is intended to charge different fees depending on whether the swapper is an internal address. Exact fee application and sharing could not be fully confirmed from bytecode.
- Owner & admin controls
- Owner-style controls via role-based access (DEFAULT_ADMIN_ROLE and MANAGER_ROLE): roles can be granted and revoked, setFee(bool,uint24) changes internal/external pool fee, setMintRate changes mint rate, setInternalAddress whitelists addresses, updateManager and returnSuperDCATokenOwnership handle ownership of the SuperDCA token; transferOwnership is referenced in bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap
beforeInitialize and afterInitialize initialize pool-level state; beforeAddLiquidity and beforeRemoveLiquidity update staking and reward accounting; beforeSwap reads the internal-address whitelist and fee configuration to determine the swap fee; beforeDonate and afterDonate and afterSwap/afterAddLiquidity/afterRemoveLiquidity are present as selectors.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: Holders of the admin or manager roles can change fees, mint rate and the internal-address whitelist, which alters what traders and LPs pay and who receives preferential treatment. Ownership of the SuperDCA token can be transferred or returned by privileged roles.
Risk to user funds: The hook can hold and move tokens through pool manager settle and take calls and mint or transfer tokens during liquidity and swap events, so privileged parameter changes can affect the fees and amounts users receive; no source is available so exact fund-flow paths are inferred.
Security findings
- [high] Admin-settable swap fee: setFee lets a privileged role set the internal and external fee to any uint24 value, so a malicious or compromised admin could set a very high fee on swaps.
- [medium] Adjustable mint rate: setMintRate and mint-related calls allow privileged changes to token issuance rate, which can dilute holders if misused.
- [medium] Role concentration risk: Role-based access allows granting and revoking DEFAULT_ADMIN_ROLE and MANAGER_ROLE, so control rests with whoever holds those roles; no timelock or multisig requirement is visible in the bytecode.
- [info] Hook moves currency: The hook calls the pool manager to settle and take currency and uses donate and transfer paths, so it can move pool and user funds during liquidity and swap callbacks.
- [info] Mixed ownership model: Bytecode contains an ownership-transfer selector and ownable-style tags, indicating an Ownable pattern alongside roles.
Contract details
- Verified source
- No
- Bytecode size
- 17,720 bytes
- Upgradeable proxy
- No
- Detected patterns
- donates, moves-currency, ownable
Pools using Utility hook
- USDC / DCA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- ETH / DCA (Dynamic fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- WBTC / DCA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today
- OP / DCA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today