Smart contracts + provable storage = FVM

The Filecoin Virtual Machine (FVM) is a runtime environment for smart contracts (also called actors) on the Filecoin network. FVM brings user programmability to Filecoin, unleashing the enormous potential of an open data economy.

Get Started

Developer Resources
Deploy Contract
Explore Testnets

Why FVM

The FVM unlocks boundless possibilities, ranging from dataDAOs, to perpetual storage, to financial services for miners (e.g. collateral lending, liquid staking, insurance protocols), to decentralized compute and Layer 2 networks (such as reputation systems, and incentive-aligned content delivery networks, and more. Here are some of the things we're excited to see deployed on the Filecoin network. It's up to you to make them happen!

Apply to join Space Warp ➝
/// A Filecoin actor brokering decentralized compute jobs.
/// For illustration purposes only.
#[fvm_actor(state=ComputeState, dispatch="method_num")]
impl ComputeActor {
/// Creates a job with an input DAG, WASM compute logic,
/// data affinity, geographical bounds, and timeout.
pub fn create_job(req: CreateJobReq, st: ComputeState)
-> CreateJobRes { ... }
/// Allows a compute node to claim a job by proving it
/// satisfies the requirements and staking collateral.
pub fn claim_job(req: ClaimJobReq, st: ComputeState)
-> ClaimJobRes { ... }
/// Proves that a compute node finished running a job,
/// posts the result, and claims the reward.
pub fn prove_done(req: ProveDoneReq, st: ComputeState)
-> ProveDoneRes { ... }
}

What Does FVM Unlock

Data DAOs
Perpetual storage
Staking Protocols
New storage market primitives
Replication workers
Repair workers
Insurance protocols
Storage derivatives
Decentralized Compute
Enabling L2 networks
Cross-network interoperability bridges

How Does It Work

A robust WASM-based VM

The FVM is a WASM-based polyglot execution environment for IPLD data. It is designed to support native Filecoin actors written in languages that compile to WASM, as well as smart contracts written for foreign runtimes including the Ethereum Virtual Machine (EVM), Secure EcmaScript (SES), and eBPF.

The initial version of the FVM is relatively simple and deliberately conservative in features. This enables developers onboard quickly, and serves as a rock-solid foundation for many innovations to come.

Examples of future ideas include: async programming via continuations/futures, capability-orientation, time-locked transactions (using external beacons), parallel execution, native primitives for cross-chain interoperability, computation correctness proofs, and more.

The reference FVM and SDK are written in Rust. If you'd like to contribute, explore ideas, or build alternative implementations in other languages, please reach out.

View in GitHub ➝

FVM Roadmap

Feb 2022

Milestone 0: Lotus mainnet canaries with FVM support

The reference FVM implementation has been integrated into a fork of Lotus (the Filecoin reference client). A fleet of canary nodes have been launched on mainnet, running WASM-compiled built-in actors on the FVM. The canaries are monitored for consensus faults and to gather telemetry. This milestone is a testing milestone that's critical to collect raw execution data to feed into the overhaul of the gas model, in preparation for user-programmability. It implies no network upgrade.

Mar 2022

Milestone 0.5: Ability to run FVM node and sync mainnet

Any node operator can sync the Filecoin Mainnet using the FVM and Rust built-in actors, integrated in lotus, venus, forest, and fuhon implementations. It implies no network upgrade.

May 2022

Milestone 1: Introduction of non-programmable WASM-based FVM

Mainnet will atomically switch from the current legacy VMs to the WASM-based reference FVM. A new gas model will be activated that accounts for actual WASM execution costs. Only Rust built-in actors will be supported at this time. This milestone requires a network upgrade.

Nov 2022

Network Version 17 (nv17): Initial protocol refactors for programmability

An initial set of protocol refactors targeting built-in actors, including the ability to introduce new storage markets via user-defined smart contracts. Review the full planned scope of Filecoin Network Version 17.

Mar 2023

Milestone 2.1: Ability to deploy EVM contracts to mainnet (FEVM)

The Filecoin network will become user-programmable for the first time. Developers will be able to deploy smart contracts written in Solidity or Yul, and compiled to EVM. Smart contracts will be able to access Filecoin functionality by invoking built-in actors. Existing Ethereum tooling will be compatible with Filecoin. This milestone requires a network upgrade.

Sep 2022
->
Dec 2022

Incremental delivery on the Wallaby testnet

Bleeding edge releases of the Filecoin EVM runtime are deployed every 1-2 weeks to the Wallaby developer testnet. The community is invited to participate in alpha testing to provide early feedback.

Jan 16th
2023

Hyperspace testnet goes live

A new stable developer testnet called Hyperspace will be launched as the pre-production testnet. The community is invited to participate in heavy functional, technical, and security testing. Incentives and bounties will be available for developers and security researchers.

Mar 2023
(Est.)

FEVM goes live on mainnet

The Filecoin EVM runtime is deployed on Filecoin mainnet via the Filecoin nv18 Hygge upgrade.

midyear
2023
(Est.)

Milestone 2.2: Ability to deploy Wasm actors to mainnet

Developers will be able to deploy custom smart contracts written in Rust, AssemblyScript, or Go, and compiled to WASM bytecode. SDKs, tutorials, and other developer materials will be generally available. This milestone requires a network upgrade.

2023

Milestone 3+: Further incremental protocol refactors to enhance programmability

A series of additional incremental protocol upgrades (besides nv17) to move system functionality from privileged space to user space. The result will be a lighter and less opinionated base Filecoin protocol, where storage markets, deal-making, incentives, etc. are extensible, modular, and highly customizable through user-deployed actors. Enhanced programming features such as user-provided cron, async call patterns, and more will start to be developed at this stage.

Request for Startups

If you are looking for ideas on what to build, we have worked with both internal and external teams to learn what they are excited to see on FVM.

Read More ➝

News