Ethereum — The World Computer
If you have spent time researching blockchains, you’ve more than likely come across Ethereum. While Bitcoin is still the most recognized of the two, Ethereum is a protocol proposed by Vitalik Buterin of Russia in 2013. Known to some as a “World Computer”, Ethereum’s combination of features allow it to provide users smart contracts and decentralized applications, otherwise known as DApps.
Take for example, building applications on the Bitcoin and Ethereum Networks. If I wanted to create a bet (I get X coins from user Y if event Z occurs) within the Bitcoin network, it would be nearly impossible due to Bitcoin’s challenge in describing complex transactions. This is only a simple example, but extends to full applications. Ethereum would have no problem creating such a transaction within a few lines of code, showing the ease with which it can create more complex transactions than Bitcoin.
People describe Ethereum as a transaction-based state-machine. In essence, this means that within the platform users are able to develop complex contracts that are automatically enforced when a set of criteria of are met. Once these transactions are completed and mined within a block of many other transactions, the “state” of Ethereum is updated by the state-transition-function.
Think of it in this way: Your credit card account has a current state, n. You then pay your monthly bills, kids’ allowance, and spend some money at the theatre. At the end of the month, these transactions are applied to your account and a statement balance is sent out to you with an updated credit balance amount; This is akin to the state-transitioning-function updating the state of Ethereum, which we call state n+1 in the diagram above.
Ethereum’s language, Solidity, is considered to be Turing-complete, and is one of the biggest differences between Ethereum and Bitcoin. In this case, Turing-complete refers to the fact that, unlike Bitcoin, in Ethereum it is not possible to tell whether a transaction/contract contains simple or complex operations. This produces an upper limit on how large transactions can be. Within Bitcoin, since it does not have a a Turing-complete language, transaction size increases with complexity. In the end, this means that potential network attackers cannot abuse the use of complex transactions to burden Ethereum’s processing power and launch attacks on the network.
How it All Works in Tandem
Ethereum is a great expansion of blockchain technology. Following is how it operates in order to provide the decentralized platform so many enthusiasts adore.
The Ethereum Virtual Machine, or EVM, is a runtime environment used to execute the set of contracts within the Ethereum network; the EVM is isolated from the rest of the blockchain. The current state of Ethereum is composed of objects named accounts. There are 2 types of accounts, externally owned accounts (EOA) and contract accounts. Accounts contain up to four fields of information:
- nonce - a counter ensuring each transaction only occurs once
- ether balance - amount of ether within the account
- contract code - only present in contract accounts
- storage - this is empty by default
What everyone knows as smart contracts within Ethereum are the contract accounts. Externally owned accounts are linked to private keys held by users on the platform. The contract accounts are controlled by public keys and are only activated when “poked” by EOAs.
Users can either send a transaction from one EOA to another EOA, or from an EOA to a contract account. EOA to EOA transactions are mostly just transfers of Ether, the currency used for payments within the network. A transaction sent from an EOA to a contract account results in execution of the code within the smart contract.
On top of this also exists Gas. Gas is defined as the execution fee for any operation made on Ethereum. Gas is priced in Ether and every smart contract uses up an amount of gas.
In short, when a transaction pokes at a smart contract and the criteria for execution are met, the contract is processed. Whatever code existing inside is executed, ether is delivered/received depending on the code, and some gas is used up.
Mining Within Ethereum
The original mining process on the Ethereum network was similar to that of Bitcoin’s. It was a PoW consensus method in where miner’s compete to validate a block of transactions and receive payment in Ether for doing so. If you are interested in how PoW mining works in more depth, check out this wiki.
Currently, Ethereum is in the process of switching over to proof of stake from PoW through a project named Casper. In order to test the efficiency and not completely overburden the system with a huge change, Casper is a hybrid PoW/PoS system. PoW is a huge burden resource wise, and thus Casper is being implemented in order to have a consensus mechanism that is less energy demanding than PoW. Here is the Casper white paper for anyone seeking additional information.
DApps is the shorthand for decentralized applications. Decentralized applications are one of the main features that attract people to Ethereum. Here are some interesting dapps that have risen out of the platform.
- Etheria is a decentralized minecraft world that is stored within the Ethereum blockchain.
- The world is composed of land tiles that can be purchased using Ether.
- EtherTweet is an uncensored, blockchain communication platform.
- It is basically a decentralized twitter. Users can only control the content they publish on the blockchain.
- Gnosis is a decentralized prediction market built on Ethereum
- Users have the option to predict everything from election results to the outcome of sports games.
If you are interested in learning more about cryptocurrencies and blockchain, join our Slack and visit our website, Michigan Blockchain Community.