CappedBurnHook on Ethereum
Uniswap v4 Hook Contract 0x087a47248847db968b5a1c8ef52140fe429ca840 on Ethereum · Liquidity management · Verified contract
- Volume (24h)
- $4.30K
- Value locked (TVL)
- $33.86K
- All-time volume
- $202.49K
- Pools using this hook
- 1
- Swaps (24h)
- 48 (38 traders)
- Total swaps
- 1,736
What it does
A single-sided liquidity-management hook that runs and rebalances its own pool position after swaps, restricts external LP deposits, and distributes accrued fees, with an owner who controls parameters and withdrawals.
How it works step by step
- Initializes a pool with the hook owning the sole liquidity position
- Blocks external addLiquidity calls so only the hook can add liquidity
- Rebalances the hook-owned position after swaps based on reference tick and ratchet parameters
- Tracks fee accruals in token and ETH and splits them between a rewards recipient and the owner
- Maintains cap and floor decay schedules that limit inventory exposure over time
- Supports a backstop position that can be filled and closed by the owner
- Swap behaviour
- afterSwap updates reference tick, cap and floor decay accounting and may trigger rebalance or ratchet logic that repositions the hook-owned liquidity.
- Liquidity behaviour
- beforeAddLiquidity is enabled and the hook reverts liquidity additions unless they come from the hook itself (LiquidityRestrictedToHook error), so external LPs cannot add liquidity. The hook manages its own position (positionLiquidity, tickLower, tickUpper) and performs rebalances that move the position across ticks.
- Fee behaviour
- Pool uses a fee tier set at initialization; the hook accrues fee balances in storage (totalFeeToken, totalFeeEth, feeTokenClaims, feeEthClaims) and distributes them via rewardShareBps to a rewards recipient, with the remainder available to the owner through withdrawFees. Exact fee split logic cannot be confirmed without source.
- Owner & admin controls
- Owner (ownable, two-step ownership handover via requestOwnershipHandover/completeOwnershipHandover, plus renounceOwnership) can set rewards recipient, burn sink, ratchet bps, reward share bps, keeper reward, cap floor, cap decay, floor decay, max ref step, and rebalance enable/threshold flags; owner can withdraw fees and retained ETH, close the market and backstop, and open the market. No upgrade or pause function was found in the selector list.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, afterSwap
beforeInitialize sets up the pool state at initialization; beforeAddLiquidity restricts liquidity additions to the hook itself; afterSwap updates reference tick, cap and floor decay accounting, and triggers rebalancing and ratchet logic after each swap.
Security & trust assessment
Risk level: high (decoded bytecode, low confidence).
Who controls it: The owner controls economic parameters (cap floor, decay rates, ratchet, rebalance thresholds, reward share), can withdraw accrued fees and retained ETH, and can close the market and backstop. A malicious or compromised owner could drain retained ETH or fee balances, shut the market, or alter parameters to extract value from the pool.
Risk to user funds: The hook holds ETH and token balances (retained ETH, fee balances, backstop principal and inventory) and controls the pool's liquidity position, so users trading in or providing liquidity to this pool depend on the owner not withdrawing or re-pricing these balances.
Security findings
- [high] Owner can withdraw hook-held funds: The owner can call withdrawRetainedEth, withdrawFees, closeMarket, closeBackstop and closeBackstopSelf, which move ETH and token balances held by the hook out to addresses of the owner's choosing.
- [medium] Owner can change economic parameters: The owner can change ratchetBps, cap decay, floor decay, reward share and keeper reward at any time, which directly changes how the pool position behaves and how fees are distributed to users.
- [info] Hook moves currency via PoolManager unlock: The hook uses an ownable pattern with a two-step ownership handover and an unlockCallback path, indicating it interacts with the PoolManager unlock flow and moves currency (take/transferFrom/transfer selectors present).
- [info] Limited permission surface: Only beforeInitialize, beforeAddLiquidity and afterSwap are enabled, so there are no beforeSwap or return-delta hooks; swap pricing is still influenced via afterSwap-driven rebalancing of the hook-owned position.
Contract details
- Verified source
- Yes (CappedBurnHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 21,126 bytes
- Upgradeable proxy
- No
- Detected patterns
- liquidity-management, moves-currency, ownable, rewards, self-unlock
Pools using CappedBurnHook
- ETH / FWA (1.00% fee) — 24h volume $4.30K, TVL $33.86K, 48 swaps today