GuUniswapV4Hook on Arbitrum

Uniswap v4 Hook Contract 0xff36dc9f421ba5a057a1aac9625aae2e1cde9acc on Arbitrum · Dynamic fee · Verified contract

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

What it does

Hook for GuCoin pools that charges traders a 1% LP fee plus a volatility- and direction-based extra fee of up to about 6.55%, with trades chasing recent price moves paying more, and lets the factory owner pause swaps, deposits, and even LP withdrawals through a security registry.

This read was written for the hook 0x300b…1acc on Arbitrum and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Charges a volatility-based extra fee on every swap in GuCoin/reserve-token pools, on top of a fixed 1% fee paid to in-range LPs.
  • Adjusts the extra fee up or down by trade direction based on recent price moves (a sliding fee), so trades pushing price further in one direction can pay more.
  • Sends extra fees to a per-pool fee receiver; GuCoin fees can be partly burned, and reserve-token fees can be partly sent to the factory owner.
  • Keeps an on-chain price and volatility history (oracle) for each pool.
  • Checks an owner-set security registry that can block swaps, deposits, and even withdrawals for a pool.
Swap behaviour
Swaps only work once the GuCoin is marked as launched and the pool is not blocked by its security registry; the LP fee is forced to 1% and the hook also takes an adaptive fee of up to about 6.55% from the trader's input token. The extra fee depends on recent volatility and on direction, so trades following a recent strong price move can pay more while trades against it pay less.
Liquidity behaviour
Adding liquidity is blocked if the pool's security registry marks it burn-only or disabled. Removing liquidity is blocked if the registry marks the pool disabled, so LP withdrawals are not guaranteed.
Fee behaviour
In-range LPs get a fixed 1% swap fee, and the hook takes an additional adaptive fee between about 0.0001% and 6.55% (default base around 1%, scaled by volatility and direction). GuCoin-side fees are split between burning (0-100% set at registration) and the fee receiver; reserve-token fees are split between the factory owner (0-100% protocol ratio) and the fee receiver.
Owner & admin controls
The GuFactory owner can change the base fee, volatility fee curve, dynamic and sliding fee switches, price-change sensitivity, the protocol fee share (0-100% of reserve-token fees), and set any security registry contract per pool. The fee result is capped at about 6.55% by its 16-bit size, but the registry can block swaps, deposits and withdrawals.

Enabled Uniswap v4 callbacks

afterInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

afterInitialize: starts the price/volatility history; beforeAddLiquidity: checks registry status for deposits; beforeRemoveLiquidity: checks registry status and can block withdrawals; beforeSwap: sets the 1% LP fee, computes the adaptive fee and takes it from exact-input swaps; afterSwap: takes the adaptive fee on exact-output swaps; beforeSwapReturnDelta/afterSwapReturnDelta: let the hook charge those fees in the swap amounts.

Security & trust assessment

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

Who controls it: The GuFactory owner controls fee settings and the per-pool security registry. At worst they can freeze swaps, deposits and LP withdrawals for a pool, and raise the extra fee to about 6.55%.

Risk to user funds: Traders pay a 1% LP fee plus up to about 6.55% extra in their input token, which the hook passes on to the fee receiver, the owner, or burns. LP principal stays in the PoolManager and cannot be drained by the hook, but withdrawals can be blocked by the registry.

Security findings

  • [high] Withdrawals can be blocked: The factory owner can point a pool to any security registry, and if it returns disabled, beforeRemoveLiquidity reverts, so LPs cannot withdraw until it is changed.
  • [medium] Swaps and deposits can be paused: The same registry can block swaps and deposits with burn-only or disabled status, and swaps also revert until the GuCoin reports it is launched.
  • [low] Adjustable adaptive fee with hard ceiling: The owner can retune the extra swap fee, but it is limited to about 6.55% on top of the fixed 1% LP fee.
  • [info] Protocol share of fees adjustable: The owner can direct 0-100% of reserve-token fees to itself instead of the pool fee receiver; this only affects how already-charged fees are split.

Contract details

Verified source
Yes (GuUniswapV4Hook)
Compiler
solc 0.8.20+commit.a1b79de6
Bytecode size
14,835 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, moves-currency, oracle, return-delta, rewards

Pools using GuUniswapV4Hook