ClearTokenClearTokenEthereum
Uniswap v4 · Ethereum · $CLEAR

One clearing price, per block.

An AMM quotes continuously, so the second trade in a block always pays more than the first. That gap is not a technical accident — it is the sandwich's entire margin. ClearToken pins the price a block opened at and settles everyone after the first trade back to it. The price stops sliding inside a block. It steps between them.

+0.295 Ξ a sandwich, on a plain pool
−0.399 Ξ the same attack, here
15/15 fork tests against mainnet
01

What a block looks like

BLOCK n+0BLOCK n+1BLOCK n+2BLOCK n+3BLOCK n+4BLOCK n+5
cleared price · flat for the blockthe curve, still slidingthe trade that pinned it
02

Three rules, no exceptions

01

The price steps, it does not slide

The first trade of a block discovers the price. Everyone after it is settled back to the price the block opened at — topped up when the curve gave them less, skimmed when it gave them more.

02

The sandwich stops paying

A front-run moves the curve but not the block's clearing price. The victim is filled as if it never happened, and the attacker's exit is skimmed back to the price it entered at. The attacker funds the victim's protection.

03

Nothing is ever owed

A top-up is capped by what the hook actually holds. It never credits a trader to settle later, so there is no shortfall to discover and no swap that can fail because the buffer ran dry — it simply corrects less.

A v4 return delta only touches the unspecified currency, so corrections reach exact-input swaps — a buy is corrected in CLEAR, a sell in ETH. Exact-output passes through untouched. We would rather write that here than have you find it.