VaultHook on Ethereum

Uniswap v4 Hook Contract 0xd59e56cf745d1d8aa0c40e249902429e83ddf0c8 on Ethereum · Launchpad · Verified contract

Volume (24h)
$0
Value locked (TVL)
$0
All-time volume
$0
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
12

What it does

A launch-curve fee hook for the OHMVAULT/OHM pool that skims a fee on every swap, reinvests half of the accumulated OHM into locked liquidity, and sends the rest to the treasury.

How it works step by step

  • Takes a dynamic launch fee (80% decaying to 5% over 60 seconds) on each external swap via beforeSwap return delta.
  • Caps swap size at 10% of reserve during the launch window to limit sniping.
  • Harvests accumulated OHM, sending 60% to the treasury and compounding 40% into locked full-range LP.
  • Accepts donations of OHM via donateFloor, sells half for tokens and adds locked liquidity, refunding any unplaced portion.
  • Tracks protocol-owned reserves, a time-weighted price, and a running minimum OHM reserve for the backing oracle, with consumeMin reserved to the ratchet.
Swap behaviour
External swaps pay a fee taken from the input amount in beforeSwap, starting at 80% and decaying to 5% over the first 60 seconds, then fixed at 5%. During the launch window, a single swap is capped at 10 percent of the reserve. The hook's own swaps are excluded from callbacks and pay 5 percent inside the swap routine instead.
Liquidity behaviour
Liquidity is only added by the hook itself, via harvest() and donateFloor(), as locked full-range positions owned by the hook. No external add or remove liquidity callbacks are enabled, and there is no exit for the LP. Launcher's seed position is also read as protocol-owned for the backing oracle.
Fee behaviour
A launch fee curve applies to external swaps: 80% flat for 10 seconds from startTime, linear down to 50% at 30 seconds, linear down to 5% at 60 seconds, then a steady 5% thereafter. The 5% skim is taken in beforeSwap as a return delta on the input side and held by the hook as fees. The hook's own swaps (harvest compounds and donation sells) also pay 5%, held as ownSwapFeesAccrued. harvest() splits accumulated OHM 40% into locked full-range LP and 60% to the treasury.
Owner & admin controls
No owner or admin. Deployer can only call setLauncher and setRatchet once each, which are one-shot. Launcher is the only address allowed to open the pool; Ratchet is the only address allowed to call consumeMin(). No pausing, no upgrade path, no parameter setters found.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta

beforeInitialize restricts pool creation to the launcher address. afterInitialize records the start time for the launch fee curve. beforeSwap takes the fee skim via a return delta, enforces the 10 percent per-swap reserve cap during the launch window, and samples the reserve. afterSwap samples the post-swap reserve for the minimum tracker and TWAP. beforeSwapReturnDelta lets the hook keep the skimmed input amount.

Security & trust assessment

Risk level: low (verified source, high confidence).

Who controls it: No privileged owner key exists after deployment, so no single key can change fees, pause swaps, or move funds. The only trusted roles are the one-shot launcher (which opens the pool and seeds liquidity) and the ratchet (which can read and reset the backing minimum via consumeMin). Those addresses are fixed after their single set call and cannot be reassigned.

Risk to user funds: The hook holds OHM and token balances between harvests and owns the locked full-range LP position. It can take a 5 percent fee from external swaps, which can be unexpectedly high during the launch window. Users cannot withdraw LP shares; that liquidity is permanently locked. No admin function can seize or freeze user funds.

Security findings

  • [info] Per-swap cap during launch window: During the launch window, external swaps are capped at 10 percent of the reserve, so large trades must be sliced. This is an intended restriction but can cause reverts for traders.
  • [low] Own-swap price bound limits compound size: Harvest and donation swaps are bounded to roughly an 8 percent price move per own swap via sqrt price limits. Large donations are only partially placed and the remainder is refunded, which reduces the risk of hook-driven price manipulation but still relies on the sandwich cost of the 5 percent skim.
  • [low] Backing oracle depends on observed minimum: consumeMin() reads a running minimum of protocol-owned OHM reserve and resets it. The backing value used by the Ratchet is therefore sensitive to the timing of pool movements, and the minimum can be lowered by temporary price swings that the hook itself causes during its own operations.
  • [info] Hook custodies fee balances and locked LP: The hook holds fee tokens and the 40 percent locked LP share is never withdrawable by any party. Tokens sent to the treasury are transferred directly. The hook contract itself holds OHM and token balances between harvests.

Contract details

Verified source
Yes (VaultHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
13,446 bytes
Upgradeable proxy
No
Detected patterns
launchpad, liquidity-management, moves-currency, oracle, return-delta, self-unlock

Pools using VaultHook