# ImpactSplit > Charges a swap for the price impact that lasts, and gives back the impact that does not. A production Uniswap v4 hook. Source: https://github.com/nirholas/impact-split. Part of the HookForge catalogue: https://hookforge.pages.dev ## How it works Market microstructure has separated two things for forty years that every AMM still treats as one. When a trade moves a price, part of that move is information, and the price stays where the trade put it. The rest is the cost of demanding liquidity right now, and the price comes back. The first is called permanent impact and the second temporary, and the distinction is the whole reason a market maker can quote at all: they lose to the first and earn from the second. An AMM charges a fee on size and calls it done. Size is a bad proxy for either component. A large trade in a deep pool moves nothing and pays the same rate as a small one that moves the price a long way, and a pool that raises its fee with volatility charges the informed and the uninformed identically because at the moment of the swap they are indistinguishable. They are indistinguishable at that moment. They are not indistinguishable later. This hook charges every swap for the impact it causes, holds the charge, and then looks again after a settlement window: whatever share of the move has survived is paid to the liquidity providers who wore it, and whatever share has decayed is returned to the trader who was only ever renting liquidity. Nobody has to guess which kind of flow arrived. The price says so, afterwards, for free. A trader who moves the price and is right pays. A trader who moves the price and is wrong is refunded and has paid only the pool's ordinary fee. That is the correct answer in both cases, and it is not reachable by any rule that has to decide at swap time. ## Prior art Permanent and temporary impact are standard microstructure, from Kyle's lambda through Almgren-Chriss. On-chain, dynamic-fee hooks price volatility or realised spread at the moment of the swap, and markout-based fees (including this catalogue's own MarkoutFee) grade past flow to price the next trade. Deferring an individual swap's own charge, then splitting it between the providers and that same trader according to how much of its move survived a settlement window, is the contribution here. ## Where it does not help A single swap's persistence is measured against whatever the price does next, including other people's flow, so per-trade it is noisy and only correct in expectation; a pool with very few trades per window will hand out refunds and charges that individually look arbitrary. The charge is escrowed in the swap's unspecified currency, so a trader collects refunds in whichever side their trades happened to leave, and an unsettled escrow earns nothing while it waits. Settlement is permissionless but not automatic, so an escrow nobody settles sits until somebody does. And the window is fixed at configuration: too short and everything looks permanent, too long and everything looks temporary. ## Facts Slug: impact-split Contract: ImpactSplitHook Callbacks: afterSwapReturnsDelta, afterSwap, beforeSwap, afterInitialize Parameters: maxImpactFee (uint24), halfPointTicks (uint32), windowSeconds (uint32), minTicks (uint32) Dynamic fee required: no ## Caveats - Unaudited. - A deployment with status "deterministic" is a mined CREATE2 address with no code at it yet. Never present one as live.