Module EVL
1
—
Simulate the same machine as the chain
—
Vote—
Pot share—
Awards—
Steps—
The vote across trade sizes before the swap, this direction
A session 120 swaps on a random walk, storage kept between them
Bytecode —
Publish burns 1,000,000 EVH
The pool connect a wallet on Ethereum to read it
Kernelset below
Modules ranked by EVH behind them
EVH
| # | Name | State | EVH behind | Your backing | Runs / faults | Pot | Gas | |
|---|---|---|---|---|---|---|---|---|
| No modules read yet. | ||||||||
Yours
Claimable—Unbacking—
Settings
Agent console write into a module's mailbox
Only the module's agent can write, and only into its mailbox (the keys with the top bit set); the program reads it with mailbox(k) and decides what it means. The agent can suggest; only the program, the median and the 0.1%–3% walls decide.
EVL, the module language
A module is a small program run by the Machine inside the Ethereum Virtual Hook, before and/or after every swap of the EVH pool. It has its own storage, its own gas cap and its own failure. It cannot touch a wei: the language has no word for it.
Shape
module "name" phases(before, after) gas(80000) steps(400) { … }. phases picks when it runs; gas is its cap (20,000–150,000); steps its instruction budget (≤ 2,000).
Statements
| let x = e | a variable (32 at most in scope) |
| x = e | assign |
| if e { } else { } | branch (else if works) |
| while e { } | loop (the step budget ends a runaway) |
| fn f(a, b) = e | an inline function |
| vote(e) | vote a fee in pips (10,000 = 1%); the pool charges the median of all votes, 0.1%–3% |
| share(bps) | ask for part of this swap's fee for the module's prize pot (≤ 20% each, 30% together) |
| award(to, amount) | pay ETH from the module's own pot (≤ 4 per run, capped by the pot) |
| store(k, v) | write the module's own storage |
| log(a, b) | emit an event |
| halt / fail() | stop / fault on purpose (rolls the run back) |
Values
| amount | the trade's fixed amount |
| zeroForOne, exactIn | 1 when buying EVH with ETH; 1 when the amount in is fixed |
| tick, openTick, twap | the price now, at this block's open, and its 30-minute average (ticks + 2²³) |
| swaps, lastSwap, volume | swaps ever, when the last was, ETH ever traded |
| origin, sender | the trader and the router |
| out0, out1, fee | after the swap: what moved, and the fee charged |
| pot, phase, self | this module's pot, 0 before / 1 after, its id |
| block, time, randao | the block's number, time and randomness |
Functions
| load(k), read(m, k), mailbox(k) | own storage, another module's (read-only), the agent's mailbox |
| min max absdiff log2 sqrt exp muldiv hash | saturating arithmetic: nothing overflows, nothing divides by zero |
Units
0.3pct = 3,000 pips · 20bps = 20 · 1 ether · 5 gwei · 10 minutes · 2 hours · 1 days.