Lean EVM (@leanevm) header
Lean EVM (@leanevm) profile picture

Independent verification client for Elysium | built by @ellisvosser eco token: 0xc919d0a934bab68687bd7d0d158ec8e5403c4ab8

Joined December 2026
Soon, users will be able to launch and trade using Lean EVM. Lots of updates coming today.
Full AMM integration for users will be published within 24 hours!
1
64
Full AMM integration for users will be published within 24 hours!
- ZeroFeePool.sol: constant-product AMM with zero fees - Every arithmetic operation matches Pool.lean 1:1 - swapAForB, swapBForA, addLiquidity, removeLiquidity, quote, k - MockERC20 for testing - 16 Forge tests including exact Lean spec value verification: shares=1000000, swap 1000->999, k before/after match - k non-decreasing verified across 10 consecutive swaps - Foundry project in contracts/ with forge-std github.com/ellisvoss/lean-ev…
1
1
1
4
438
- ZeroFeePool.sol: constant-product AMM with zero fees - Every arithmetic operation matches Pool.lean 1:1 - swapAForB, swapBForA, addLiquidity, removeLiquidity, quote, k - MockERC20 for testing - 16 Forge tests including exact Lean spec value verification: shares=1000000, swap 1000->999, k before/after match - k non-decreasing verified across 10 consecutive swaps - Foundry project in contracts/ with forge-std github.com/ellisvoss/lean-ev…
3
1
2
641
I want to highlight "any solidity deployment of it can then be checked against the spec with lean-evm block replay." Our preliminary @leanevm tech will be leveraged in any and all future lean projects we make under this umbrella, that is why we launched our ecosystem token. Much more to come.
started production on our zero fee AMM. constant product pool, x*y=k, written in lean 4 as the reference spec. with no fee, nothing pads the pool against rounding errors. the swap math rounds every output down, so any leftover dust stays in the pool, and the invariant has to hold with exactly that. what must always be true, written as theorems the compiler holds us to: a swap can never output more than the pool holds reserves stay positive after every swap k never decreases nobody can remove more shares than exist statements are in, proofs are next. 11 tests already cover swap math, drain attempts, full withdrawals and repeated swaps. any solidity deployment of it can then be checked against the spec with lean-evm block replay. github.com/ellisvoss/lean-ev…
1
171
started production on our zero fee AMM. constant product pool, x*y=k, written in lean 4 as the reference spec. with no fee, nothing pads the pool against rounding errors. the swap math rounds every output down, so any leftover dust stays in the pool, and the invariant has to hold with exactly that. what must always be true, written as theorems the compiler holds us to: a swap can never output more than the pool holds reserves stay positive after every swap k never decreases nobody can remove more shares than exist statements are in, proofs are next. 11 tests already cover swap math, drain attempts, full withdrawals and repeated swaps. any solidity deployment of it can then be checked against the spec with lean-evm block replay. github.com/ellisvoss/lean-ev…
1
3
428
building a zero fee AMM, written in lean 4. same approach as lean-evm: the compiler checks a proof for the core math, and the code doesn't build until the proof goes through. most AMM exploits come down to an invariant breaking under an edge case, or rounding that leaks value one wei at a time until the pool is drained. with zero fees there's no buffer. rounding is the only thing protecting the pool, so lean has to prove: the pool invariant never decreases across any swap, add or remove every rounding step goes in the pool's favour no sequence of trades extracts more than it puts in
1
1
2
459
every montra launch, swap and buyback runs on a single sequencer. nothing independently checks it. lean-evm does. it's a second client written in lean 4 that replays elysium blocks through a proven interpreter. how this benefits montra: creators can verify their launches traders get swap execution checked $MONTRA holders can confirm buybacks and burns github.com/ellisvoss/lean-ev…
1
1
333
🧬Documentation🧬
building the first independent verification client for @Enter_Elysium Elysium is @HyperliquidX's new L2. one problem: single sequencer, zero client diversity. no way to independently verify what it's doing. so i'm writing one in lean 4. lean is a programming language where the compiler refuses to build your code unless you prove it can't crash. every array access, every arithmetic op, every pattern match has to carry a mathematical proof checked by lean's kernel at compile time. if the proof is missing, the build fails. the proofs get erased at runtime. zero overhead. you get a binary that is both provably safe and faster than the bounds-checked version. for context, @MidTermDev did this for solana and built a full validator client in 26k lines of lean. we're doing the same thing for Elysium. if the sequencer lies about a state transition, this client will know. watch this come to life: github.com/ellisvoss/lean-ev…
170
Every token launched on Montra is a contract deployment, a uniswap v4 pool, and a hook that runs on every single swap. that's a lot of execution to take on trust. v4 settles swaps with transient storage. TSTORE/TLOAD tracks deltas mid-transaction, then clears before the tx ends. if that accounting goes wrong, nothing shows up in storage afterward. you only catch it by re-running the transaction. lean-evm does that. TLOAD/TSTORE, CREATE/CREATE2, and nested calls all replay through a proven interpreter, independently of the @Enter_Elysium sequencer. for montra this means: launches can be checked by replaying the transaction, not by trusting an explorer hook execution on swaps gets a second implementation checking it fee flow into buyback and burn becomes a state transition anyone can re-run to be honest about where it stands: factory-style deployments are where the last 1-3% of gas drift lives. launchpads are factory patterns, so montra traffic is now my main test case. a launchpad is only as credible as the chain it executes on. this is the layer underneath. 0xc919d0a934bab68687bd7d0d158ec8e5403c4ab8
1
346