DCAHook on Base

Uniswap v4 Hook Contract 0x2677fdcb72f59766d03d9ee4a6c7390bf3ed0800 on Base · Liquidity management · Verified contract

Volume (24h)
$11
Value locked (TVL)
$6.66K
All-time volume
$2.99M
Pools using this hook
3
Swaps (24h)
8 (3 traders)
Total swaps
23,215

What it does

A Uniswap v4 hook that restricts liquidity additions for two DCA-related pools, allowing a single initial deposit into the ETH/DCA pool and requiring full-range positions for the DCA/SPX pool.

How it works step by step

  • Runs a beforeAddLiquidity check on every liquidity add to the configured pools
  • For the ETH/DCA pool (DCA/WETH, 1% fee, tick spacing 200), allows exactly one initial liquidity add and then blocks all further adds
  • For the DCA/SPX pool (DCA/SPX6900, 1% fee, tick spacing 200), only permits positions spanning the full tick range from -887200 to 887200
  • Identifies pools by matching currency pair, fee, tick spacing and hook address against immutable configuration set in the constructor
  • Does not enable any swap, donate or remove-liquidity callbacks and holds no tokens
Swap behaviour
No swap callbacks.
Liquidity behaviour
beforeAddLiquidity restricts liquidity addition. For the ETH/DCA pool, the first add is allowed and sets initialLiquidityAdded to true, after which any further add reverts with LiquidityAlreadyAdded. For the DCA/SPX pool, adds are only allowed over the full range from -887200 to 887200 ticks, otherwise they revert with InvalidTickRange. No liquidity removal callbacks are enabled.
Fee behaviour
Does not set or take fees itself; the ETH/DCA pool and DCA/SPX pool are configured with a static 1% (10000) fee tier at tick spacing 200, which the hook only checks for in pool matching.
Owner & admin controls
No owner or admin role is present in the source. The protocol address and dcaToken are set once in the constructor and stored as immutables, so they cannot be changed. Only the one-time initialLiquidityAdded flag is state.

Enabled Uniswap v4 callbacks

beforeAddLiquidity

beforeAddLiquidity is the only enabled callback; it enforces the one-time initial liquidity deposit for the ETH/DCA pool and the full-range tick requirement for the DCA/SPX pool.

Security & trust assessment

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

Who controls it: There is no privileged key in the hook itself, so no single party can change its behaviour after deployment. Pool initialization and liquidity access are otherwise governed by the PoolManager and position manager, which are outside this contract.

Risk to user funds: The hook does not take custody of tokens and cannot block swaps or withdrawals. Its only effect on funds is gating which liquidity can be added to two specific pools, so exposure is limited to LPs who would otherwise add liquidity to those pools.

Security findings

  • [medium] One-time initial liquidity lock: The first liquidity add to the ETH/DCA pool is restricted to whoever calls it first, and it locks further adds permanently. If the initial deposit is made by an unintended party or at a bad price, the pool cannot be re-seeded through this hook.
  • [low] Wrong hook address reference in DCA/SPX pool check: _isDcaSpxPool compares key.hooks against ethDcaPoolHooks instead of dcaSpxPoolHooks. Both are set to address(this), so behaviour is correct today, but the mismatch is a latent bug that would matter if the two hook values ever diverged.
  • [info] No direct custody of user funds: The hook has no swap callbacks, no return deltas and no token custody logic, so it cannot hold, move or block user swap funds. Liquidity added through it is handled by the PoolManager.
  • [info] Immutable, non-upgradeable design: The contract is not behind a proxy and has no owner, pause or upgrade functions.

Contract details

Verified source
Yes (DCAHook)
Compiler
solc 0.8.26+commit.8a97fa7a
Bytecode size
8,850 bytes
Upgradeable proxy
No

Pools using DCAHook