Aggregator hook on Base
Uniswap v4 Hook Contract 0x37777daaba3fcae2311da9120419e667f64ca888 on Base · Aggregator
- Volume (24h)
- $0
- Value locked (TVL)
- $848.32K
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
An immutable aggregator hook that fills swaps against a matching Uniswap V2 pair and charges a fixed vault fee of up to 1% on top of the pair's fee, while up to four direct-calling exempt addresses pay no hook fee.
This read was written for the hook 0x1d9e…a888 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
- Routes every swap on its v4 pool through a matching Uniswap V2-style pair found via a fixed factory, so trades fill against that external pair's reserves.
- Charges an optional vault fee, fixed at deployment and capped at 1%, on the swap's unspecified side (output for exact-in, input for exact-out), sent to an immutable vault address.
- Up to four deploy-fixed addresses are fee-exempt, but only when they call the PoolManager directly.
- Blocks anyone from adding liquidity to the v4 pool, since all liquidity comes from the external V2 pair.
- Has no owner or setters; anyone can sweep leftover dust held by the hook to the vault while the PoolManager is locked.
- Swap behaviour
- In beforeSwap the hook sends your input tokens to the external V2 pair, receives the pair's output into the PoolManager, and returns a delta that replaces the v4 pool's own swap, priced at the V2 pair's constant-product rate and pair fee. A fixed vault fee of at most 1% is then taken from your output (exact-in) or added to your input (exact-out), unless the direct caller is one of up to four exempt addresses.
- Liquidity behaviour
- Adding liquidity to the v4 pool always reverts, so no v4 LP positions exist. Remove-liquidity callbacks are disabled, so the hook can never block withdrawals.
- Fee behaviour
- Traders pay the external V2 pair's built-in fee, which must match the pool's fee setting, plus an immutable hook fee of 0% to 1% of the unspecified-side amount, sent to a fixed vault. Up to four fixed exempt addresses pay no hook fee when calling the PoolManager directly.
- Owner & admin controls
- No admin controls found. The fee (capped at 1%), vault, factory and exempt list are all fixed at deployment.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize: checks tokens, fee and tick spacing, and links the pool to its V2 pair; beforeAddLiquidity: always reverts to forbid v4 liquidity; beforeSwap: executes the trade on the V2 pair and takes the vault fee; beforeSwapReturnDelta: replaces the v4 swap amounts with the external fill.
Security & trust assessment
Risk level: low, estimated (decoded bytecode, high confidence).
Who controls it: No owner or admin keys exist; all parameters are immutable. The deployer only chose the vault, fee (max 1%) and exempt addresses up front.
Risk to user funds: The hook only handles a trader's swap amounts during the swap and takes at most 1% as a vault fee. There is no v4 LP principal, since adding liquidity is blocked, and withdrawals are never gated.
Security findings
- [info] Immutable fee capped at 1%: The vault fee is set once in the constructor and cannot exceed 1% of the unspecified-side amount; there is no setter.
- [info] Fee-exempt addresses: Up to four deploy-fixed addresses skip the vault fee when they call the PoolManager directly, giving them a cost advantage over routed users, for example in arbitrage.
- [info] External pair pricing: Swap prices come entirely from the external V2 pair's reserves, so normal slippage protection in your router is what guards against price moves.
Contract details
- Verified source
- No
- Bytecode size
- 15,508 bytes
- Upgradeable proxy
- No
- Detected patterns
- aggregator, moves-currency, return-delta
Pools using Aggregator hook
- WETH / USDC (0.30% fee) — 24h volume $0, TVL $848.32K, 0 swaps today