LineaDATHook on Linea

Uniswap v4 Hook Contract 0xa0fad88e899d7a70179a473140111ab4016f6444 on Linea · Dynamic fee · Verified contract

Volume (24h)
$0
Value locked (TVL)
$21
All-time volume
$10.47K
Pools using this hook
1
Swaps (24h)
0 (0 traders)
Total swaps
125

What it does

A Uniswap v4 hook for LineaDAT strategy pools on Linea that charges a time-decaying buy fee (99% falling to 10%) and a flat 10% sell fee, then splits collected fees between the strategy treasury, a burn path and a creator recipient.

How it works step by step

  • Blocks exact-output swaps and blocks all swaps before the launch timestamp
  • Computes buy fees decaying 100 bips per minute from 99% to a 10% floor and a flat 10% sell fee
  • Takes the fee from the swap output via the pool manager and returns it as an afterSwap return delta
  • Swaps non-ETH fees back to ETH through the same pool when needed
  • Splits ETH fees 80% to the strategy treasury, 10% to the LineaDAT burn path or creator, and 10% to the collection fee recipient or treasury
  • Grants the strategy transfer allowances during liquidity loading and on swaps
Swap behaviour
Only exact-input swaps are allowed; exact-output reverts. Trading reverts before the scheduled launch time. After each swap, the hook takes a fee in the output currency, converts non-ETH fees to ETH, distributes them, and emits HookFee and Trade events.
Liquidity behaviour
afterAddLiquidity is only permitted while the factory is loading liquidity; it grants the strategy a transfer allowance equal to the token amount added. No remove-liquidity callbacks.
Fee behaviour
Buy fees (ETH to token) start at 99% and decrease 1% per minute to a floor of 10% over about 89 minutes from deploymentTime; sell fees are a flat 10%. Fees are taken from the output token in afterSwap, swapped to ETH if needed, then split 80% to the strategy treasury, 10% to the LineaDAT burn path (factory, or feeAddress on self-launch), and 10% to the collection's fee recipient or the treasury if unset.
Owner & admin controls
Factory owner (via lineaDATFactory.owner()) can update the global feeAddress, set or move scheduledLaunchTime until launch (which also moves deploymentTime for the LineaDAT pool), and set per-strategy fee addresses via adminUpdateFeeAddress. The underlying token owner can set feeAddressClaimedByOwner for their own collection via updateFeeAddressForCollection. No pause function or upgrade path is present in the hook itself.

Enabled Uniswap v4 callbacks

beforeInitialize, afterAddLiquidity, afterSwap, afterSwapReturnDelta

beforeInitialize validates ETH/token pool and factory-initiated creation and records the decay start time; afterAddLiquidity grants transfer allowance during factory liquidity loading; afterSwap enforces exact-input only, gates trading until launch, takes the dynamic fee, distributes it, and emits events; afterSwapReturnDelta lets the hook return a fee delta that is taken from the swap.

Security & trust assessment

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

Who controls it: The factory owner can redirect protocol fee recipients via feeAddress and adminUpdateFeeAddress, and can delay or move the launch time before it occurs. The owner cannot directly change the fee curve constants, which are hardcoded, but redirecting fee recipients could divert the 80% and 10% shares on a per-strategy basis.

Risk to user funds: The hook takes a dynamic fee of up to 99% of the swap output on buys during the early decay window, and it moves swap funds through the pool manager during afterSwap. It can hold ETH transiently while distributing fees and routes ETH to the factory, fee recipients and the strategy treasury. It does not hold user principal beyond fees in normal operation.

Security findings

  • [high] Extremely high initial buy fee: Buy fees begin at 99% and fall 1% per minute, so early buyers in the decay window pay almost the entire input amount as a fee; this is a designed mechanism but is a significant user cost.
  • [medium] Owner can move launch timing: The factory owner can call setScheduledLaunchTime to move the launch and retroactively update deploymentTime for the LineaDAT pool until the launch passes, changing when trading opens and when the decay starts.
  • [medium] Mutable fee recipients: Fee recipient addresses (feeAddress, feeAddressClaimedByOwner) can be changed by privileged accounts, redirecting protocol and creator fee shares.
  • [info] Hook moves swap currency via return delta: afterSwap uses return deltas to take fees from swaps and calls manager.take and internal swaps through the pool manager, meaning the hook holds and moves pool-level funds during trades.
  • [low] External ETH transfers in swap path: Swap-triggered fee conversion and ETH forwarding to external recipients via forceSafeTransferETH; a malicious or reverting fee recipient could affect swap execution, though the hook is non-reentrancy guarded in its inheritance.

Contract details

Verified source
Yes (LineaDATHook)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
7,359 bytes
Upgradeable proxy
No
Detected patterns
dynamic-fee, launchpad, moves-currency, return-delta

Pools using LineaDATHook