Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow EVM Gateway #688

Open
Tracked by #654
gregsantos opened this issue Mar 25, 2024 · 0 comments
Open
Tracked by #654

Flow EVM Gateway #688

gregsantos opened this issue Mar 25, 2024 · 0 comments

Comments

@gregsantos
Copy link
Contributor

gregsantos commented Mar 25, 2024

Flow EVM Gateway

See EVM FLIPs

A separate software package is provided by the Flow Foundation that can be run by anyone (including the Flow Foundation), that follows the Flow EVM chain, sends queries to the Flow access nodes, and provides the JSON-RPC endpoints to any 3rd party applications that want to interact directly with the Flow EVM. With the exception of account state proof endpoints, all other endpoints of the JSON-RPC will be provided at the release.

Any 3rd party running this software can accept EVM RLP encoded transactions from users and wrap them in a Cadence transaction. While they will pay for the fees, EVM.run provides a utility parameter (coinbase) to collect the gas fee from the user on the Flow EVM side while running the EVM transaction. The use of the coinbase address in this context indicates the EVM address which will receive the gas usage * gas price (set in transaction). Essentially, the transaction wrapper behaves similarly to a miner, receives the gas usage fees on an EVM address and pays for the transaction fees. The gas price per unit of gas creates a marketplace for these 3rd parties to compete over transactions.

For example, a user might use MetaMask to sign a transaction for Flow EVM and broadcast it to services that check the gas fee on the transaction and wrap the transaction to be executed. Note that account nonce would protect against double execution of a transaction, similar to how other non-virtual blockchains prevent the miner from including a transaction multiple times.

As EVM interactions are encapsulated within Flow transactions, they leverage the security measures provided by Flow. These transactions undergo the same process of collection, execution, and verification as other Flow transactions, without any EVM intervention. Consequently, there is no requirement for intricate block formation logic (such as handling forks and reorganizations), mempools, or additional safeguards against malicious MEV (Miner Extractable Value) behaviours. More information about Flow's consensus model is available here.

You can read more about this work in the onflow/flips#235 improvement proposal.

Should Link to or include Instructions for running Gateway locally vi CLI

@gregsantos gregsantos moved this to 🔖 Ready for Pickup in 🌊 Flow 4D Apr 22, 2024
@gregsantos gregsantos moved this from 🔖 Ready for Pickup to 🧊 Backlog in 🌊 Flow 4D Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🧊 Backlog
Development

No branches or pull requests

1 participant