UndoHook on Ethereum
Uniswap v4 Hook Contract 0xbbc86e372b758064645e1a4ce958db81e07b68ec on Ethereum · Launchpad · Verified contract
- Volume (24h)
- $3.26K
- Value locked (TVL)
- $279
- All-time volume
- $3.26K
- Pools using this hook
- 1
- Swaps (24h)
- 14 (7 traders)
- Total swaps
- 14
What it does
A Uniswap v4 launchpad hook for the ETH/UNDO pool that owns all liquidity, taxes ETH-side swaps to a dev address, and lets buyers reserve tokens with a cancellable undo window for a premium.
How it works step by step
- Launches the UNDO token and a single ETH/UNDO v4 pool whose liquidity is owned entirely by the hook
- Charges a time-decaying tax on ETH-side swaps, starting high at launch and settling at TAX_BPS, paid to DEV via claimDev()
- buy() lifts liquidity under the price to reserve tokens for a buyer with a cancellable undo window
- cancel() before expiry refunds the full ETH cost; accept() delivers the tokens after or during the window
- The premium paid for a window buys back UNDO through a hook swap and burns it, reducing supply
- Blocks outside addLiquidity, removeLiquidity, donate and initialize so only the hook manages liquidity
- Swap behaviour
- Swaps are allowed through any router; the hook charges a dynamic tax on the ETH side (starting at START_TAX_BPS and decaying to TAX_BPS) via beforeSwap/afterSwap return deltas, accumulated as claims for DEV.
- Liquidity behaviour
- Liquidity is owned entirely by the hook. addLiquidity, donate and removeLiquidity are all reverted by hook callbacks, so outside parties cannot add or remove liquidity. The hook internally moves its ranges through _shift(): buy() lifts liquidity out of the pool into a window, and cancel/accept returns it to the pool. Open windows' liquidity is removed from the pool, so the pool has less liquidity while windows are open.
- Fee behaviour
- Plain swaps on the ETH side pay a dynamic tax taken as a hook delta and accumulated as PoolManager claims (devOwed). The tax starts at START_TAX_BPS at launch and falls linearly to TAX_BPS over TAX_DECAY, then stays at TAX_BPS (capped at 500 bps). The pool's own fee is 0. The tax is paid to DEV through claimDev(). buy() premiums are not fees: they are kept as ETH in held windows and used to buy back and burn UNDO.
- Owner & admin controls
- No admin controls found. There is no owner, pause or upgrade path in the hook or token; the only privileged address is the immutable LAUNCHER, which can call launch() once. DEV is an immutable recipient of tax, and claimDev() can only pay DEV. Tax parameters are immutable constructor values.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeDonate, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: reverts, so only the hook itself can open the pool. beforeAddLiquidity and beforeDonate: revert to lock liquidity. beforeSwap: charges the ETH-side tax via a hook return delta (the hook takes tokens/ETH from the swap). afterSwap: charges the tax on the other swap direction via a return delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled so the hook can alter swap deltas. afterInitialize, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity and afterDonate revert as not supported.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The deployer/launcher has no ongoing privilege beyond a single launch() call; there is no owner key. DEV receives all accrued tax, and tax parameters are fixed at deployment, so no key can raise the tax or block swaps.
Risk to user funds: The hook holds ETH for open windows (refunded on cancel, delivered on accept) and tokens reserved for windows; it cannot move them except through cancel, accept or the internal buyback. Tax accrues as PoolManager claims payable only to DEV via claimDev(). The token has no owner or mint, and the hook has no function that sends funds to anyone else.
Security findings
- [info] Hook takes swap tax via return deltas: Swaps route through beforeSwap and afterSwap return deltas that take a tax on the ETH side and accumulate it as PoolManager claims; the tax is taken by the hook on every ETH-side swap.
- [low] ETH and tokens are held by the hook during open windows: Users can reserve tokens with buy() and cancel within the window; the ETH cost is held by the hook and refunded on cancel, so a bad state of the hook could block refunds, but the code checks solvency with Insolvent reverts on every close.
- [low] Premium buyback swaps move the price: The premium buys back and burns UNDO via a swap from the hook; the buyback swap uses a price limit of MIN_SQRT_PRICE+1 and relies on the pool's current liquidity, so a large pending buyback could move the price.
- [info] No privileged controls over funds: Window ownership and the single-launch flow are enforced by checks (NotOwner, AlreadyLaunched, NotLauncher), and there are no owner, pause, mint or upgrade functions in the source.
Contract details
- Verified source
- Yes (UndoHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 23,432 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, moves-currency, return-delta, self-unlock, tax
Pools using UndoHook
- ETH / UNDO (0.00% fee) — 24h volume $3.26K, TVL $279, 14 swaps today