Open app

Hook

On-chain signals

Every signal is read in beforeSwap with a bounded amount of gas: two slot0 reads, one liquidity read, one tier lookup and one storage slot for repeats.

Reference price

Each Toxicflow pool names a static pool on the same pair (no hook) as its reference, read through extsload. The keeper also posts a reference price per pool, valid for 10 minutes. When the two disagree by more than the model's band, the hook uses the one that charges the swap more. A pool with no same-pair static pool runs on the keeper's price.

Size against depth

The impact estimate above. Small swaps stay at the base fee; the term grows with the square of the impact.

Same-block repeats

The hook counts swaps per pool, block and direction. The second swap in the same block and direction pays one step, the third two, up to ten.

Sender tier

tx.origin is looked up in the tier table the keeper publishes: 0 neutral, 1 high frequency, 2 informed, 3 repeated reference-closing flow that the markouts prove right. Routers are seen through tx.origin. A smart wallet whose origin is a bundler reads as neutral.

gap to referenceimpact vs depthsame-block repeatssender tierfee