The Filecoin EVM (FEVM) is the Ethereum Virtual Machine (EVM) virtualized as a runtime on top of the Filecoin Virtual Machine (FVM). Before understanding the FEVM you must be familiar with the regular EVM.
What’s it for
The FVM enables developers to build many new use cases on top of and with the Filecoin network.
Data access control
One advantage centralized storage solutions have over web3 services is that they can limit individual data access.
The FVM enables Filecoin network participants to do the same. Threshold encryption networks, like Medusa, can individually or programmatically govern who can access a data collection without any contracts or validators having access to the data themselves.
In combination with data access controls, the FVM enables the creation and management of data-decentralized-autonomous-organizations (data DAOs). The FVM allows a group of individuals, or organizations, to curate and preserve data collection. Data DAOs can govern and monetize data access and pool the returns into a shared treasury to fund the collections preservation and long-term growth.
Before the FVM, storage deals only lasted a year or two. If users wanted to continue storing their data, they had to create new deals before the end of the current deal. This process was manual.
Now, the FVM allows users to store once and have repair and replication bots manage the repetitive storage deal creation tasks. Using a smart contract, users can provision a wallet with FIL, and storage providers can use that FIL to fund data storage permanently. Repair bots can monitor the storage deals and replicate the data with other storage providers when necessary.
This process gives users the long-term storage permanence that other blockchains claim while also benefiting from Filecoin’s verifiable storage proofs, ensuring that the network stores and replicates the data correctly.
Put your FIL to work. FIL token holds can help Filecoin storage providers gain access to FIL for storage collateral and receive interest in exchange. These loans can be under-collateralized thanks to the on-chain storage history of past storage provider performance. Community members can use this history to generate reputation scores, enabling everyone to identify good borrowers. On top of that, loans can be automatically paid back to investors by using a multisig as the storage provider’s owner address that includes lenders and a third party to help negotiate payback.
New FVM-enabled smart contracts give every FIL token holder access to new yield opportunities on their holdings while also benefiting the whole Filecoin economy.
Since the FVM is fully EVM-compatible, new ERC-20 tokens can be launched on the Filecoin network or bridged directly to token pools on other chains. As well as that, layer two networks can plug into Filecoin and leverage its storage power and security.
There are three stages to the development of Filecoin:
- Build a robust decentralized storage network.
- Onboard and safeguard humanity’s most important data.
- Allow computation over that data to enable web-scale applications.
The FVM covers stage 3. We had to ensure that the Filecoin network was stable, robust, and secure before we allowed any development on top of the network.
Molly and Raul from Protocol Labs hosted a great introduction to the FVM project. A recording of the presentation is available on YouTube.
The Ethereum Virtual Machine is an execution environment initially designed, built for, and run on the Ethereum blockchain. The EVM was revolutionary because, for the first time, any arbitrary code could be deployed to and run on a blockchain. This code inherited all the decentralized properties of the Ethereum blockchain. Before the EVM, a new blockchain had to be created with custom logic and then bootstrapped with validators every time a new type of decentralized application needed to be built.
Code deployed to EVM is typically written in the high-level language Solidity, although other languages, such as Vyper, exist. The high-level Solidity code is compiled to EVM bytecode which is what is actually deployed to and run on the EVM. Due to it being the first virtual machine to run on top of a blockchain, the EVM has developed one of the strongest developer ecosystems in Web3 to date. Today, many different blockchains run their own instance of the EVM to allow developers to easily port their existing applications into the new blockchain’s ecosystem.
Ethereum Virtual Machine
The Filecoin EVM (FEVM) is the Ethereum Virtual Machine virtualized as a runtime on top of the Filecoin Virtual Machine. It will allow developers to port any existing EVM-based smart contracts straight onto the FVM (where we call them actors). FEVM is also completely compatible with any EVM development tools, such as Hardhat, Brownie, and Metamask, making deploying and interacting with EVM-based actors easy! This is because Filecoin nodes offer the Ethereum JSON-RPC API.
FEVM is Milestone 2.1 on the FVM roadmap and will actually be ready before native WASM actors are able to be deployed to the FVM. This is to allow existing smart contract developers, which are largely used to the EVM ecosystem and writing code in Solidity, to quickly begin porting their existing applications and writing new applications on top of the FVM.
FEVM and native FVM
Once Milestone 2.2 of the FVM roadmap is complete, developers will have the option to deploy actors on either the FEVM or native FVM (or both if they really want to). But which should you choose? The decision can be summed up as such: if you want better performance, write actors that are compiled to WASM and deployed to native FVM. If you are familiar with Solidity and want access to the EVM ecosystem of tools, but don’t mind less performance, deploy to the FEVM. See the pros and cons of each below:
|Pros||Native execution speed and performance on Filecoin (i.e., less gas cost per unit of actor code executed).
Write actors in any language that compiles to WASM 1.
|Take advantage of current Solidity and EVM tooling to quickly port or write actors.|
|Cons||Tooling is not yet as mature as EVM tooling.||Higher gas fees and lower performance due to the virtualization overhead of the FEVM.|
In both cases, you have access to all the awesome power of the Filecoin blockchain, including storage contracts as a native primitive!
The FEVM allows current Web3 developers to quickly start writing actors on the Filecoin blockchain while also using all of the tools, software packages, and languages they are used to while also having access to Filecoin storage deals as a native. It will be complete with Milestone 2.1 in the FVM roadmap. Due to the virtualization overhead of the EVM, it will not have the same performance as native actors, which will arrive with Milestone 2.2.
Thanks to FVM & Filecoin Network