Welcome crypto dummiez!
If you’re new here, this substack is focused on educating those of you that know nothing about crypto and blockchain technology. So if you find yourself lost in the middle of the current crypto revolution, then this substack is for you!
If you follow me on twitter I’m sure you know by now, smart contracts hold a special place in my heart.
Today we will cover Ethereum, a quick introduction to smart contracts, and why this was the biggest game changer to date for blockchain technology and the internet as a whole.
With that being said let’s get started!
Ethereum vs. Bitcoin
The introduction of Bitcoin and blockchain technology completely changed the world as we know it. Bitcoin introduced a continuously working digital currency system and a model for autonomous decentralized application technology. It enabled peer to peer transactions on a decentralized network, cutting out intermediaries, and a method for establishing trust among unknown peers by recording transactions on an immutable distributed ledger.
Bitcoin introduced scripts for conditional transfer of value and Ethereum decided to take this concept and extend scripting into full blown execution framework (AKA the Smart Contract.)
Ethereum opened up an entirely new world of decentralized opportunities by transforming blockchain into computational framework.
Much like Bitcoin, Ethereum has its own native currency (Ether) and follows many of the same rules, but enables a much greater function: the execution of smart contracts.
Below is a quick diagram to help understand some of the similarities and differences between the Bitcoin and Ethereum stack.
Ethereum is better described as a distributed state machine rather than a distributed ledger. A State Machine capable of executing arbitrary machine code, the Ethereum Virtual Machine (EVM).
So what does all this really mean?
In the simplest terms, bitcoin introduced a decentralized model and immutable distributed ledgers. Ethereum added on to this and introduced a virtual machine capable of executing machine code. Ethereum essentially introduced a platform for developers to create and build decentralized applications that are capable of much more than just transfer of value.
EVM (Ethereum Virtual Machine)
What is the Ethereum Virtual Machine?
A virtual machine is a virtual representation of a physical computer, with the same capabilities. The EVM is a computational engine very similar to many other cloud based virtual machines. It is the component of the Ethereum network that manages execution and deployment of smart contracts.
You can think of the EVM as a ‘ World Computer’, complete with its own storage and decentralized nodes around the globe. This creates a trustless deterministic environment for anyone to execute code. Much like other virtual machines (Java for example), the EVM requires high level programming languages to be compiled into a bytecode set of instructions in order to execute.
Enter, Solidity, the high-level programming language used to create smart contracts.
Note: Those that follow me on twitter, I have posted a thread of resources to get you started with learning solidity. In the future, I plan to cover solidity and smart contracts for those who wish to learn and become a solidity developer. This will be available to paid substack subscribers.
Intro to Smart Contracts
So what exactly is a Smart Contract?
To keep it simple, Smart Contracts are a piece of code deployed in the blockchain node. This ‘piece of code’ allows for the creation of decentralized applications that can do much more than transfer of value. A deployed smart contract can lead to the efficient automation of decentralized apps such as the supply chain. This introduces a whole new world of possibilities on the blockchain.
With bitcoin you can transfer value among unknown peers, with Ethereum you can create an ecosystem for peers to lend, borrow, and stake cryptocurrencies.
Ethereum enables transactions that may carry out sophisticated operations.
For example:
Conditional transfer of value
Evaluation
“may need more than x amount”
Required signature to authorize
“may involve x amount of wait time”
Smart contracts are made up of:
Data
Functions
Methods w/ modifiers (public/private)
To give you an example, lets take a look at the most basic structure of a smart contract written in solidity language.
In the example above I have broken down the most basic elements of a simple storage contract written in solidity. Featuring the version of solidity it is written in, the name of the contract and its corresponding functions. In order to execute this contract, the EVM will translate our simpleStorage contract into byte code to be deployed on the Ethereum Virtual Machine.
Side note: Smart Contracts and Solidity will be covered in much greater detail in the future. Posts will be available to paid subscribers who are looking to get started with Solidity and developing smart contracts.
Recap
We discussed some of the major differences between the Bitcoin blockchain and the Ethereum blockchain. We also went into some of the details and how Ethereum has completely transformed the way we utilize blockchain technology today. There are already hundreds of dApps (decentralized applications) available on the Ethereum network for all to use and they powered by Smart Contracts and executed on the EVM. Every node on the network is capable of executing code and every node will host the same contract codes on the EVM. Smart contracts allow for the execution of code and open the door to hundreds of possibilities for developers to write and deploy their own dApp.
Next week we will cover the Ethereum structure and some of the basic elements involved. I will see all you crypto dummiez next week !
Those of you interested in learning Solidity, stay tuned for more updates on posts that will solely cover Smart Contracts and dApp development!