Neon EVM Documentation
website·Indexed 30 days ago
https://chainguys.github.io/neonwp/Developer guides and architectural documentation for the Neon EVM, focusing on deploying dApps to Solana. Includes instructions for using Remix, Hardhat, and Truffle, interacting with SPL and ERC-20 tokens, and details on EVM compatibility, JSON-RPC method implementation, and architectural limitations.
What's inside Neon EVM
- To set up a local Neon EVM development environment, developers have three primary paths depending on their needs: connecting to an existing Neon Proxy, connecting to a Solana cluster via a local or remote proxy server, or installing and configuring a local Solana cluster with Neon EVM onboard.
Overview of Neon EVM Architecture
Neon EVM is an emulator implemented in Rust that integrates the Ethereum Virtual Machine (EVM) into the Solana blockchain. This architecture allows Ethereum dApps to be deployed on Solana without source code modifications or recompilation, enabling them to benefit from Solana's high performance, parallel transaction processing, and low fees while remaining compatible with Ethereum developer tools like MetaMask, Remix, and Truffle.Overview of Neon EVM on Solana
Neon is a smart contract deployed on Solana designed to bring Ethereum Virtual Machine (EVM) compatibility to the Solana network. It enables developers and users to utilize Ethereum dApps and tools on Solana without requiring reconfiguration.Overview of NeonSwap for ERC-20 token swapping
NeonSwap is an open-source dApp forked from Uniswap V2 and modified for the Neon EVM. It allows users to swap ERC-20 tokens (including SPL tokens that comply with the ERC-20 standard and are deployed on the Neon EVM) without needing to send funds to a centralized exchange. Transactions are executed automatically, though they require gas fees paid in the native currency.Overview of Neon EVM
Neon EVM is an Ethereum Virtual Machine (EVM) implemented as a smart contract on Solana. It allows Ethereum dApp developers to deploy their applications to Solana without changing their codebase, enabling them to access Solana's high throughput (over 50,000 TPS), low gas fees, and liquidity while continuing to use familiar Ethereum tooling.Overview of migrating dApps to the Neon EVM
Migrating an Ethereum dApp to the Neon EVM allows it to run on Solana without requiring changes to the core software code. The process involves deploying contracts via Neon proxies, which provide a standard interface compatible with Ethereum utilities and tools. The migration is divided into three stages: 1) Deploying contracts in the Neon EVM environment, 2) Verifying that deployed contracts work correctly on a live chain, and 3) Deploying the dApp interface.Overview of Neon EVM
Neon EVM is an Ethereum Virtual Machine implemented as a smart contract on the Solana blockchain. It allows developers to deploy Ethereum-compatible dApps (written in Solidity) on Solana without changing their codebase. This enables Ethereum dApps to leverage Solana's high throughput (up to 50,000 TPS), low gas fees, and parallel transaction execution while maintaining compatibility with standard Ethereum tooling such as MetaMask, Remix, Truffle, and Solidity.Understand Neon EVM architecture and execution
Neon EVM is a Solana contract that runs inside the Berkeley Packet Filter (BPF) environment. It allows Ethereum-compatible smart contracts to be deployed and executed on Solana without rewriting the contract code. Neon EVM functions as a virtual machine that follows Ethereum rules, extracting data from transactions, validating Ethereum-style signatures, and recording new states on the Solana blockchain upon successful execution.Understand Solana cluster synchronization and Proof-of-History
Solana achieves high throughput by using Proof-of-History (PoH) and an optimistic method of processing blocks (Optimistic Concurrency Control). Unlike traditional blockchains that synchronize large chunks of transactions, Solana processes transactions optimistically to eliminate delay between receiving an entry and voting. If consensus is not reached, the node rolls back its state.Interact with Solana SPL tokens via ERC-20 interface
The ERC-20 SPL-Wrapper contract allows Solana applications to interact with EVM (Solidity/Vyper) contracts and enables Ethereum wallets (e.g., MetaMask) to transfer Solana tokens. It maps native SPL-token functionality to the standard ERC-20 interface.Transfer tokens between Solana and Neon EVM using NeonPass
NeonPass is an open-source service that enables the transfer of SPL tokens from Solana to the Neon EVM and the withdrawal of ERC-20 tokens from the Neon EVM back to Solana.
Key capabilities include:
- Solana to Neon EVM: Transfer SPL tokens to a Neon EVM account. If the destination account does not exist or does not yet have an ERC-20 balance, the account/balance is automatically created upon transfer.
- Neon EVM to Solana: Withdraw ERC-20 tokens to a Solana account. If the destination account does not have an SPL balance, the balance is automatically created upon transfer.
Because SPL tokens on Solana are managed via Solana wallets and cannot be directly managed from the Neon EVM, users must use both a Solana-compatible wallet (e.g., Phantom) and an EVM-compatible wallet (e.g., MetaMask) to provide the necessary addresses and sign transactions.
Understand Neon EVM Architecture Components
Neon EVM enables Ethereum users to process transactions on Solana. The architecture consists of several key roles and transaction types:
- Neon EVM User: Any user with a Neon EVM account holding ETH, ERC-20, or ERC-721 tokens.
- N-trx (Neon Transaction): A transaction formed and signed according to Ethereum rules.
- S-trx (Solana Transaction): A transaction formed and signed according to Solana network rules.
- Neon EVM Client: An application with EVM bytecode contracts loaded into Neon EVM. It generates N-trxs and sends them to a proxy. Clients must transfer funds to a Solana deposit to cover operator costs before sending an N-trx.
- Neon EVM Operator: A Solana account using software (the proxy) to facilitate transactions. Operators deploy and configure proxies to earn economic incentives based on SOL/ETH exchange rates.
- Neon EVM: An Ethereum Virtual Machine compiled into Berkeley Packet Filter (BPF) bytecode running on Solana. It is managed via a multisig EVM account for decentralized governance.