IMDPairHook on Ethereum

Uniswap v4 Hook Contract 0x667f4621030acfafb1bd0b64d33610a8567f2a44 on Ethereum · Liquidity management · Verified contract

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

What it does

A protocol-owned IMD6900/IMD full-range pool where ETH sale proceeds are bought into both tokens and added as liquidity, with every trade paying the launch pool's fee that is also added back as liquidity.

How it works step by step

  • Opens the IMD6900/IMD pool once at a quoted price and seeds full-range liquidity from ETH it holds
  • Receives ETH sale proceeds via addSaleProceeds and splits them to buy IMD6900 on the launch pool and IMD on the launcher's IMD pool
  • Charges the launch pool's fee in bps on every non-exempt swap output and keeps it in the hook
  • Re-adds held fees and leftover tokens as liquidity through compound or add operations, capped per add by maxEthPerAdd
  • Lets only the owner withdraw liquidity and held balances, or exempt specific callers from the fee
Swap behaviour
afterSwap rejects exact-output swaps, grants transfer allowance equal to the traded IMD6900 amount, and takes the launch pool fee from the output unless the sender is feeExempt.
Liquidity behaviour
Only this hook may add or remove liquidity (beforeAddLiquidity/beforeRemoveLiquidity revert for other senders). Liquidity is full-range; ETH sale proceeds and collected fees are bought into both legs and added via addSaleProceeds/compound/openPool. Owner can withdraw liquidity and all held tokens to any address.
Fee behaviour
Charges the launch pool's fee (fee() = launch hook defaultFee, bps) on the output of every non-exempt swap, taking it into the hook and re-adding it as liquidity. Owner-set feeExempt addresses pay no fee. Pool itself has no LP fee (0).
Owner & admin controls
Owner (Ethereum timelock per docs) can open the pool, set feeExempt callers, withdraw all liquidity and held funds to any address, and transfer or renounce ownership (two-step handover). Strategy owner can setPoolHook to trust this hook and setSaleProceeds; the hook itself has no pause.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize restricts initialization to this hook and the single pool; beforeAddLiquidity and beforeRemoveLiquidity restrict liquidity changes to this hook; afterSwap charges the fee and grants transfer allowance for the trade amount; afterSwapReturnDelta lets the hook take the fee from the swap output.

Security & trust assessment

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

Who controls it: The owner can withdraw all pool liquidity and any tokens or ETH held by the hook to an arbitrary address at any time, and can exempt any contract from the fee. Upgrades are not possible in this hook, but the owner controls which address receives the funds.

Risk to user funds: The hook holds the pool's entire liquidity position and any ETH or token balances it accumulates. Only the owner can withdraw liquidity; traders cannot be blocked by a pause since none exists, but swaps depend on the hook's fee being taken and the strategy trusting the hook.

Security findings

  • [medium] Owner can drain pool liquidity: Owner's withdraw() removes all pool liquidity and sends every ETH and token balance held by the hook to any address in one call, with no timelock inside the contract.
  • [low] Owner-controlled fee exemption: setFeeExempt lets the owner exempt any caller from the launch-pool fee; the NatSpec warns that netting trades within one unlock could leave transient IMD6900 allowance usable elsewhere.
  • [info] Dependence on strategy owner trust: afterSwap grants IMD6900 PoolManager allowance and depends on the strategy's transient allowance mechanism; a trusted hook on the strategy (setPoolHook) can move IMD6900 through the PoolManager, so the strategy owner's trust decisions directly affect this pool's custody.
  • [info] Chunked buys bounded only by per-add cap: Pool fee is read live from the launch pool hook's defaultFee and the buy path uses no minimum-out price limits (MIN/MAX sqrt limit only), so sandwiching of compounding buys is bounded only by the maxEthPerAdd chunk cap.

Contract details

Verified source
Yes (IMDPairHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
11,742 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, liquidity-management, moves-currency, ownable, return-delta, self-unlock

Pools using IMDPairHook