Custom pricing hook on Ethereum
Uniswap v4 Hook Contract 0x09922e1c707a3e0748c883e6a87efb38e02168a8 on Ethereum · Custom pricing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A Uniswap v4 hook that runs custom swap pricing backed by stored reserves and external vault integration, instead of the standard constant-product curve.
How it works step by step
- Stores two reserve values in a packed storage slot and reads them on swaps and quotes
- Computes swap quotes through computeQuote and exposes limits through getLimits
- Runs logic in beforeSwap that can change swap amounts via return delta
- Takes and settles currency through the pool manager using take and settle
- Interacts with external ERC4626 style vaults via deposit, convertToAssets and maxDeposit
- Gates pool initialization, liquidity changes and donations through before-hooks
- Swap behaviour
- beforeSwap is called on every swap and can modify amounts through return delta, while the hook reads reserves and computes quotes to price the swap.
- Liquidity behaviour
- beforeAddLiquidity and beforeRemoveLiquidity are dispatched as view functions, which suggests they only check or revert; afterAddLiquidity and afterRemoveLiquidity are also view. Liquidity is managed through an external reserve storage slot rather than the pool's own liquidity.
- Fee behaviour
- Fee behaviour cannot be determined from the decoded bytecode; the presence of computeQuote and getParams suggests a custom pricing curve rather than the pool's static fee.
- Owner & admin controls
- No admin controls found in the decoded functions. The activate function appears to be callable to set reserves (uint112,uint112) and no owner or access check is visible in the decoded bytecode, so anyone may be able to call it; this should be confirmed.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeDonate, beforeSwapReturnDelta
beforeInitialize: validates or sets up the pool at creation. beforeAddLiquidity: gate on adding liquidity. beforeSwap: hook logic run before each swap, which can alter the swap via return delta. beforeDonate: gate on donations. beforeSwapReturnDelta: lets the hook change swap amounts and take or settle currency itself.
Security & trust assessment
Risk level: high, estimated (decoded bytecode, low confidence).
Who controls it: If activate can be called by anyone, a third party could set reserve values and distort pricing for the pool. Other privileged roles could not be identified from the bytecode.
Risk to user funds: The hook can take and settle currency during swaps and deposits into external vaults, so it can hold or move pool funds. Whether it can block withdrawals could not be determined from the bytecode.
Security findings
- [high] Hook can move currency during swaps: The hook has beforeSwapReturnDelta enabled and the bytecode calls take, settle and transfer, so it can move pool currency during swaps.
- [medium] Upgradeable proxy: The contract is a proxy delegating to implementation 0x22c4f99147d9c18254159dbf31f55cc5bd5685c9, which can be changed if the proxy admin can upgrade it; the upgrade authority was not identified.
- [high] Possibly unrestricted reserve setter: activate((uint112,uint112)) is a state-changing function with no visible access control in the decoded output, and it writes to the reserve storage slot used by swap pricing.
- [medium] Depends on external vaults: The bytecode includes calls to ERC4626 and Euler-style functions (deposit, convertToAssets, enableController, eulerSwapCall), which indicates the hook interacts with external lending vaults that hold user funds.
Contract details
- Verified source
- No
- Bytecode size
- 438 bytes
- Upgradeable proxy
- Yes
- Detected patterns
- erc20, moves-currency, return-delta, upgradeable
Pools using Custom pricing hook
- USDC / USDT (1.00% fee) — 24h volume $0, TVL $0, 0 swaps today