$EV technical documentation

The hook, the math, the security model.

Everything you need to evaluate, integrate, or audit the Extractable Value Uniswap V4 hook. Written for protocol engineers and serious LPs.

Overview

Extractable Value is a Uniswap V4 hook contract. It intercepts every swap on its pools, scores the transaction's likelihood of being predatory (MEV, sandwich, atomic arb), and applies a dynamic fee in the same call. The fee proceeds are split across LPs, a burn address, and protocol-owned liquidity, all inside afterSwap.

There is no off-chain component. No relayer. No private mempool. The hook is fully on-chain, deterministic, and verifiable from the transaction trace.

Why a V4 hook and not V3?
V3 fee tiers are fixed at pool creation. The whole mechanic depends on per-swap fee adjustment, which V4 enables through BeforeSwapDelta. EV is not a thing you could build in V3.

The V4 hook

The contract is named ExtractableValueHook and implements the following V4 permissions:

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
    });
}

Only the swap path is hooked. Liquidity actions go straight through the PoolManager untouched, which keeps LP-side gas costs identical to a vanilla V4 pool.

Classifier signals

The toxicity score s ∈ [0, 1] is a weighted sum of five normalised signals, each derivable in O(1) from on-chain state available at the moment of beforeSwap.

SymbolSignalWeightSource
σ₁Basefee premium0.22tx.gasprice βˆ’ block.basefee
Οƒβ‚‚Slippage tolerance0.18amountOutMin vs quoted
σ₃Volume burst0.22pool 30-block volume ring buffer
Οƒβ‚„Same-block adjacency0.26per-EOA last-touch tracking
Οƒβ‚…Gas-priority percentile0.12pool-level priority-fee histogram

The score is computed as:

s = Ξ£α΅’ wα΅’ Β· Οƒα΅’      where  Ξ£α΅’ wα΅’ = 1.00

Calibration was performed against the last 18 months of Base mainnet sandwich-attack data extracted from public mempool dumps. The weights were tuned to maximise the F1 score against a ground-truth set of 4,812 confirmed sandwich legs.

Initial calibration: precision 0.91, recall 0.88, false-positive rate 0.04. Calibration data and notebook will be published in research/classifier-calibration.ipynb with the audit.

Fee curve

Given the classifier score s, the hook returns a per-swap fee in basis points:

f(s) = 30 bps Β· (1 + 16 Β· s)
ScoreMultiplierFee (bps)Fee (%)
0.001.0Γ—300.30%
0.204.2Γ—1261.26%
0.407.4Γ—2222.22%
0.6010.6Γ—3183.18%
0.8013.8Γ—4144.14%
1.0017.0Γ—5105.10%

The 30-bps base is identical to Uniswap V3's most popular fee tier so that benign flow has no incentive to leave the pool. The 17Γ— ceiling is the gradient at which further extraction stops being profit-positive for the attacker, derived empirically from sandwich profitability distributions on Base.

Tax-split mechanics

Inside afterSwap, the accumulated tax (above the 30-bps base) is partitioned:

65%

LP claim balance

Settled as BalanceDelta against the pool's liquidity at the current tick. Honest LPs accrue a yield surcharge proportional to in-range share at the moment of the tax.

25%

Burn

Tax denominated in the non-EV side is swapped for $EV through the pool itself, then transferred to the burn address (0x…dEaD). Float shrinks every block that sees toxic flow.

10%

Reinforcement (POL)

Added as protocol-owned liquidity at the active tick. Pool depth strictly increases on every toxic swap. Each attack makes the next attack more expensive.

All three legs are settled in the same transaction. No batched accounting, no asynchronous claims.

Burn schedule

$EV has no scheduled burn. The burn lane fires only on toxic swaps. Aggregate burn rate is therefore proportional to MEV intensity on the host chain. The chart below shows the projected float trajectory under three Base-MEV-volume scenarios:

80M 90M 95M 100M launch +1y +2y +3y +5y low MEV median (base case) high MEV

Scenarios assume Base MEV volume of $40M / $180M / $620M monthly (low / median / high) and the EV pool capturing the historical Base-MEV market share for a top-3 trading venue (~14%). Actual burn depends on realized extractive flow; nothing about future MEV intensity is guaranteed.

Token economics

  • Total supply: 100,000,000 $EV (fixed at deploy; no mint() function exists).
  • Decimals: 18.
  • Transfer logic: standard ERC-20 with one addition. Transfers to 0x...dead are tracked separately so the front-end can show a real-time burned-supply counter without an indexer.
  • No team allocation. The hook fund (20%) is multisig-controlled by the deployers but its bylaws are public and any movement above 0.5% of supply requires a 7-day timelock.
  • No vesting cliffs. The reinforcement reserve unlocks linearly over 12 months. Everything else is at-TGE.

Security model

Trust assumptions

  • You trust Uniswap V4's PoolManager (audited, in production).
  • You trust that block.basefee and tx.gasprice reflect honest validator behaviour on Base. The classifier degrades gracefully when these are manipulated. The score floor at s = 0 means a perfectly cooperative validator simply forfeits MEV revenue rather than poisoning the pool.
  • You do not need to trust the EV team. The hook is non-upgradeable. The fee coefficients are immutable. The split is hard-coded.

Known limitations

  • The classifier sees only the current transaction and the pool's recent history. Cross-pool sandwich attacks that route through non-EV pools are not detected here (and not within the hook's scope).
  • A sufficiently patient adversary can avoid every individual signal, but staying out of all five simultaneously imposes meaningful opportunity cost. That's the point.
  • The first 10,000 swaps on the pool are in a calibration window where σ₃ (volume burst) is disabled. Pool-relative volume needs history before it's meaningful.

Audit plan

External audit by a tier-1 firm scheduled for July 2026 (Phase 2). $25,000 bug bounty open from the day the sepolia contract is verified until 30 days after mainnet launch. Critical findings receive the full bounty; scope and tier definitions follow the Immunefi standard template.

Governance

EV has the smallest possible governance surface. The deployed hook is non-upgradeable. The fee curve coefficients (30 bps base, 16Γ— ceiling), the score weights {0.22, 0.18, 0.22, 0.26, 0.12}, and the split percentages (65 / 25 / 10) are all written into immutable storage at deploy time.

The only mutable parameter is the per-pool classifier recalibrationOffset, which lets the score curve be re-centred Β±0.10 if Base-mainnet MEV patterns shift sharply. This offset is set by a 2-of-3 multisig with a 7-day timelock and a hard cap of one adjustment per 30-day window.

There is no $EV-holder vote. There is no DAO. The token does not entitle the holder to anything other than the LP economy it powers.

Deployment

ChainBase mainnet (chain ID 8453)
PoolEV / WETH Β· 0.30% base tier Β· EV hook bound
Compilersolc 0.8.26 Β· evm-version cancun Β· optimizer 200 runs
VerificationBasescan + Sourcify on day 0
AuditTier-1 firm Β· Phase 2 (July 2026)
Mainnet targetQ2 2026, post-audit

FAQ

If the classifier ever flags my honest swap, what happens?

You pay the higher fee on that swap. There is no penalty beyond the fee itself: your trade still clears, your funds aren't held, you aren't reverted. The expected false-positive rate at the published weights is 4%, and a false positive only matters when your score crosses the 0.20 suspect threshold.

Could a wrapper smart contract obfuscate Οƒβ‚„ (same-block adjacency)?

It can obfuscate the EOA, but Οƒβ‚„ tracks router-proxy patterns too. We maintain a public registry of known sandwich-relay contracts. Adding new ones requires the same 7-day timelock that governs the classifier offset.

Why Base and not Ethereum mainnet?

Base has more MEV concentration per dollar of TVL than mainnet right now and lower block times amplify the volume-burst signal. We also already have V4 hook deployments on Base from prior work, which compresses the time-to-mainnet by a meaningful margin.

Where can I read the actual hook source?

It will be open-sourced on day 0 of the sepolia deployment (Phase 1, June 2026). The repo will live under EVonBASE/extractable-value-hook on GitHub. Until then the spec on this page is the canonical reference.

Got a question that isn't here?

The fastest path is a reply on @EVonBASE. We read every DM during the build-out.