EVM Equivalence on Flow: Proposal and Path Forward

As we continue the effort to bring EVM Equivalence to Flow, we must discuss why this is important to the Flow network. Flow has a novel approach to many core aspects of a blockchain, the multi-node architecture, state storage, execution environment, and smart contract programming language. We have seen many of these patterns attempted across many networks due to their tremendous value to web3 as a whole. We see a world with a single un-sharded state with a diverse set of execution environments, with EVM on Flow taking a major first step towards that goal. To learn more about the technical aspects of EVM on Flow please refer to Dete’s previous forum post. EVM on Flow isn’t purely an attempt to overcome the technical challenge of introducing different execution environments to the protocol, this is a major boost to the ecosystem that should aid in solving some of the network bootstrapping issues affecting Flow. Three of these challenges are lowering the barrier of entry and risk for developers to build on your network, having a diverse set of platforms and infrastructure for builders and creators, and significant liquidity available to support your project.

Significant Liquidity

For a liquid ecosystem, there needs to be a robust set of on and off-ramps available to users. Many centralized and decentralized ramps have consolidated on the EVM standard. It is critical to have a user’s ramp of choice available for them to use.

With EVM on Flow, the cost of integration of new ramps to add Flow support is lowered significantly and this will cause many providers to support Flow enabling funds to move fluidly across-chains and fiat. Mainstream branded NFT projects on Flow can be available in EVM which is great news for marketplace users and unlocks new liquidity opportunities. Additionally this allows for many of the established innovative DeFi protocols to be simply deployed and leveraged, attracting market makers and other investment to Flow.

Lowering the Barrier for Entry for Developers

Frequently developers building in web3 want to leverage existing code and tooling that can work across many networks. The ability to use existing Solidity code and tooling frees developers to focus only on the parts of the stack they want to innovate on. Additionally, they want to use the best-in-class tooling for their use case. Migrating these tools and codebases to a new set paradigm requires significant overhead and requires developers to build the entire stack even if there are equivalent solutions available on other networks.

With EVM on Flow, developers will be able to run Solidity in the ways they are used to across many networks. It also unveils an easier ramp to Cadence and Flow-specific paradigms and UX which augment EVM and enables all developers to leverage the tremendous work happening across web3 with the EVM.

A Diverse Set of Platforms and Infrastructure

Many platforms and infrastructures have standardized to the patterns and assumptions set forth by the EVM. Through our many discussions with platform and infrastructure teams they have shared the ease of onboarding EVM compatible chains vs non-EVM compatible chains.

With EVM on Flow, platform and infrastructure providers will be able to add Flow support to their ecosystem and developers will be able to use a common set of tools that they have grown accustomed to. For Flow to expand the platforms that support it, EVM on Flow is a tremendous answer. This will drive more developers to build on Flow leveraging the network effects of the EVM and compounding the network effects of Flow.

True differentiation with EVM on Flow

Teams face the tough challenge of determining which network to deploy to, with developers regularly choosing middleware platform solutions to get to market to reduce onboarding costs. For developers, EVM equivalence is both table stakes and also oddly not a significant differentiator for L1 and L2 networks. In this context how should one decide? One might consider TVL, network size and effects, gas cost, performance and other metrics, or perhaps integrations, bridges etc yet none of these address gaps common across all EVMs.

EVM on Flow has runtime equivalence to any other EVM and provides the JSON-RPC API through which clients such as Metamask, or existing developer tools such as Hardhat or Remix, can connect and work out of the box. EVM applications deployed to EVM on Flow get immediate benefits out of the box without additional platform onboarding costs.

Flow protocol absorbs complexity into the platform instead of outsourcing it to developers which allows them to leverage native protocol-level account abstraction, account linking and mobile native experiences.

Write powerful and safe smart contracts with Cadence

EVM projects that choose to augment their experience with Flow will be fully enabled and empowered to, they will be able to easily ramp into Flow tooling and use more of the full Flow protocol to achieve their desired functionality and user experience. Rather than requiring changes to your core application, Flow complements and expands the scope of what’s possible by using Cadence to implement use-cases not natively possible in Solidity.

EVM applications can integrate Flow UX with account linking to onboard mainstream users with a seamless web2 login experience. In-application UX is also improved when EVM transaction signing pop-ups are no longer necessary when interacting with EVM using Flow Reference Wallet. Even seemingly minor benefits such as removal of the 24kb Solidity contract size limit simplifies developers’ day-to-day development experience.

Scalability and low gas fees

Flow’s multi-role architecture achieves long-term scalability while maintaining composability and decentralization. Its modular architecture principles align with design proposals identified for future Ethereum scalability. For instance, certain major themes of Ethereum’s proposed evolution parallels Flow’s existing design: Flow’s Execution Nodes are akin to “Rollups,” Collection Nodes resemble “Data Availability Shards,” and Consensus Nodes correlate to the “Beacon Chain.” This is not merely a promise of what might be but has already been achieved at scale in production for the last three years - synthetic Flow benchmarks have achieved ~1k TPS leaving a significant amount of available throughput for applications today. Flow’s current ~700GB of state space is extensible to the petabyte scale and allows contracts to maintain large amounts of data alongside logic at low gas rates. This has added convenience to developers who can forego off-chain metadata integration.

EVM on Flow uses Flow’s underlying consensus and execution model. EVM transactions are executed inside a Flow transaction, on Flow’s consensus which solves proposer builder separation, separation of compute, consensus & settlement – all without sharding. Flow leverages horizontally scaled transaction linearization, offering exceptional scalability while maintaining decentralization and composability.

Horizontally-scaled data availability

Flow horizontally distributes the mempool across dedicated node roles increasing transaction ingress capacity of the network by orders of magnitude. Monolithic blockchains are typically capped by the number of transactions an individual validator can handle (the 33rd percentile of the slowest validators). Flow’s multi-role architecture provides decentralized and scalable transaction ingress with Access Nodes with no intermediaries. Availability of execution state across the network leverages libp2p for secure decentralized data distribution via data egress nodes.

Protocol-native rollups and settlement on the order of seconds

With designated validators for transaction execution, Flow horizontally scales natively within the layer-1 protocol. Other chains commonly work around the fundamental scaling limitations of their layer-1 protocol by outsourcing scalability to a fragmented ecosystem of L2s - rollups, side chains, state channels, etc. Flow’s scaling without sharding approach provides superior developer experience, improves composability and interoperability of the entire ecosystem.

Separation of consensus & compute

Standard blockchains bundle consensus and execution while Flow decouples them. Separation of concerns significantly reduces redundant effort which will allow Flow to scale to thousands of times higher throughput and petabytes of state data at lower cost while maintaining a shared execution environment for all operations on the network. This enables better composability and sovereignty for applications built on Flow.

MEV resilience via Proposer Builder Separation

Maximal Extractable Value (MEV) refers to the potential profit that can be extracted by miners or validators for modifying transactions during the block production process. It is a well established part of Ethereum’s architecture and arises from the monolithic node design which overly privileges operator control over block production. Flow natively provides censorship & MEV resistance which is achieved by designating specific validators for building transaction bundles that are separated from the validators proposing blocks (Consensus nodes).

Since EVM on Flow transactions are composed and executed within a Cadence transaction, block production is handled by Flow’s multi-role architecture. EVM equivalence on Flow is specifically integrated to ensure complete runtime and input/output (JSON-RPC) parity without also adopting the full stack and therefore the consensus model. EVM on Flow’s MEV resilience is a significant difference from past EVMs and will help to ensure gas fees are reasonably priced at all times. The impracticality of frontrunning or other attacks improves the user experience by eliminating failed transactions and invisible fees.

Benefits to Flow’s existing community

Flow builders already understand that building on Flow is a better experience from EVM and while this change introduces new possibilities, nothing about the Flow ecosystem changes as a result. Builders on Flow can optionally integrate with EVM on Flow because interactions with EVM can be composed using Cadence. The expected influx of new projects and teams to the EVM on Flow will stimulate increased distribution and discoverability of applications across the Flow ecosystem.

Onboarding new centralized and decentralized exchanges, oracles, and token bridges to EVM on Flow will restore Flow ecosystem liquidity. Access to those services from Flow can help power new applications and use-cases. EVM on Flow DeFi applications become able to access liquidity from major brand name NFT projects such as NBA TopShot, Disney Pinnacle, Doodles, etc. Solidity contract execution from Cadence provides a degree of control not natively available to EVM builders. The composing of EVM transactions in Cadence satisfies signature requirements using Flow’s security model to eliminate wallet signing popups, all of which occur within a single atomic transaction. It introduces powerful, native primitives for cross-VM interactions and application development which will drive time-to-finality exchange of tokens between environments.

EVM developers on EVM on Flow grow the entire Flow ecosystem. New builders and users drive volume and those who adopt mainstream features drive greater awareness of Flow’s power. Creative builders have a limitless runway to explore novel use cases, products and other ideas by leveraging Cadence with EVM in a truly composable environment. Flow builders’ ability to use EVM, whether to compose EVM transactions or for access to ecosystem services, multiplies possibilities for the whole Flow ecosystem.

Update on where we are today

  • An early access CLI version that integrates with an updated emulator containing EVM will soon be available. This includes new commands in the CLI, enabling you to communicate with the EVM emulator and execute EVM transactions.
    • Hold tight for an announcement later this week!
  • Working on JSON-RPC implementation and initial design for token exchange contracts
  • Building out a dedicated Flow network for preview testing EVM on Flow in Q1
  • We’re on Discord! Check out the #flow-evm channel and join the conversation. We’d love to chat!

FLIP proposal for community review

We have proposed the following Flow Improvement Proposal (FLIP) for community review and input: EVM support by ramtinms · Pull Request #225 · onflow/flips · GitHub

We’re excited to hear from users and builders across Flow and EVM ecosystems for their thoughts, feedback, concerns or questions about the proposal. The FLIP will be open for comment until the end of January unless discussion requires an extension.

10 Likes

This is a great path forward!

At equilibrium we’ve actually worked a bunch on implemeting Geth onto other frameworks, so if there is any need of advising or implementation help, would be glad to offer that. My telegram is @jommi in case.

I do wonder, how do you see allowing evm’s inefficient state growth possibly affecting Flow in the future?

3 Likes

We’ve recently also published the remaining two FLIPs needed for the proposed EVM on Flow changes.

FLIP #233 proposes the technical approach for the Cross-VM bridge that facilitates the flow of value between Flow ↔ Flow EVM

FLIP #235 proposes the implementation for the JSON-RPC API which is needed for EVM clients

We invite the community to share their thoughts and feedback on those proposals in the respective PRs. Look forward to hearing from you!

2 Likes

Thank you for the insightful discussions on the EVM FLIP. We feel there is an overwhelming support from the active developer community and the broader ecosystem.

On May 15th, 2024 10-11am PT (17-18:00 UTC) we’ll hold a joint meeting of the Core Protocol Working Group and the Cadence Language and Execution Working Group, where we would like to briefly go over it together and approve this FLIP unless there are any major concerns remaining.

You can add the meeting to your calendar via this link or find it on our :calendar: Flow Events & Working Groups calendar along with all the other working group meetings. Everyone is welcome :green_heart: