Liquidity management hook on Ethereum
Uniswap v4 Hook Contract 0xba716dbb618c09be7494538a144b739e8628c888 on Ethereum · Liquidity management
- 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 manages a liquidity position within a set tick range, accrues fees from pool activity, and rebalances via self-unlock, with fees claimable by a designated recipient.
How it works step by step
- Accepts liquidity additions through beforeAddLiquidity and tracks them against a hook-managed position
- Holds an LP position bounded by tickLower and tickUpper with sqrt price bounds
- Runs custom logic in beforeSwap, able to adjust the swap delta
- Self-unlocks the PoolManager via unlock and unlockCallback to move currency and rebalance
- Accrues fees in storage and lets the fee recipient claim them through claimFees
- Owner can transfer or renounce ownership
- Swap behaviour
- beforeSwap runs custom logic and can adjust swap deltas via return-delta permission, with accrued fees and rebalancing handled during swaps.
- Liquidity behaviour
- beforeAddLiquidity is enabled and the hook manages a position with tick bounds (tickLower, tickUpper, sqrtLower, sqrtUpper) and hookLiquidity; it appears to self-unlock the PoolManager (unlock/unlockCallback) to move liquidity, suggesting it rebalances or manages its own LP position on behalf of depositors.
- Fee behaviour
- Accrued fees are tracked in storage slot 1 and claimed via claimFees() (0xd294f093) to a feeRecipient address; the hook takes a portion of swap or liquidity flows, but exact fee rate could not be determined from decoded bytecode.
- Owner & admin controls
- Owner (Ownable) can transfer or renounce ownership; owner-only functions include claimFees-related fee recipient controls and a rebalance/parameter setter (0x8010824e, 0x86edc713) that appear gated by ownership. No pause or upgrade mechanism identified in decoded selectors.
Enabled Uniswap v4 callbacks
beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeAddLiquidity: gates or reacts to liquidity additions, likely to restrict or account for deposits into the hook-managed range. beforeSwap: runs custom logic on each swap, likely rebalancing or fee accounting. beforeSwapReturnDelta: lets the hook take over part of the swap delta, meaning it can capture or redirect swap amounts.
Security & trust assessment
Risk level: medium (decoded bytecode, low confidence).
Who controls it: The owner can transfer or renounce ownership and appears to control fee recipient and parameter-setting functions; a malicious or compromised owner could redirect fee revenue or alter parameters affecting liquidity placement.
Risk to user funds: The hook holds LP positions and claimable fees and moves currency through the PoolManager, so user liquidity and swap proceeds pass through hook logic; a bug or malicious owner action could misdirect funds, though the exact extent is unconfirmed.
Security findings
- [medium] Hook can modify swap deltas: beforeSwapReturnDelta lets the hook alter the swap's effective amounts, so the hook can take a share of user swap flow.
- [medium] Hook moves pool currency via self-unlock: The hook calls the PoolManager unlock and transfers/takes currency (moves-currency tag, transfer and take selectors present), so it holds and moves pool funds.
- [medium] Single owner controls fees and parameters: Owner-gated functions (ownership transfer, renounceOwnership, fee recipient and parameter setters) give a single key control over fee destination and LP placement.
- [info] Source not verified: Without verified source, exact fee rates, rebalance conditions and access checks on setters cannot be confirmed from the bytecode alone.
Contract details
- Verified source
- No
- Bytecode size
- 17,764 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc20, fee-sharing, moves-currency, ownable, return-delta, self-unlock
Pools using Liquidity management hook
- ETH / GAVEL (Dynamic fee) — 24h volume $0, TVL $0, 0 swaps today