WindowShopperHook on Ethereum
Uniswap v4 Hook Contract 0x622790cf2aa60381a65ac1bb992840e5ab7620cc on Ethereum · Dynamic fee · Verified contract
- Volume (24h)
- $1.57K
- Value locked (TVL)
- $0
- All-time volume
- $1.57K
- Pools using this hook
- 1
- Swaps (24h)
- 19 (14 traders)
- Total swaps
- 19
What it does
Every buy and sell on this ETH/IMDWS pool burns 0.1% of the IMDWS amount in the trade, taken from the pool's IMDWS while the LP fee stays the pool's static fee and no ETH is charged.
How it works step by step
- Burns 0.1% of the IMDWS token amount on every buy and every sell of the single ETH/IMDWS pool registered through this hook
- On exact-input sells and exact-output buys the burn is taken in beforeSwap via a positive specified-currency delta and a PoolManager take followed by ERC20 burn
- On exact-input buys and exact-output sells the burn is taken in afterSwap via an unspecified-currency return delta followed by a PoolManager take and burn
- The burn is capped at the IMDWS balance held by the PoolManager so the hook never requests more than is available and does not revert swaps
- Only one pool can be registered, only by the creator's transaction origin, and only as a static-fee pool with native ETH as currency0
- Keeps running totals of total, buy and sell burns and emits a Burned event per execution
- Swap behaviour
- Every swap of the registered ETH/IMDWS pool is charged a burn of 0.1% of the IMDWS amount, whether buy or sell and whether exact-input or exact-output; the burn is taken from the PoolManager's IMDWS balance and destroyed, so the trader receives slightly less IMDWS on buys and pays slightly more IMDWS on sells in exact-output terms, with no ETH fee charged.
- Liquidity behaviour
- No liquidity callbacks.
- Fee behaviour
- Uses the pool's static LP fee (lpFeeOverride is zero, no dynamic fee allowed); the only extra cost is the 0.1% IMDWS burn taken by the hook, which is not paid to any LP or owner.
- Owner & admin controls
- No admin controls found. The token, creator and poolManager are immutable, there is no owner, pause, upgrade or parameter-change function; the only privileged party is the creator address, which can only be used during the one-time pool initialization.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool creation to the creator and validates the pool currencies and static fee; beforeSwap takes and burns the IMDWS burn on exact-input sells and exact-output buys via a specified-currency return delta; afterSwap takes and burns the IMDWS burn on exact-input buys and exact-output sells via an unspecified-currency return delta; beforeSwapReturnDelta and afterSwapReturnDelta allow those deltas to credit the hook.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key can change fees, pause swaps, or move funds after deployment; the creator address only gates the one-time pool initialization.
Risk to user funds: The hook can take and burn IMDWS from the PoolManager on each swap, but it cannot block swaps, cannot take ETH, and cannot access user balances outside the swap flow.
Security findings
- [medium] Hook takes tokens via return deltas: beforeSwap and afterSwap return positive or negative deltas that let the hook pull IMDWS from the PoolManager on every qualifying swap, so the pool's effective flow is altered on every trade.
- [low] Burn cap relies on PoolManager balance: The burn amount is clamped to the IMDWS balance of the PoolManager, so under low pool balances the burn silently reduces to zero or a partial amount rather than reverting, which is intended but means burn behaviour depends on external pool state.
- [low] Token burn dependency: The hook assumes the IMDWS token exposes an ERC20Burnable burn function callable by the hook; if the token behaves differently, swaps through the hook would revert.
- [info] Pool initialization gated by tx.origin: beforeInitialize checks tx.origin against the creator address, so initialization only succeeds when the creator's own transaction initiates it, which is a deliberate restriction and not an admin backdoor.
Contract details
- Verified source
- Yes (WindowShopperHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 6,070 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, moves-currency, return-delta
Pools using WindowShopperHook
- ETH / IMDWS (0.30% fee) — 24h volume $1.57K, TVL $0, 19 swaps today