Likely custom pricing hook on HyperEVM
Uniswap v4 Hook Contract 0x893ffcbb4476f31a4a22a241513f00d5f84820cc on HyperEVM · Access control
- 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 charges a dynamic, owner-adjustable fee on swaps with an initial opening fee that decays, enforces a rolling spend cap, and takes a share of swap flow for fee collection and buybacks.
How it works step by step
- Applies a dynamic fee: an opening fee that decays over time, then a standing fee set by the owner
- Tracks a rolling spend window with a cap (WINDOW, MAX_WINDOW_SPEND, windowSpent)
- Takes a portion of swap flow through before and after swap return deltas
- Accumulates ETH fee claims that can be withdrawn with collectFees
- Runs buyback logic that burns tokens (totalBurned, totalSpent)
- Gates launch and trading with launch and openTrading controls
- Swap behaviour
- On beforeSwap the hook applies the current dynamic fee (opening fee decaying to the standing fee) and checks the window spend cap; afterSwap updates window spend accounting and can take a share of the swap via return deltas.
- Liquidity behaviour
- Has beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity selectors present in the dispatch table, but their exact effect cannot be determined from decoded bytecode alone; they are likely present as callbacks that enforce launch or lock conditions.
- Fee behaviour
- Uses a dynamic fee: a standing fee stored in slot 2 (offset 20, uint24) set by the owner within MIN/MAX bounds, plus an opening fee that decays over time from openingFee toward the standing fee (OPENING_DECAY, openedAt) before trading opens. Fees collected in ETH are tracked in ethFeeClaims and paid out via collectFees.
- Owner & admin controls
- Owner (Ownable) can set the standing fee via setStandingFee (bounded by MIN_STANDING_FEE and MAX_STANDING_FEE), set the spend cap via setSpendCap, set the builders address via setBuilders, call launch(int24) and openTrading, transfer or renounce ownership. Owner-only functions are gated by the Ownable modifier as indicated by OwnableUnauthorizedAccount selector use.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates or records the pool when it is created. beforeSwap: applies the current dynamic fee and checks the window spend cap; may return a delta. afterSwap: updates window spend accounting and can return a delta, using the take/unlock path to move currency. beforeSwapReturnDelta and afterSwapReturnDelta: enabled, so the hook can take a share of swap amounts and settle them through the pool manager.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, low confidence).
Who controls it: The owner can change the standing fee within bounds, change the spend cap, change the builders address and control launch timing. Ownership can be transferred or renounced. A compromised owner key could set fees to the maximum and alter spend limits affecting traders.
Risk to user funds: The hook can take a portion of swap amounts through return deltas and transfer ETH fee claims and buyback proceeds, so it holds and moves pool-related funds. Trading can also be blocked by the spend cap or closed trading state.
Security findings
- [medium] Hook takes currency via return deltas: Hook enables beforeSwapReturnDelta and afterSwapReturnDelta and uses take and unlock with a self-unlock path, so it can take currency from swaps and move funds.
- [medium] Owner controls fees and spend limits: Owner can call setStandingFee and setSpendCap; standing fee is bounded but a high fee or low spend cap can restrict trading.
- [low] Trading gated by owner-controlled launch: Trading can be closed (TradingClosed error) and there is a launch gate; trading availability depends on owner actions.
- [info] Reentrancy guard and Ownable present: Contract uses ReentrancyGuard and Ownable; no upgrade proxy pattern was detected in the dispatch table.
Contract details
- Verified source
- No
- Bytecode size
- 8,563 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, self-unlock
Pools using Likely custom pricing hook
- HYPE / YARN (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today