LodeHook on Ethereum

Uniswap v4 Hook Contract 0x8f24193cc75fc64a30a038442bcd622ff4070088 on Ethereum · Auction · Verified contract

Volume (24h)
$135
Value locked (TVL)
$7.15K
All-time volume
$3.82M
Pools using this hook
7
Swaps (24h)
20 (17 traders)
Total swaps
19,091

What it does

LodeHook captures a configurable premium (up to 5%) from the first qualifying swap in each block on configured pools and routes it to a splitter, while letting all other swaps proceed normally.

How it works step by step

  • Per pool, sets a premium of up to 500 bps (5%) via premiumBps
  • Allows at most one premium-paying swap per block per pool, tracked in lastAuctionBlock
  • Ignores swaps below minAuctionInputSize or whose premium truncates to zero, without consuming the block slot
  • Transfers the premium to a per-pool splitter using poolManager.take
  • Returns the premium as a beforeSwap return delta on the specified or unspecified side
  • Supports global and per-pool pause, where paused swaps proceed as normal Uniswap v4 swaps
Swap behaviour
On each swap in a configured, unpaused pool, if the block has no prior auction and the swap is at least minAuctionInputSize, the hook takes premiumBps of the input amount to the pool's splitter and returns that amount as a before-swap delta. Other swaps in the same block or below the minimum proceed without premium.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
No LP fee changes. The hook takes a premium of up to 5% (MAX_PREMIUM_BPS = 500) of the first qualifying swap's input amount per block, sent via poolManager.take to a per-pool splitter address, and returns that amount as a beforeSwap delta. Pool static fee is otherwise unaffected.
Owner & admin controls
Owner (LODE governance multisig) can configure and deactivate pools, set the factory and guardian, transfer ownership, pause and unpause globally, and pause or unpause individual pools. Factory can configure and deactivate pools. Guardian can pause globally and pause individual pools but cannot unpause; unpausing requires the owner.

Enabled Uniswap v4 callbacks

beforeSwap, beforeSwapReturnDelta

beforeSwap: captures the top-of-block auction premium and routes it to the splitter. beforeSwapReturnDelta: lets the hook return a delta so the premium is taken from the swap's input/output amounts.

Security & trust assessment

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

Who controls it: The owner can repoint the factory, change the guardian, reconfigure any pool including setting premiumBps up to 5%, splitter and operator addresses, and can transfer ownership. A compromised owner or factory could redirect premiums to an arbitrary splitter or raise premiums to the cap on any configured pool. Guardian can halt capture, but it cannot unpause.

Risk to user funds: The hook does not hold user funds between transactions. It takes up to 5% of the input amount of qualifying swaps through poolManager.take and sends it to the configured splitter, so trades on configured pools pay the premium. A compromised owner or factory could redirect that premium, but the hook cannot block swaps or seize pool liquidity.

Security findings

  • [medium] Privileged redirection of auction premium: configurePool lets the owner or factory set any splitter address, so premiums from every configured pool can be redirected by whoever holds those roles.
  • [low] No timelock on pool parameter changes: The owner or factory can reconfigure a pool at any time, including raising premiumBps up to the 500 bps cap and resetting the per-block slot, with no timelock visible in the contract.
  • [info] Premium is charged to swappers: The hook takes up to 5% of the input amount of the first qualifying swap in each block, which is a real cost to traders on configured pools. Small swaps below minAuctionInputSize are exempt.
  • [info] Pause degrades safely: Pausing sets the hook to return zero delta, so user swaps are never blocked. Only the premium capture is disabled.
  • [low] Single-step ownership transfer: Owner is a single address controlled by a governance multisig per the source comments; ownership transfer is a single step with no acceptance step, so a mistaken transferOwnership to a wrong address is unrecoverable.

Contract details

Verified source
Yes (LodeHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,251 bytes
Upgradeable proxy
No
Detected patterns
auction, ownable, return-delta

Pools using LodeHook