Utility hook on Optimism
Uniswap v4 Hook Contract 0x50c10069758f6e8dffef8107a7e0898328613a80 on Optimism · Utility
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $207
- Pools using this hook
- 3
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 76
What it does
A Uniswap v4 hook that applies configurable internal and external swap fees and tracks staking-style rewards for liquidity providers, with privileged roles able to adjust fees and mint rates.
How it works step by step
- Records pool initialization in beforeInitialize and afterInitialize
- Sets swap fees through an internal versus external address classification
- Tracks per-user stake amounts and pending rewards in storage
- Updates reward accounting on liquidity add and remove
- Exposes a mint rate and a reward index that a manager can adjust
- Uses role-based access for admin functions
- Swap behaviour
- beforeSwap is implemented and charges a fee chosen from the internal or external fee setting based on whether the sender is flagged as an internal address.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity update per-user staking-style accounting (balances and reward indices in storage) and may mint or track a reward token; afterAddLiquidity and afterRemoveLiquidity are exposed as view stubs.
- Fee behaviour
- Pool fees are configurable: internalFee and externalFee are stored and can be changed by a manager via setFee; swaps can be charged a differentiated fee depending on whether the sender is flagged as an internal address.
- Owner & admin controls
- Owner-style role system (DEFAULT_ADMIN_ROLE and MANAGER_ROLE via grantRole/revokeRole) can call setFee(bool,uint24) to change internal/external pool fees, setMintRate(uint256), setInternalAddress(address,bool), updateManager(address,address), and returnSuperDCATokenOwnership(); transferOwnership is also referenced in bytecode.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap
beforeInitialize and afterInitialize record pool setup; beforeAddLiquidity and beforeRemoveLiquidity update reward and stake accounting; beforeSwap applies the internal or external fee logic for the sender; no return-delta permissions are declared.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: A privileged manager or admin can change swap fees through setFee, alter the mint rate, and reassign internal-address status, which directly affects what traders pay and which addresses get preferential fees.
Risk to user funds: The hook receives pool callbacks and references settle, donate and token transfer selectors, so it can move or account for tokens around liquidity changes and swaps; the admin fee controls can make swaps more expensive, but no evidence of a pause that blocks withdrawals was found in the selectors.
Security findings
- [medium] Admin-adjustable swap fees: setFee(bool,uint24) lets a privileged role set internal or external fees; the bytecode does not show an enforced upper bound in the decoded selectors, so fees could be set very high.
- [low] Adjustable mint rate: setMintRate and the reward index logic let privileged accounts influence token issuance tied to liquidity activity.
- [info] Token minting and transfers in hook: Bytecode references mint and transferFrom calls, meaning the hook can mint and move tokens; this is inferred from selectors only.
- [info] Role-based admin model: Role-based access (grantRole/revokeRole) and an ownership-transfer selector are present; without source, the exact admin trust model cannot be confirmed.
Contract details
- Verified source
- No
- Bytecode size
- 17,923 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, 0 swaps today
- UNI / DCA (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today