Same pool.

Same block.

Two prices.

Because they are not the same trades.

A Uniswap V4 hook · direction-dependent dynamic fees

Scroll to see the machine

01 · The mechanism

The toll.

On every swap the hook reads a low-latency oracle and computes one number: the gap g between pool price and true market price.

The swap that closes the gap pays for the privilege. The swap that widens it gets paid in price.

Closing swaps pay base + κ·g. Widening swaps pay below base — they accept a worse-than-market price and give LPs a better fill.

Fees donated to in-range LPs0.00. UNITS0 swaps

02 · Why linear

Profit grows in g².

Volume grows in g.

Margin is linear. So is the fee.

A linear schedule takes a constant share of the arbitrageur's margin at any gap size — 10 bps or 500. The closing swap stays profitable by construction.

profit ∝ g² / volume ∝ g ⇒ margin ∝ g

04 · The side effect, and the risks

Cheapest venue

for half of retail flow.

Widening swaps pay below base fee. Aggregators route here because the price is better, not because they were paid.

The oracle is the attack surface. κ is measured, not guessed. Gas is real.

  • OracleLag ⇒ stale gap · manipulation ⇒ free discount · fix: fast feed + hard bounds
  • κFee = base + κ·|g| · too low ⇒ arb keeps margin · too high ⇒ gap stays
  • GasOne oracle read per swap · small swaps feel it most · target read < 30k

05 · The number

LP yield delta +0.00%+.%

Simulated — backtest pending · LP yield with hook vs. without

One number decides everything else.

The next deliverable is not a token or a testnet. It is a block-by-block twelve-month backtest on ETH/USDC producing one number: LP yield with the hook versus without. That number decides everything else.