
The goal: Ethereum compatibility on MultiversX sovereign chains
MultiversX sovereign chains inherit a fast, sharded protocol and a WASM virtual machine, but most smart contract developers and tooling live in the EVM world. The goal of this project was a sovereign chain that could run Solidity contracts unchanged, sign transactions with Ethereum style keys and use its own address format, while keeping the MultiversX node, consensus and bridge components.
Because the MultiversX stack is split across many Go repositories (node, VM, VM common, crypto, scenario testing, proxy, SDK, deployment and sovereign bridge tooling), the change had to be carried consistently through all of them. We worked on these codebases in May and June 2024, merging upstream MultiversX sovereign branches as they moved.
An EVM executor inside the MultiversX VM
The core of the work sits in the VM. We added an EVM executor alongside the existing WASM executors, built around an EVM interpreter adapted from go-ethereum (opcodes, jump table, memory, stack, gas tables) and wired into the MultiversX VM host through a new executor factory and instance type.
Making EVM semantics fit the host required a series of targeted changes: a separate EVM opcode gas schedule, new blockchain hooks exposing the chain ID and address derivation from a base address, support for nested and indirect contract deployment (including returning balances of accounts created in the same transaction), code hash caching, account deletion and code replacement, and isolating unmetered logic so it does not halt execution. We added EVM test scenarios, such as an adder contract, to the scenario framework.
Keys, addresses and signing across the stack
An EVM compatible chain also needs compatible accounts. We introduced a custom address prefix and an address buffer and cleaner abstraction in the core library, a compact secp256k1 curve in the crypto library, and message hashing before signing where Ethereum conventions require it. These changes were then propagated to the SDK signer, the proxy, the sovereign notifier and bridge tooling, and the key and genesis file generators used by the deployment scripts.
Some approaches were tried and revised during integration (for example the custom curve usage in the node was later reverted in favour of a different path), which is visible in the commit history and typical of protocol level work.
Node configuration and outcome
At the node level we created EVM instances for sovereign nodes, fixed the sovereign node command, updated sovereign configs with chain specific addresses, added reserved wallets to the deployment tooling and tuned per block gas limits for EVM workloads. Dependencies were bumped in lockstep across all repositories so the node, VM, proxy and SDK stayed compatible.
The outcome was a working integration of EVM execution into the MultiversX sovereign chain codebase, touching every layer from the interpreter up to deployment scripts, built on top of MultiversX's own sovereign chain work rather than replacing it.