Liquidity management hook on Arbitrum
Uniswap v4 Hook Contract 0xce3f6cc91b0444411836bbe7b79ebf48da442888 on Arbitrum · Liquidity management
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
This hook routes exact-input swaps from its trusted router into one fixed DODO V2 pool at the DODO pool's own price with no extra vault fee, and it blocks all liquidity additions through the v4 pool.
This read was written for the hook 0x2e6a…e888 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 a Uniswap v4 swap on a single pool into one DODO V2 pool (DVM/DSP PMM) that is fixed at construction
- On beforeSwap, syncs the PoolManager, takes the input tokens into the DODO pool, calls sellBase or sellQuote, then settles the measured output back to the PoolManager
- Returns a before-swap delta that cancels the core AMM and reports the aggregated fill as the swap result
- Charges an optional deploy-fixed vault fee on the unspecified side; feePips is required to be zero by the constructor, so no fee is taken in this deployment
- Restricts swaps to a single trusted router address and rejects exact-output swaps and native currency
- Blocks all liquidity additions through beforeAddLiquidity, so liquidity comes only from the DODO pool
- Swap behaviour
- Only exact-input swaps from the trusted router succeed. The input is prefunded into the DODO pool, the DODO pool sells it, and the measured output is settled to the PoolManager, so the trader receives the DODO pool's price for the pair with no additional fee. Exact-output and native-currency swaps revert.
- Liquidity behaviour
- beforeAddLiquidity always reverts with LiquidityNotAllowed, so no liquidity can be added through the v4 pool. Liquidity is held in the external DODO pool, and pseudoTotalValueLocked reports the hook's balances in that pool.
- Fee behaviour
- feePips is set to 0 by the constructor and any non-zero value reverts, so the hook takes no vault fee. The swap price is determined by the DODO pool's own fee model, and the pool itself uses a static zero fee.
- Owner & admin controls
- The contract has no owner, pause, upgrade or parameter-setter functions in the ABI. All addresses (dodoPool, baseToken, quoteToken, trustedRouter, vault, feePips and the exempt slots) are immutable. The only public effect a caller can trigger is sweepDust, which is permissionless but only sends stranded balance to the vault while the PoolManager is locked.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize registers the single canonical pool and checks it matches the DODO base and quote pair. beforeSwap enforces the trusted router, performs the DODO sell, settles output, and returns the before-swap delta that replaces the core AMM fill. beforeAddLiquidity blocks liquidity provision.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: No privileged key is exposed in the ABI. The only role is the immutable trusted router address, which has no admin ability beyond being the sole allowed swap sender.
Risk to user funds: During a swap the hook briefly holds the input (prefunded into the DODO pool) and settles the output. Input is transferred to the external DODO pool, so the user's funds are exposed to that pool's behaviour. The hook otherwise holds no residual balance except stranded dust, which sweepDust can move to the vault.
Security findings
- [medium] Return delta takes over the swap fill: beforeSwapReturnDelta is enabled and the hook performs the swap itself through an external DODO pool, so the hook's delta and the pool's pricing determine what the trader receives. Correctness depends on the external DODO pool's behaviour and on the measured-output checks in _conductSwap.
- [info] Trusted router gate: Swaps are accepted only when the sender argument equals the immutable trustedRouter, so arbitrary callers cannot route through this hook.
- [medium] Dependence on external DODO pool: The hook sends user input to dodoPool.sellBase or sellQuote and relies on the returned amount, bounded by the measured PoolManager balance increase. A malicious or faulty pool could return unexpected output, though the contract reverts if measured output exceeds the reported amount.
- [info] Immutable configuration: No admin or upgrade paths exist; a misconfigured pool or router requires redeployment.
Contract details
- Verified source
- No
- Bytecode size
- 14,913 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta
Pools using Liquidity management hook
- WETH / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today