QuotronStockHook on Ink

Uniswap v4 Hook Contract 0x8bb4516059f9149bc3b89018fc7537f1f14a30cc on Ink · Fee sharing · Verified contract

Volume (24h)
$15.73K
Value locked (TVL)
$18.74K
All-time volume
$954.98K
Pools using this hook
9
Swaps (24h)
292 (40 traders)
Total swaps
15,034

What it does

A Quotron stock hook that sets the pool LP fee to zero and instead charges a steppable flat fee on the USDG side of swaps, splitting it between a terminal pot and a per-pool LP pot.

How it works step by step

  • Overrides the LP fee to 0% on every swap through a dynamic-fee pool using the OVERRIDE_FEE flag
  • Takes a flat hook fee in USDG on every non-exempt swap via beforeSwap or afterSwap return deltas
  • Splits each fee into a venue-wide terminal pot and a per-pool LP pot by terminalShareBps
  • Lets only the sealed converter pull the terminal pot and only the pool's vault pull its LP pot
  • Allows the owner to step each pool's fee within min and max bounds and pause pools
  • Provides a renounceable recovery admin that can sweep token balances held by the hook
Swap behaviour
On every non-exempt swap that involves USDG, a fee of feeBps is taken in USDG (on the gross amount for exact-in, grossed up for exact-out) via PoolManager take and recorded into the terminal and LP pots. Exempt senders and swaps where USDG is not the specified side (for the unspecified-side fee path) are handled without a fee, and paused pools revert.
Liquidity behaviour
No liquidity callbacks.
Fee behaviour
Overrides the LP fee on every swap to a dynamic 0% LP fee and instead skims a flat hook fee (feeBps, owner-steppable between minFeeBps and maxFeeBps) on the USDG side of non-exempt swaps. The fee is split per pool into a venue-wide terminal pot (terminalShareBps) and a per-pool LP pot (remainder).
Owner & admin controls
Owner (set at construction, transferable via transferOwnership) can register-gate via factory, step every pool fee up or down by a fixed stepBps within min/max bounds (stepFee, stepFeeAll), pause individual pools (setPoolPaused, which blocks swaps), set the factory once, seal the converter once, and set feeExempt addresses. A separate recoveryAdmin can sweep ERC20 balances held by the hook (recover) and can renounce that power permanently; recoveryAdmin can also be reassigned.

Enabled Uniswap v4 callbacks

beforeInitialize, afterInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize and afterInitialize gate pool creation to registered pools with dynamic fee. beforeSwap takes the hook fee as a specified-currency delta and overrides the LP fee to zero. afterSwap takes the hook fee on the unspecified USDG side for exact-output swaps. beforeSwapReturnDelta and afterSwapReturnDelta allow these fee amounts to be taken via return deltas.

Security & trust assessment

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

Who controls it: The owner can raise the hook fee up to maxFeeBps on every registered pool at once, pause any pool to block all swaps in it, and exempt any address from the fee. The recoveryAdmin can sweep any ERC20 balance held by the hook, including accrued USDG pots, until it renounces the power. Both keys are single EOA or multisig choices not established by the source.

Risk to user funds: The hook holds USDG fee balances (terminalPot and lpPot) and can transfer them out via recover while recoveryAdmin remains active. It does not hold LP positions, which remain in the PoolManager. Swaps can be blocked per pool by the owner pause and priced higher by fee stepping.

Security findings

  • [high] Recovery sweep can drain accrued fee pots: recover() lets recoveryAdmin transfer any ERC20 balance of the hook, which includes the terminalPot and lpPot USDG accrued from fees, to any address. Renouncement is irreversible but has not been confirmed on chain.
  • [medium] Owner can pause swaps per pool: setPoolPaused lets the owner halt swaps for a pool at will, so users cannot exit that market while paused.
  • [medium] Owner can raise swap fees: stepFee changes the hook fee by stepBps within fixed bounds, so the owner can set fees up to maxFeeBps (less than 50%) on all pools, raising trader costs immediately.
  • [info] Pot pulls are destination-locked: pullTerminal and pullLp are restricted to the sealed converter and the pool's vault respectively, and the owner cannot redirect pots to other addresses, which limits the damage from owner compromise to the recovery path.
  • [low] Owner can grant fee exemptions: Owner can set feeExempt for any address, letting chosen accounts swap with no hook fee.

Contract details

Verified source
Yes (QuotronStockHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
9,459 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, ownable, return-delta

Pools using QuotronStockHook