DNAHook on Ethereum
Uniswap v4 Hook Contract 0xc724dd91b41069782a1b3d19a89b1248d2c4bfff on Ethereum · Dynamic fee · Verified contract
- Volume (24h)
- $2.71K
- Value locked (TVL)
- $8.02K
- All-time volume
- $2.75M
- Pools using this hook
- 1
- Swaps (24h)
- 55 (33 traders)
- Total swaps
- 9,053
What it does
A launch-specific fee hook for the DNA/ETH pool that charges a fixed platform fee, a time-decaying launch tax routed to buyback-and-burn, and a registry-selectable project fee capped at 5%, with anti-sniping caps and a liquidity lock during the first four minutes.
How it works step by step
- Enforces the canonical ETH/DNA dynamic-fee pool and refuses any other pool using this hook.
- Charges a 90%-to-10% launch tax over the first 9 blocks, routed to buyback-and-burn.
- Sets a project fee from 3% at initialization sliding to 2.2% over one hour, optionally overridden by a registry-selected fee module capped at 5%.
- Adds a fixed 0.30% platform fee on every swap, minted as ERC-6909 claims to a platform revenue address.
- Caps DNA leaving the pool to 2% of supply per block and 1% per wallet during the first minutes, and blocks liquidity additions in that window while never blocking removals.
- Swap behaviour
- On every swap the hook charges a fee on the ETH leg via beforeSwapDelta and afterSwap return deltas: project fee (launch tax, baseline or module-set, capped at 5%) plus 0.30% platform fee, minted as ERC-6909 claims to vault addresses. DNA buybacks pay no project fee. During the launch window per-block net outflow and per-wallet buys are capped and can revert swaps.
- Liquidity behaviour
- Adding liquidity is blocked (LiquidityLocked) during the first 4 minutes after initialization except in the initialization transaction itself. Removing liquidity is never blocked. Return deltas for liquidity callbacks are zero.
- Fee behaviour
- Project fee in pips is set per swap: a launch tax (90% stepping down 10% per block for the first 9 blocks, applied to buyback-and-burn) followed by a baseline of 3% at initialization sliding linearly to 2.2% over one hour, optionally overridden by a registered fee module (gas-capped STATICCALL, clamped to a 5% maximum, with a canary bounded to ±1 point). A fixed 0.30% platform fee is added on every swap. Fees are taken in ETH via return deltas and minted as ERC-6909 claims to feeVault, buybackBurn and platformRevenue. DNA's own buybacks (sender == buybackBurn) pay no project fee.
- Owner & admin controls
- No admin controls found. There is no owner or setter; constants are fixed in code. The registry (immutable address) can call setRoute to replace the fee module route and canary/shadow modules, and can thereby change the project fee within the 5% cap and the constitution bounds. Wiring addresses (token, registry, feeVault, platformRevenue, buybackBurn) are immutable.
Enabled Uniswap v4 callbacks
beforeInitialize, afterInitialize, beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity, afterRemoveLiquidity, beforeSwap, afterSwap, beforeDonate, afterDonate, beforeSwapReturnDelta, afterSwapReturnDelta, afterAddLiquidityReturnDelta, afterRemoveLiquidityReturnDelta
beforeInitialize/afterInitialize: enforce the canonical ETH/DNA dynamic-fee pool with tick spacing 1 and record launch timestamp and block. beforeAddLiquidity: enforce the launch liquidity lock. afterAddLiquidity/afterRemoveLiquidity: pass through with zero return delta. beforeRemoveLiquidity: pass through, never blocks removal. beforeDonate/afterDonate: pass through. beforeSwap: determine project pips, charge the ETH-side fee via beforeSwapDelta, and enforce per-block and per-wallet launch caps. afterSwap: reconcile fee on the non-native side, record observables, and update the net cap. beforeSwapReturnDelta and afterSwapReturnDelta: the hook takes fee tokens (ETH) via return deltas. afterAddLiquidityReturnDelta and afterRemoveLiquidityReturnDelta: enabled and implemented, returning zero deltas.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No owner or pause. The registry can replace the fee module route and canary/shadow modules via setRoute, changing the project fee for all swaps up to the 5% cap; it cannot touch pool funds or block swaps directly. Fee modules themselves are external contracts chosen by the registry and can return any value up to 5%.
Risk to user funds: The hook holds no user funds beyond transient ERC-6909 claims for fees minted to fixed vault addresses; it cannot move pool funds arbitrarily, and removal of liquidity is never blocked. Exposure comes from the registry-controlled fee (up to 5%+0.3%) and launch caps that can revert swaps.
Security findings
- [medium] Registry-controlled fee up to 5%: Project fee is capped at 5% (MAX_PROJECT_FEE) on top of the 0.30% platform fee; the registry-selected module can set any value up to that cap, so traders can be charged up to 5.3% per swap via the active route.
- [medium] Launch caps can revert trades and are bypassable via wallet splitting: During the launch window, per-block net DNA outflow is capped at 20M and per-wallet gross buys at 10M, keyed by tx.origin; smart-wallet bundlers share one origin, and tokens moved between wallets are not tracked. Wallet cap is only enforced from block 4, and sells can cause swaps to revert with LaunchCapExceeded.
- [low] Liquidity locked during launch window: Adding liquidity is blocked for 4 minutes after initialization, which can be treated as intentional by design but restricts LPs during that window.
- [low] Gas-dependent swap reverts: Fee-module failures fall back to baseline and a breaker counter is incremented; a gas budget check reverts swaps (OutOfGasBudget) if insufficient gas is supplied, so the fee cannot depend on caller gas but swaps can revert under low gas.
- [info] Fee custody via ERC-6909 claims: Hook takes ETH via return deltas and mints ERC-6909 claims to fixed vaults; no path lets an operator withdraw user funds, and removal of liquidity is never blocked.
Contract details
- Verified source
- Yes (DNAHook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 12,902 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, launchpad, liquidity-management, return-delta, tax
Pools using DNAHook
- ETH / DNA (Dynamic fee) — 24h volume $2.71K, TVL $8.02K, 55 swaps today