XDHook on Base
Uniswap v4 Hook Contract 0x66e51deab56975bb1c64413bd3ab01fa95b82acc on Base · Launchpad · Verified contract
- Volume (24h)
- $30.16K
- Value locked (TVL)
- $59.99K
- All-time volume
- $6.34M
- Pools using this hook
- 10
- Swaps (24h)
- 58 (21 traders)
- Total swaps
- 308,259
What it does
A WETH-paired launchpad hook that charges a declining swap fee (starting at 2%, capped at 0.15% after graduation) and gates trading and liquidity to trusted actors until the token graduates.
How it works step by step
- Restricts pool initialization to pools that pair WETH with a token registered in AUTHORITY, initialized by trusted actors.
- Before graduation, allows swaps and liquidity changes only for trusted vault, reaper, position updater, token deployer or DX_MANAGER actors.
- Charges a fee of feeBps (starts at 200) on swaps involving WETH, minting ERC-6909 claims and returning the fee as a delta.
- Forwards accrued fee claims to FEE_COLLECTOR during swaps and on claimFees.
- graduate() permanently removes gating, caps the fee at 15 bps and unpauses swaps.
- Swap behaviour
- Before graduation, only vaults and trusted actors may swap and exact-out swaps revert. On each swap, pending WETH fee claims are forwarded to FEE_COLLECTOR, and the hook charges feeBps on WETH-side flow via before-swap or after-swap return deltas. Swaps revert when paused.
- Liquidity behaviour
- Before graduation, adding or removing liquidity is restricted to actors resolved from trusted AUTHORITY roles (POSITION_UPDATER, REAPER, TOKEN_DEPLOYER aux roles, or DX_MANAGER), with PositionManager callers resolved to their original msgSender. After graduation, liquidity callbacks allow anyone. The hook does not alter liquidity amounts.
- Fee behaviour
- Fee starts at 200 bps (2%) and can only be lowered by the owner, never raised, down to 0. On exact-in swaps where WETH is the input, the fee is minted as ERC-6909 claims in beforeSwap and charged via a positive BeforeSwapDelta; where WETH is the output, the fee is charged in afterSwap via a positive unspecified delta. Exact-out swaps are charged on the input currency in afterSwap. Accrued claims are burned and forwarded to FEE_COLLECTOR on the next swap or via claimFees.
- Owner & admin controls
- Owner (Ownable) can call graduate() (permanently disables gating, caps fee at 15 bps, unpauses), lowerFee() (monotonic decrease only, down to 0), setPause() (halts swaps pre-graduation only), claimFees is permissionless, transferOwnership and renounceOwnership. No upgrade mechanism found; the contract is not a proxy.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize restricts pool creation to a WETH-paired pool with a registered token and to trusted initializer actors. beforeAddLiquidity and beforeRemoveLiquidity gate liquidity changes to trusted actors until graduation. beforeSwap enforces the pause, restricts pre-graduation swaps to vaults and trusted actors, rejects exact-out before graduation, claims accrued fees, and returns a WETH fee as a before-swap delta on exact-in WETH input. afterSwap charges the fee on WETH output or on exact-out input and returns it as an unspecified-currency delta. beforeSwapReturnDelta and afterSwapReturnDelta are enabled because the hook takes fees through returned deltas.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The owner can pause swaps before graduation, which blocks all trading in the pool until graduate() is called. The owner can set the fee to 0 to disable fees, but cannot raise it above its current level. graduate() permanently removes trading restrictions for everyone. The owner cannot seize funds or move pool liquidity directly; fee revenue goes only to the immutable FEE_COLLECTOR. The owner key is a single Ownable key with no timelock or multisig enforced in the code.
Risk to user funds: The hook holds no user principal. It mints and burns ERC-6909 fee claims on the PoolManager and forwards them to FEE_COLLECTOR, and it can reduce swap output by the fee amount through return deltas. It cannot move liquidity or withdraw pool funds directly, but pausing or restricting pre-graduation swaps can block users from trading.
Security findings
- [medium] Owner can pause swaps pre-graduation: setPause can halt all swaps before graduation, so a compromised or malicious owner could freeze trading for the token pool.
- [medium] Pre-graduation trading is allowlisted: Before graduation, swaps are only allowed for vaults and trusted AUTHORITY aux roles or DX_MANAGER, so ordinary traders cannot trade until graduate() is called.
- [low] Fee applied via return deltas on swaps: Exact-out swaps revert before graduation, and the fee is taken from output or input via return deltas, which can reduce received amounts by up to the fee rate.
- [low] Reliance on external Authority and PositionManager: The hook depends on AUTHORITY for role checks and on the PositionManager msgSender() staticcall for actor resolution; a misconfigured authority or position manager would change who can swap or add liquidity.
- [info] Fee is monotonically non-increasing: Fee can be reduced to 0 at any time and graduate() also caps fees at 15 bps, so fee-related risk to users is limited and only downward.
Contract details
- Verified source
- Yes (XDHook)
- Compiler
- solc 0.8.30+commit.73712a01
- Bytecode size
- 8,055 bytes
- Upgradeable proxy
- No
- Detected patterns
- launchpad, liquidity-management, moves-currency, ownable, pausable, return-delta, self-unlock
Pools using XDHook
- WETH / POOPCOIN (0.10% fee) — 24h volume $30.16K, TVL $59.99K, 58 swaps today
- WETH / POOPCOIN (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- WETH / HOTDOGZ (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / HOLE (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- LOOKSMAX / WETH (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- WETH / LMAO (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- AIGF / WETH (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today
- WETH / SLOP (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / FEET (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / SNEEK (0.30% fee) — 24h volume $0, TVL <$0.01, 0 swaps today