EVHEthereum
Virtual Hook
EVH CA0x1E51ff551d434a0186b78e83EAAD2acCEc9e787aEtherscan ↗
Ethereum Virtual Hook · Uniswap V4 · L1

The hookthat runseverything.

One V4 hook, zero hard-coded strategy. EVH turns all eight pool callbacks into phases and runs plugins inside them — metered in fuel, gated by permits, backed by slashable bonds, and never able to break the swap.

Hypervisor State Hook flags 0x3fc0
PRE·INITPOST·INITPRE·ADDPOST·ADDPRE·RMVPOST·RMVPRE·SWAPPOST·SWAP
EVH priceawaiting pool
Market capChainlink ETH/USD
Pluginscatalog
Runslifetime
Fuel meteredgas, lifetime
Slashedbonds burned
SYNCINGBLOCK EPOCH PLUGINS ASSIGNED POOLS LAST DISPATCH HYPERVISOR
01 / HOW IT RUNS

The pool is the machine.
Plugins are guests.

A conventional hook ships one behaviour. The EVH hypervisor ships none — it schedules whatever the catalog has assigned on each phase, in rank order, inside hard fuel caps.

01 · WriteIPlugin
01

Two functions

spec() declares label, phases, fuel cap and permits. run() executes inside the pool callback.

contract SwapCounterPlugin is PluginBase {
    uint256 public swaps;

    function spec() external pure returns (PluginSpec memory) {
        return PluginSpec({
            label: "SwapCounter", semver: "1.0",
            phaseMask: PhaseMask.bit(Phase.PostSwap),
            fuelCap: 120_000,
            permits: Permits.READ_STATE | Permits.WRITE_MEMORY
                | Permits.EMIT_LOGS
        });
    }

    function _onRun(Invocation calldata inv)
        internal override returns (bytes memory)
    {
        _store(KEY_SWAPS, bytes32(++swaps));
        return _pass();
    }
}
02 · RegisterPluginCatalog
02

Scanned & matched

Registration is permissionless, not free. Every gate runs on-chain before a single frame executes.

  • Author holds the minimum EVH stake
  • OpcodeScanner sweeps the runtime bytecode
  • On-chain spec() must match every declared field
  • Open permits granted; gated permits wait for the Council
03 · AssignDispatchBoard
03

Ranked per phase

A pool operator assignments the plugin on a phase at a unique rank. The runtime walks the lineup every swap.

PRE·SWAP
reading lineup…
POST·SWAP
reading lineup…
02 / PHASE MAP

Eight phases.
One scheduler.

Every V4 lifecycle callback is a scheduling slot. Pre-phases see intent; post-phases see settled deltas. The swap pair is the hot path — it runs on every trade.

00 · PRE·INIT

Pre-initialize

reading
01 · POST·INIT

Post-initialize

reading
02 · PRE·ADD

Pre-add liquidity

reading
03 · POST·ADD

Post-add liquidity

reading
04 · PRE·RMV

Pre-remove liquidity

reading
05 · POST·RMV

Post-remove liquidity

reading
06 · PRE·SWAP

Pre-swap

reading
07 · POST·SWAP

Post-swap

reading
03 / THE TRUST ARGUMENT

Guests, not
root.

Nothing a plugin does can revert a pool operation. A faulting plugin is caught per frame, the runtime is caught by the hypervisor, and degradation always ends at “no plugins ran” — never “the pool is broken”.

Permittedenforced per frame

Can

5 rights
  • Read price, tick and liquidity for the invocation
  • Write its own namespaced PluginMemory slots
  • Bid the next dynamic fee — clamped to the pool's band
  • Emit events and schedule deferred jobs
  • Call listed targets, once the Council approves it
Refusedenforced at registration + runtime

Cannot

5 walls
  • DELEGATECALL, CALLCODE, CREATE, CREATE2, SELFDESTRUCT
  • Touch another plugin's memory namespace
  • Burn past its fuel cap or its epoch allowance
  • Revert the swap it runs inside
  • Move a swapper's funds — the hook holds no delta permissions

The opcode scan is a necessary condition, not a sufficient one: a clean plugin can still be economically adversarial. Bonds, strikes and the Council bound that — the scan makes failures attributable.

04 / LIVE CATALOG

Running
right now.

Straight from the Lens contract — runs, faults, fuel and bonds as the chain reports them.

Reading catalog…

The first registration will appear here.

05 / THE TOKEN

EVH is the
fuel standard.

Not a claim on the hook — the resource the hook meters against.

FUEL

Allowance

Bond EVH behind a plugin to raise its per-epoch fuel allowance. No bond, base allowance.

BONDS

Skin in it

Bonds are slashable. Three attributed faults and a share is burned — never redistributed, so nobody profits from failure.

COUNCIL

Weight

Locked EVH votes to approve plugins, ban them, and reconfigure every hypervisor parameter through the Chronolock.

Supplyfixed, minted once
Tx cap
Wallet cap
EVHHYPERVISORCATALOGSTAKE
06 / DEPLOY

Ship code into a live pool.

The trace you read in the lab is the trace you get on mainnet.