# Flex Virtual Machine (FVM)

At the heart of the Flex platform lies the Flex Virtual Machine (FVM), a high-performance, Javascript-based execution environment that supports a wide range of smart contract languages and runtimes. The FVM is designed to be blockchain-agnostic, allowing it to be seamlessly deployed on top of any compatible blockchain or layer 2 scaling solution, such as Ethereum, Polkadot, or Cosmos.

Attributes of the FVM include:

1. Multi-language support: The FVM offers support for multiple smart contract languages, including re:Flex, Solidity, Rust, and Javascript, giving developers the flexibility to use their preferred language and toolchain.
2. Gas-efficient execution: The FVM incorporates a variety of optimizations to minimize the gas costs associated with contract execution.
3. Deterministic execution: Ensuring deterministic execution of smart contracts across all nodes in the network is crucial for maintaining consistency and enabling reproducible results. The FVM achieves this through several measures.
4. Upgradability: The FVM supports upgradable contracts, enabling developers to fix bugs, add new features, and improve performance without requiring a hard fork of the underlying blockchain. The upgradability mechanism is based on a proxy pattern, where a master contract delegates call to an implementation contract that can be updated as needed.


---

# Agent Instructions: 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:

```
GET https://flexecosystem.gitbook.io/flex-docs/protocol/technical-roadmap-for-the-flex-ecosystem/flex-virtual-machine-fvm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
