Ethereum leverages the Ethereum Virtual Machine (EVM), Solidity programming language, and shared network infrastructure to allow applications to seamlessly integrate and correctly execute transactions.
The EVM is the component of the Ethereum system responsible for interpreting and executing smart contracts. The EVM is what determines the outcome of transactions, and therefore, it is used to compute a new valid state as the blockchain progresses from block to block.
The EVM operates in a completely isolated environment, meaning its code cannot interact directly with the network, file system, or any other external processes. The majority of the source code for creating smart contracts is written in Solidity, a programming language specifically designed for Ethereum. Once written, a smart contract is compiled into bytecode, which is then translated into opcodes that the EVM can understand and execute.
The EVM performs a variety of blockchain activities, ensuring that operations are completed as long as the required gas for execution is available and neither exceeds the user’s balance or the network's gas limit. By following these rules, and in conjunction with the very flexible Solidity programming language, the EVM enables Ethereum to support a wide range of applications and establishes consistent execution across the network.
With these common components as the backbone of Ethereum applications and digital assets, transactions can be crafted to involve several contracts in one fell swoop. This has enabled new kinds of transaction experiments, such as the ‘flash loan’, where a transaction can borrow funds, use the borrowed funds to execute a profitable trading strategy such as an arbitrage, and repay the loan — all in one transaction.