Extractable Value
No new infrastructure. Just a Uniswap V4 pool with the ExtractableValueHook address baked into PoolKey.hooks.
Five signals score the trade. The fee scales. The proceeds split. All in one transaction.
Trader, arbitrageur, or MEV searcher calls swap() on the EV pool. The V4 PoolManager routes through beforeSwap().
Five signals score the trade: block basefee premium, slippage tolerance, recent volume burst, gas priority, and same-block-position. Output is a toxicity score in [0, 1].
The hook returns a BeforeSwapDelta equal to baseFee × (1 + 16 × score). Benign trades pay 30 bps. Maximum-toxicity trades pay 510 bps.
afterSwapThe accumulated tax is settled: 65% to LP claim balances, 25% to a burn, 10% to protocol-owned-liquidity reinforcement. All in the same transaction. No relayer.
All five are derivable from block.basefee, tx.gasprice, the swap parameters, and the pool's recent activity history. Everything is verifiable inside the hook in O(1) time.
How far above the median block basefee this transaction sits. Sandwiches outbid the basefee aggressively to win position; honest retail does not.
Wide amountOutMin tolerances are the calling card of swaps designed to be re-quoted by a bundler. Tight slippage signals an intended trade.
Has this pool seen more than 4× its 30-block median volume in the last block? Sandwiches arrive in clusters; benign flow does not.
Did the same EOA, or a known router proxy, swap the opposite direction in the same block? Direct sandwich-leg fingerprint.
Where this transaction's priority fee sits within the pool's last-block distribution. Top-decile gas is overwhelmingly extractive.
Liquidity actions go straight through the PoolManager untouched. LP-side gas costs match a vanilla V4 pool.
function getHookPermissions() public pure override returns (Hooks.Permissions memory) { return Hooks.Permissions({ beforeInitialize: false, afterInitialize: true, beforeAddLiquidity: false, afterAddLiquidity: false, beforeRemoveLiquidity: false, afterRemoveLiquidity: false, beforeSwap: true, // classify + price afterSwap: true, // settle + split beforeDonate: false, afterDonate: false, beforeSwapReturnDelta: true, // returns the tax delta afterSwapReturnDelta: false, afterAddLiquidityReturnDelta: false, afterRemoveLiquidityReturnDelta: false }); }
Classifier weights, calibration data, security assumptions, audit plan, deploy steps.