PadHook on Ethereum
Uniswap v4 Hook Contract 0xa12760be2a42e267b0a5476fc261d3ab1f672ac0 on Ethereum · Liquidity management · Verified contract
- Volume (24h)
- $1.32K
- Value locked (TVL)
- $9.02K
- All-time volume
- $212.22K
- Pools using this hook
- 1
- Swaps (24h)
- 7 (6 traders)
- Total swaps
- 1,116
What it does
A Uniswap v4 pool hook for a token launchpad that gates liquidity to the hook itself, charges a launch-time anti-snipe fee on buys that decays to a base fee, and splits collected fees between creators, rewards, the platform and a self-funded price floor.
How it works step by step
- Locks all external liquidity: beforeAddLiquidity and beforeRemoveLiquidity revert, so only the hook can provide liquidity.
- Holds the full coin supply as a single-sided MAIN position from the launch tick to the maximum usable tick.
- Sets the pool's dynamic LP fee per swap: a decaying anti-snipe fee on early buys, falling to a 1% or 2% base fee.
- On collect(), splits quote fees between creator vault, rewards pot, platform and a floor band placed above the dump floor.
- Burns collected coin-side fees and tracks a creator streak based on daily USD-referenced volume.
- Blocks buys in a district when the registry's buy freeze is set, while sells remain open.
- Swap behaviour
- Buys are blocked when the district is frozen, and pay a decaying anti-snipe fee that starts high and falls to the base fee over the configured blocks. Sells pay the base fee and never read the registry. Volume and creator streak data are recorded after each swap, and an optional referral address in hookData emits an event.
- Liquidity behaviour
- Liquidity can only be added or removed by the hook itself: liquidity from external LPs is reverted in beforeAddLiquidity and beforeRemoveLiquidity. The hook holds a MAIN single-sided position of the entire coin supply from the launch tick to max usable tick, and a single tick-spacing-wide quote-only FLOOR band placed by collect() above the dump floor, with lent-quote accounting for the floor desk.
- Fee behaviour
- Buys pay a dynamic fee: a launch-time anti-snipe fee that decays linearly to a 1% or 2% base fee over snipeBlocks, set via updateDynamicLPFee. Sells pay the base fee. Collected LP fees are split: creator share (0.40-0.60% by streak, or none for house pools), rewards 0.30% (0.25% for house), platform 0.10% (0.50% for house), and the remainder plus anti-snipe surplus goes to the floor band. Coin-side fees are sent to a converter and burned.
- Owner & admin controls
- The hook has no owner, pause or upgrade functions and no parameter setters. Admin power sits in DistrictRegistry (owner proposes districts and streak parameters behind a 24h timelock; guardian can freeze/unfreeze BUYS only; allowlisted watchers can freeze buys). The registry can only block buys in a district and can never touch pool liquidity, fees or reserves; sells are never read from it.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap
beforeInitialize: restricts pool creation to the factory and enforces dynamic fee and tick spacing. beforeAddLiquidity and beforeRemoveLiquidity: revert all external liquidity changes. beforeSwap: applies the dynamic fee schedule, blocks buys when the district is frozen, and updates the reference price. afterSwap: tracks volume, anti-snipe surplus, creator streak day buckets, and emits referral events; it is designed never to revert.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: The DistrictRegistry owner can propose new districts and streak parameters after 24h, which only affect future creator tiers and new pools. The guardian and any allowlisted watcher can block new buys in a district indefinitely (guardian unfreezes), which halts buying but not selling. Nothing in the registry can move pool funds or change fees directly.
Risk to user funds: The hook holds pool liquidity (main coin supply and quote floor band) and ERC-6909 claims for failed payouts; those funds are governed by immutable code and can only be moved by swap, collect, claim, converter credit and the floor desk paths. External LPs cannot deposit. Registry actions can block buys but cannot withdraw or redirect pool funds.
Security findings
- [medium] Buy freeze by privileged keys: Watchers and the guardian can freeze buys in any district with a single call and no timelock; only the guardian can unfreeze. Holders would be unable to buy while frozen, though sells continue.
- [info] Immutable hook logic: The hook is not upgradeable and holds no owner-controlled parameters; pool liquidity, fees and balances are governed by immutable code and the hook's own position accounting.
- [low] Failed fee payouts stored as claims: Fee shares whose push fails (e.g. a recipient blocking transfers) are stored as ERC-6909 claims instead of reverting, which preserves swap and collect liveness at the cost of relying on the claims ledger invariant.
- [medium] Floor desk lending surface: The floor desk can lend the floor's quote out (deskOp) and burn coins; a guard enforces that the published floor cannot fall as a result, but the lending logic is a substantial additional trust surface for pool solvency.
Contract details
- Verified source
- Yes (PadHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 24,374 bytes
- Upgradeable proxy
- No
- Detected patterns
- dynamic-fee, erc20, liquidity-management, moves-currency, rewards, self-unlock, tax
Pools using PadHook
- XAUt / KINEKO (Dynamic fee) — 24h volume $1.32K, TVL $9.02K, 7 swaps today