AI agents built Lithe, an experimental smart contract language for the Ethereum Virtual Machine, in 12 days. By November 26, 2026, Modularium’s NFT contracts had been migrated to Lithe on Ethereum mainnet. The contracts produced byte-for-byte identical rendering output to their Solidity counterparts while using 65–79% less gas for rendering. That saving was specific to rendering, not to transactions generally.
The agents used the Recur workflow tool to plan, write and review approximately 140,000 lines of Rust and 20,000 lines of Lithe, a language they had not used before. The compiler is also designed for agents: it suggests how to correct errors and provides machine-readable JSON analysis of contract behavior.
What the compiler checks
Celestia Labs says Lithe aims to catch security mistakes that Solidity leaves to developer convention. A 2024 OWASP review attributed two-thirds of the $1.42 billion in losses it examined to access-control flaws. Lithe builds rules into the compiler to help flag missing checks on who may call a function. It also requires externally callable functions to declare every possible error with raises; an omission stops compilation.
Lithe treats each entry point as a single state transition. The defer keyword postpones an external call until the contract has finished updating its state. The ordering is designed to prevent the kind of reentrancy flaw behind the 2016 Ethereum DAO hack, in which control could return to a contract before its update was complete.
A separate tool, lithe prove, checks deployed bytecode against developer-written specifications across inputs and call orders. The proof establishes whether the bytecode meets those specifications, not whether the developer specified every intended behavior. For the Modularium contracts, 40 specification files were formally verified. Two audit tools, lithe abi-tree and lithe footprint, describe function paths, state changes and declared errors.
Deployment and transaction costs differed in testing
In the reported benchmarks, Lithe produced bytecode 40% smaller than optimized builds from Solidity’s solc compiler and 7% smaller than size-focused builds from Paradigm’s Solar compiler. For OpenZeppelin contracts, deployment used 34% less gas for ERC-20 and 41% less for ERC-721 than with solc.
The transaction-gas difference was narrower: Lithe used approximately 2.5% less than solc, on par with Solar. Compiling the 51 benchmark contracts took 0.6 seconds with Lithe, compared with 0.7 seconds for Solar and 3.2 seconds for solc.
Despite its mainnet use, Lithe remains experimental. Developers can examine the language through its playground, documentation and GitHub repository.