Start
Toxic flow and static fees
Toxicflow is a Uniswap v4 hook. It sets the fee of every swap from what the swap looks like: whether it closes a gap to the market price, how large it is against the pool's depth, whether it repeats in the same block, and what the sender has done before.
What toxic flow is
A swap is toxic for the LPs when the price keeps moving its way after it fills. The clearest case is arbitrage: the outside price of NVDA moves, the pool still quotes the old price, and a bot buys the difference. The LPs sold at the stale price. That loss is measured as the markout: the fill compared with the fair price one and five minutes later.
Why a static fee fails
A static 0.3% pool charges the arbitrage bot and a person buying 50 USDG of NVDA the same rate. The rate is too low to cover what the bot takes and too high for the person, who moves nothing. Toxicflow charges each swap for what it costs the LPs.
What you can do with it
- Quote any swap as a bot and as yourself, live, on the app page.
- Watch the Shadow Tape: real swaps on the chain's busiest pools, priced by the Toxicflow fee function, with their markouts.
- Open a Toxicflow pool on any pair and provide liquidity there.
- Read the model registry: every parameter set, its timelock and its record.
