Unaudited. Base Sepolia only. Never having held value.

The adverse-selection gate does not currently pass — the mechanism is deployed, the evidence is not established. Read the result

AssayAssay

The fee formula

The fee is the base fee plus a share of the drift the swap captures, clamped to an advertised range. There is no model to fit and no coefficients to trust — one parameter, applied to one measurement.

Deployed parameters

ParameterValueMeaning
baseFeePips500Quoted when the pool sits at its reference
minFeePips100Floor on any quote
maxFeePips10,000Ceiling on any quote
captureShareBps1,000Share of captured drift charged as fee

A pip is a hundredth of a basis point, so maxFeePips of 10,000 is 1.00%. One tick is one basis point of price, which makes a tick of drift worth 100 pips before the share is applied — so at 1,000 bps each tick adds 10 pips. The ceiling therefore binds at 950 ticks and the floor at -40 ticks.

quote = clamp(
  baseFeePips + ceil(drift × 100 × captureShareBps / 10000),
  minFeePips,
  maxFeePips
)

Why 1,000 bps

Charging the full drift would deter the arbitrage entirely and leave the pool stale — which loses the uninformed flow that is the liquidity provider's only revenue. Charging nothing is a static fee. The share was calibrated by searching for the value with the least bad worst case across two independent windows of historical flow and the full plausible range of uninformed fee elasticity, rather than the value scoring highest under one assumption.

The fee-cap overflow

A fee expressed as a percentage of notional cannot exceed 100%, and this hook caps far below that. On an extreme dislocation the formula wants to charge more than the cap can express, and everything past it would be silently discarded.

Instead the remainder is recovered as an absolute token amount in the swap's unspecified currency and routed to in-range liquidity providers via poolManager.donate(). The hook never holds it: donate debits the hook and the returned positive delta credits it straight back, so the swapper funds the entire amount and the hook ends the transaction with a zero balance. There is no escrow, no owner, and no withdrawal path.