ArrakisPrivateHook on Base

Uniswap v4 Hook Contract 0xf9527fb5a34ac6fbc579e4fbc3bf292ed57d4880 on Base · Dynamic fee · Verified contract

Volume (24h)
$0
Value locked (TVL)
$5.10
All-time volume
$4.46K
Pools using this hook
9
Swaps (24h)
0 (0 traders)
Total swaps
7,904

What it does

A dynamic-fee hook for Arrakis private vaults on Uniswap v4 that lets the vault executor set per-direction swap fees and restricts liquidity additions to the vault's module.

How it works step by step

  • Stores per-pool fee settings (module, zeroForOneFee, oneForZeroFee) keyed by PoolId.
  • Lets the vault executor, verified through the manager's vaultInfo, call setFees for a private vault's module.
  • Validates fees with LPFeeLibrary and sets the OVERRIDE_FEE_FLAG before storing them.
  • Overrides the LP fee on each swap in the direction of the trade inside beforeSwap.
  • Restricts beforeAddLiquidity to the pool's registered module, rejecting other senders.
  • Reverts for unimplemented callbacks such as remove liquidity, donate and initialization.
Swap behaviour
On each swap beforeSwap returns the stored fee for the swap direction (zeroForOne or oneForZero) as an LP fee override; the hook takes no tokens and does not alter balances.
Liquidity behaviour
beforeAddLiquidity is restricted to the pool's registered module, so only the Arrakis LP module can add liquidity. Removing liquidity and donations are not supported (revert NotImplemented).
Fee behaviour
Fees are set per pool by the vault executor via setFees (validated, then stored with the override flag). Swaps use the zeroForOne or oneForZero fee as an LP fee override, and the static pool fee is not used. Fees are capped by LPFeeLibrary validation.
Owner & admin controls
The fee is set by the executor of the vault managed through the manager (vault executor), who can call setFees to change zeroForOne and oneForZero fees for a pool; only the active module of a private Arrakis vault can be linked, and the hook is immutable with respect to manager and factory. No owner, pausing or upgrade mechanism was found.

Enabled Uniswap v4 callbacks

beforeAddLiquidity, beforeSwap

beforeAddLiquidity restricts liquidity additions to the authorized module of the pool. beforeSwap returns a per-direction LP fee override so the fee can be set dynamically from stored data.

Security & trust assessment

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

Who controls it: The vault executor controls the fees of every pool in its private vault and can set them up to the maximum allowed by LPFeeLibrary, effectively taxing swappers, or set them to 0 to attract volume. The executor is a privileged key whose role is defined by the manager contract.

Risk to user funds: The hook does not hold or move tokens and has no return-delta permissions, so it cannot custody funds directly. Indirect exposure exists because the vault executor can set swap fees on the pool, affecting the execution price for traders.

Security findings

  • [medium] Executor can set arbitrary fees: The executor can set either direction fee to any value accepted by LPFeeLibrary.validate, including very high fees, which would extract value from traders.
  • [low] Swaps revert until fees are configured: beforeSwap reverts with ModuleNotSet when no fees have been configured for a pool, so swaps on an unconfigured pool fail.
  • [info] Restricted liquidity and hook callbacks: Only the module can add liquidity, and removeLiquidity, donate and initialization hooks revert with NotImplemented, which is intended for private vault use but limits composability.
  • [info] No direct custody of funds: The hook does not take or return tokens and has no return-delta permissions, so it cannot hold or move user or pool funds directly.

Contract details

Verified source
Yes (ArrakisPrivateHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
4,363 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, liquidity-management

Pools using ArrakisPrivateHook