DTVM: Revolutionizing Smart Contract Execution with Determinism and Compatibility

Wei Zhou, Changzheng Wei, Ying Yan, Wei Tang, Zhihao Chen, Xiong Xu, Xuebing Huang, Wengang Chen, Jie Zhang, Yang Chen, Xiaofu Zheng, Hanghang Wu, Shenglong Chen, Ermei Wang, Xiangfei Chen, Yang Yu, Meng Wu, Tao Zhu, Liwei Yuan, Feng Yu, Alex Zhang, Wei Wang, Ji Luo, Zhengyu He, Wenbiao ZhaoarXiv 2025 · DOI · arXiv

Abstract

The DeTerministic Virtual Machine (DTVM) Stack represents a paradigm shift in smart contract execution, effectively resolving the long-standing trade-off between high performance and strict determinism in blockchain environments. By integrating a WebAssembly (Wasm)-based core with a novel hybrid lazy-JIT compilation engine (Zeta) and full EVM compatibility, DTVM achieves execution speeds up to 2× faster than evmone and invocation latencies 23× lower than state-of-the-art Wasm runtimes. This paper explores the architectural innovations of DTVM, including its deterministic intermediate representation (dMIR), hardware-assisted memory protection, and AI-augmented development lifecycle.

Introduction

Blockchain virtual machines (VMs) are constrained by a technical "trilemma": they must simultaneously provide high performance, guarantee deterministic execution across diverse network nodes, and maintain compatibility with established ecosystems like Ethereum. Traditional interpreted VMs, such as the standard EVM, ensure determinism but suffer from significant performance bottlenecks. Conversely, modern Just-In-Time (JIT) compilers offer speed but often introduce non-deterministic behaviors and "cold start" latencies that are unsuitable for real-time blockchain consensus.

DTVM addresses these challenges through a multi-layered architecture designed for the next generation of distributed digital applications. It provides a polyglot environment supporting Solidity, C++, Rust, and more, while enforcing strict execution guarantees at the hardware and IR levels.

System Architecture and the DTVM Stack

The DTVM framework is structured into four distinct layers, each optimized for a specific stage of the smart contract lifecycle. This modular approach ensures that the system remains flexible while providing a hardened core for execution.

Figure 1: DTVM Stack Overview illustrating the multi-layered architecture from AI-augmented development (SmartCogent) to the core execution engine.

At the base of the stack is the Kernel Layer, powered by the Zeta JIT Core Engine. Above it, the Execution Layer utilizes the dMIR (Deterministic Middle IR). dMIR is a blockchain-specific intermediate representation that pre-processes Wasm code to strip away non-deterministic features (such as certain floating-point operations) and enforce standardized trap handling. This ensures that the subsequent JIT compilation produces identical results across different CPU architectures, such as x86 and ARM.

The Zeta Engine: Hybrid Lazy-JIT Compilation

A core innovation of DTVM is its Zeta Engine, which implements a "Tiered Lazy JIT" framework. Unlike traditional JIT engines that compile entire contracts upon deployment, Zeta operates at the function level to minimize latency.

Figure 3: The Lazy-JIT Framework for Variants of VMs, detailing the dMIR optimization passes and the FLAT/FLAS hot-switching mechanism.

As detailed in Figure 3, the engine employs a Function Level Adaptive hot-Switching (FLAS) mechanism. When a contract is first invoked, it uses a fast transpile (FLAT mode) for immediate execution. As specific functions are identified as "hot" through runtime profiling, the engine asynchronously compiles them into highly optimized machine code (FLAS mode) and hot-switches the execution path. This approach eliminates the "compilation tax" for rarely used code while maximizing performance for compute-intensive logic.

Performance Optimization and Security

DTVM introduces several low-level optimizations to further enhance throughput:

  • Zero-Overhead Boundary Checking: Instead of relying on software-based bounds checks, which can consume up to 30% of execution time, DTVM leverages hardware-level memory protection. It reserves a massive 8GB virtual address space with "guard pages," allowing the CPU hardware to automatically catch out-of-bounds accesses with zero software overhead.
  • Reduced Trusted Computing Base (TCB): The core codebase of DTVM is only 48% the size of Wasmtime, significantly reducing the attack surface and making the system easier to audit and verify.

Evaluation and Results

The DTVM framework was rigorously tested against industry benchmarks including PolyBench, WAPM, and real-world Ethereum workloads (ERC20, ERC721, etc.). Key results include:

  • Execution Speed: DTVM demonstrated a 2× acceleration over evmone for standard contracts and a 3.61× speedup for compute-intensive tasks like Fibonacci sequences.
  • Invocation Latency: Post-deployment invocation time was reduced to 0.95ms, outperforming Wasmtime by approximately 23×.
  • AI-Augmented Auditing: The integrated SmartCogent suite achieved an 81% vulnerability detection accuracy and an 86% automated repair success rate, significantly improving the security of the development pipeline.

Conclusion and Future Work

DTVM successfully bridges the gap between the performance of modern JIT engines and the deterministic requirements of blockchain technology. By offloading safety checks to hardware and utilizing a tiered, function-level compilation strategy, it provides a robust foundation for high-performance decentralized applications. Future research will focus on integrating hardware-accelerated cryptographic primitives directly into the dMIR layer and expanding compatibility to Zero-Knowledge Virtual Machine (ZK-VM) architectures.

Summary updated

BibTeX
@misc{zhou2025dtvm,
  author = {Wei Zhou and Changzheng Wei and Ying Yan and Wei Tang and Zhihao Chen and Xiong Xu and Xuebing Huang and Wengang Chen and Jie Zhang and Yang Chen and Xiaofu Zheng and Hanghang Wu and Shenglong Chen and Ermei Wang and Xiangfei Chen and Yang Yu and Meng Wu and Tao Zhu and Liwei Yuan and Feng Yu and Alex Zhang and Wei Wang and Ji Luo and Zhengyu He and Wenbiao Zhao},
  title = {{DTVM: Revolutionizing Smart Contract Execution with Determinism and Compatibility}},
  year = {2025},
  eprint = {2504.16552},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.16552},
}
Figure