The Ethereum Virtual Machine (EVM) has been described as a global supercomputer. It takes all the transactions your computer could do: send and receive things like cash, documents and contracts and transforms them on a global scale.
Here's how it works.
Blockchains and smart contracts
Think oflike a basic version of what a blockchain can do. You have a unit of value, BTC, and you can send and receive bits of that value between you and other people. The Bitcoin blockchain records all of those transactions permanently.
took that concept and allowed people to build and decentralized apps ( ) on top of its blockchain.
Once Ethereum supported smart contracts, the next step was to create an environment where all those smart contracts live and interact with each other. That’s where Ethereum’s Virtual Machine (EVM) comes in.
EVM is best thought of as a virtual computer on the blockchain that turns your ideas into code, and runs it on the global Ethereum network.
EVM in action
For a concrete example, let’s say you want to create a way for you and three roommates to buy things for the house you live in. You are essentially building your own smart contract.
There are a number of things you want your smart contract to cover.
- 🏦 You and your three friends have to create individual accounts.
- 🤝 You all agree to take a bit of that money from your individual accounts and deposit it into the holding account each month.
- 🙅♂️ You all agree that no one person can take money out of that account unless everyone agrees.
- 🖊️ That money can only be taken out of that account if all four of you provide a digital signature.
Now, let’s say you want to allocate certain amounts of money every week for house supplies. You create a separate smart contract that says:
- 🏠 Only spend $10 a week on house supplies.
- 🛒 Only buy house supplies from this one store.
- 🚚 Make sure house supplies from this one store are delivered to this address.
Then let’s say you want to buy a TV, but some of you only want to contribute a certain amount of money towards it. Here comes another contract. That contract says:
- 👨⚕️ Person A only wants to spend $20.
- 👩🎓 Person B is happy to spend $40.
- 👨🌾 Person C can only spend $10.
- 👨🍳 Person D is allowed to make up the difference and purchase the TV if the above conditions are met.
These contracts all rely on an awareness of the contracts that come before them. This is the Ethereum Virtual Machine. It's like a messaging service for smart contracts; an environment where all these contracts live, interact and influence each other,
What can EVM do?
The above is a very simple real-world example of what smart contracts can achieve. But the Ethereum Virtual Machine opens up a wide range of more complicated possibilities.
- 📝 You can create contracts that require multiple conditions to be met: for example, insurance contracts that require bits of information to be present before a policy can be paid out.
- 📎 You can allow different people to specify their own mini contracts inside larger contracts. Imagine a builder hiring contractors to build a house. They can arrange mini-contracts between their plumbers, plasterers and electricians that only pay each person when certain conditions are met.
- 🤖 You can create contracts that can automatically buy or sell things: let’s say you’re in the air conditioning business. You only want to buy air conditioners when the temperature goes above a certain point. You can build a smart contract that can factor in the weather and automatically buy when it needs to.
The language of the Ethereum Virtual Machine
Much like the website you are reading this article on, the EVM is built on a coding language; famous ones that already exist include Java, Python and Ruby.
The EVM has its own, called Solidity. It’s a language that lets people build smart contracts that can interact with other smart contracts easily.
The future of EVM
We are just at the beginning of the virtual machine. In the future, the complexity, speed, and ability of the virtual machine will increase, much like the computers from the beginning of the PC era became faster and more able to do complex digital actions.