What is EVM bytecode?
EVM bytecode is the low-level instruction format that the Ethereum Virtual Machine understands and executes. When developers write smart contracts in languages like Solidity or Vyper, the code is compiled into bytecode before it can run on the blockchain. This bytecode is a sequence of compact instructions, known as opcodes, that tell the EVM how to process data, modify storage, interact with other contracts, and handle transactions.
The bytecode is divided into two parts: creation bytecode and runtime bytecode. Creation bytecode runs only once during contract deployment. Its job is to initialise the contract, set variables, and produce the final runtime bytecode that will live on the blockchain. Runtime bytecode stays stored in the contract’s account and executes whenever someone interacts with that contract.
Each opcode in the bytecode performs a specific function. Some handle arithmetic, others manage memory, storage, or control flow. Since the EVM is stack-based, most instructions push and pull data from a virtual stack. Each opcode also has a fixed gas cost, which helps maintain fairness and prevents misuse of network resources.
Although bytecode looks complex and unreadable, it plays a critical role in security and transparency. Anyone can inspect contract bytecode on-chain to verify the behaviour of deployed contracts, even without access to the source code. Understanding EVM bytecode helps developers audit contracts, debug unexpected behaviour, and build more efficient decentralised applications.
The bytecode is divided into two parts: creation bytecode and runtime bytecode. Creation bytecode runs only once during contract deployment. Its job is to initialise the contract, set variables, and produce the final runtime bytecode that will live on the blockchain. Runtime bytecode stays stored in the contract’s account and executes whenever someone interacts with that contract.
Each opcode in the bytecode performs a specific function. Some handle arithmetic, others manage memory, storage, or control flow. Since the EVM is stack-based, most instructions push and pull data from a virtual stack. Each opcode also has a fixed gas cost, which helps maintain fairness and prevents misuse of network resources.
Although bytecode looks complex and unreadable, it plays a critical role in security and transparency. Anyone can inspect contract bytecode on-chain to verify the behaviour of deployed contracts, even without access to the source code. Understanding EVM bytecode helps developers audit contracts, debug unexpected behaviour, and build more efficient decentralised applications.
EVM bytecode is the low-level code executed by the Ethereum Virtual Machine when a smart contract runs. It is generated after compiling high-level languages like Solidity or Vyper. This bytecode consists of a sequence of opcodes that define exactly how the contract behaves on the blockchain.
Once deployed, EVM bytecode becomes immutable and is stored on Ethereum nodes. Every transaction interacting with the contract triggers this bytecode to execute in a deterministic way, ensuring the same result across the network. Because all computation costs gas, efficient bytecode is important for reducing transaction fees. Developers usually work with source code, but the EVM only understands bytecode.
Once deployed, EVM bytecode becomes immutable and is stored on Ethereum nodes. Every transaction interacting with the contract triggers this bytecode to execute in a deterministic way, ensuring the same result across the network. Because all computation costs gas, efficient bytecode is important for reducing transaction fees. Developers usually work with source code, but the EVM only understands bytecode.
Dec 11, 2025 02:57