Monad Brings JIT Compilation to EVM

29 AUG 2025
4 min read
monad
monad
4 min read
Article content
Challenges of Compilers
How JIT Compilation Works in Monad
Conclusion

Monad is a high-performance Layer-1 blockchain that focuses on scaling dApps without compromising decentralization or security. You can learn more about its unique architecture from an overview in our blog.

This article focuses on the recent addition of JIT compilation to Monad, which dramatically accelerates the execution of smart contracts and represents an important stepping stone toward the upcoming mainnet launch.

Challenges of Compilers

Just‑in‑Time (JIT) compilation holds pronounced promise as a method to enhance the Ethereum Virtual Machine (EVM)’s performance. That said, deploying it effectively brings about several noticeable technical challenges.

  • Replicating the EVM’s exact behavior in compiled form is non‑trivial. The system must precisely preserve gas accounting and error semantics. Even if the JIT compiler simplifies sequences of operations, it must still charge gas exactly as the original bytecode would and deliver identical error behavior.
  • Compilation introduces overhead, meaning compiling every contract is costly and could dramatically increase latency. As such, only selected contracts, typically those executed most often, should be compiled, while others remain interpreted.
  • Compiled native code artifacts tend to be much larger than the original EVM bytecode, which raises storage and caching considerations.

Finally, achieving high performance through compilation requires deep, creative compiler engineering. This involves extensive research, benchmarking, and repeated optimization of machine‑code generation to handle EVM’s stack‑based design and 256‑bit arithmetic natively.

How JIT Compilation Works in Monad

Despite these complications, the Category Labs team successfully built a compiler that overcomes these problems. Their system enables contract code to be executed faster and more efficiently than traditional EVM implementations.

In a nutshell, the Monad client monitors contracts by cumulative gas consumption. For contracts that become “hot” (i.e., frequently executed), native code is compiled and cached. The system executes asynchronously: when a contract isn’t yet compiled, it runs on a low‑latency, highly optimized interpreter. Once compilation completes, subsequent calls leverage the cached native code for faster execution.

More specifically, Monad uses a hybrid execution model that combines an optimized interpreter and a custom native‑code compiler to accelerate EVM contract execution while preserving exact behavior.

Interpreting vs. Compiling

Standard EVM clients interpret contracts one instruction at a time: performing stack‑bounds checks, charging gas, and applying semantics at each step. Interpreters are simple, responsive, and performant when well‑designed.

On the other hand, JIT compilation analyzes contract code once, transforms it into a more performant form, and emits optimized native x86‑64 machine code. This adds upfront latency but gets faster repeated execution in return while maintaining EVM correctness.

Eliminating Redundant Work

A JIT compiler can analyze straight‑line instruction sequences and combine them. For example, rather than checking gas and executing each command separately, the compiler can pre‑compute the total gas cost for the block, check it once, and then emit native code that runs the block without per‑instruction overhead.

Similarly, constant folding simplifies instruction sequences, while preserving 256‑bit modular arithmetic and equivalent gas charging.

Optimizing Code Through Operand Mapping

The compiler maintains a simulated EVM stack that maps each 256‑bit word to either main memory, general‑purpose registers, or an AVX vector register. This hybrid register allocation, combined with the stack‑caching approach, allows the compiler to generate highly optimized instruction sequences..

Conclusion

Introducing JIT compilation into Monad marks a significant advancement in EVM execution performance. Blending efficient interpretation with selective, asynchronous native-code compilation helps Monad achieve faster and more resource-efficient contract execution while preserving exact EVM semantics. 

As a result, JIT compilation improves throughput and lowers latency for frequently used contracts. As more smart contracts benefit from compiled execution, Monad may set a new standard for performant EVM-compatible blockchains.

Stake with Everstake | Follow us on X | Connect with us on Discord

***

Everstake is a software platform that provides infrastructure tools and resources for users but does not offer investment advice or investment opportunities, manage funds, facilitate collective investment schemes, provide financial services, or take custody of, or otherwise hold or manage, customer assets. Everstake does not conduct any independent diligence on or substantive review of any blockchain asset, digital currency, cryptocurrency, or associated funds. Everstake’s provision of technology services allowing a user to stake digital assets is not an endorsement or a recommendation of any digital assets by it. Users are fully and solely responsible for evaluating whether to stake digital assets.

Dark - Light
Everstake Logo
Everstake
Content Manager
Everstake is the world's leading validator, with 735,000+ delegators across 77 blockchain networks. We stake $4.8 billion in assets and provide best-in-class staking services to institutional and retail clients.

Contact us

Have questions?
We’re always there to answer!

contact us
Our distributed team of 20+ community managers is online 24/7 and is ready to assist you.
quote avatar

We’d love to hear your thoughts.

Your opinion matters. Share any concerns, issues, or suggestions you may have with us so that Everstake could work on them, and your experience could improve.
Give FEEDBACK