> For the complete documentation index, see [llms.txt](https://docs.fluentlabs.xyz/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluentlabs.xyz/learn/knowledge-base/the-fluent-vm.md).

# The Fluent VM

The Fluent VM is a minimally modified version of the WebAssembly (Wasm) binary instruction format designed for verifiable applications. It is a reduced version of Wasm, called rWasm, which maintains compatibility with the original Wasm instruction set yet is optimized for zero-knowledge (zk) operations. Sections of the instruction set are embedded inside the binary, enhancing the efficiency and ease of verification of Wasm programs in a zk-rollup.

rWasm features support for multiple VM targets at the execution layer. Its account and state structure are managed by specialized system contracts that represent each supported VM. Ultimately, these VMs are simulated and compile down to rWasm for execution. The design is extensible in that support for additional VMs can be added over time. It also ensures atomic and synchronous composability between smart contracts pertaining to the different VMs it supports.&#x20;

### The Compatibility Contracts

The Fluent VM houses verified libraries, or system contracts, known as the compatibility contracts. These Wasm-based contracts define each supported VM’s EE standards and provides an API to access these functions. They effectively act as middleware allowing contracts from each supported VM to make calls and retrieve information from one another.

The compatibility contracts are similar to Near’s Aurora implementation (but optimized for zk-operations), which simulates EVM transactions and blocks. For zk proving, the compatibility contracts are supported by an additional library, the Journaled ZK Trie (JZKT) which, found in memory/storage, makes proving the Fluent STF across standards more efficient.&#x20;

The JZKT is the same as a standard zk trie with one major difference, that it is reversible. This ensures atomicity of transactions across different standards. If an operation fails as part of a multi operation transaction, all previous transactions will revert as well. Additionally, by housing this process in a unified library, the surface area of each standard is wrapped into one larger circuit, making it easier to prove.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fluentlabs.xyz/learn/knowledge-base/the-fluent-vm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
