While there are numerous applications for blockchain technology, they are complex to build on top of the Bitcoin blockchain. The Ethereum Foundation proposes that these applications can be executed in just a few lines of code.
- While digital currencies were prevalent since the 80s, their reliance on a centralized intermediary was a deal-breaker.
- Proof of Work, a consensus algorithm used by Bitcoin, allowed digital currencies to be decentralized.
Bitcoin As A State Transition System
- State (S) - Consists of the ownership status of all existing bitcoins.
- Transaction (TX) - Defines the amount of the transfer that is initiated in the system.
- State Transition Function (APPLY (S, TX) -> S’) - Takes a state and a transaction and outputs a new state (S').
- Prevents transaction senders from spending coins that do not exist.
- Prevents transaction senders from spending other people’s coins.
- Enforces conservation of value.
- Nodes in the network continuously try to produce packages of transactions called “blocks”
- Over time, this creates a “blockchain” that constantly updates.
- Proof of work makes block creation computationally hard, preventing attackers from remaking the entire blockchain in their favor.
- Allows a node to download only the header of a block from one source and still be assured that all of the data is correct, which saves significant disk space.
Alternative Blockchain Applications
- Namecoin lets you register names on a decentralized database.
- Colored coins allow people to create their own digital currencies on the Bitcoin Blockchain.
- Metacoins - Provides a mechanism to create an arbitrary crypto protocol.
Bitcoin's smart contract scripts can be modified to do numerous actions but have limitations:
1. Lack of Turing completeness - Unable to prevent infinite loop situations.
2. Value blindness - Unable to determine if the value of BTC has changed relative to USD.
3. Lack of state - Impossible to create smart contracts that include two-stage crypto verification.
4. Blockchain blindness - Limits the application of Bitcoin in gambling and other categories.
- Provides a Turing complete program, which allows a wide variety of smart contracts to be developed, which are much more sophisticated than those offered by Bitcoin.
- Ether is the internal crypto-fuel of Ethereum used to pay transaction fees.
Philosophy - 5 Principles
- Simplicity - Ethereum is simple and has a vision of being open to all.
- Universality - Turing completeness helps create smart contracts that can be mathematically defined.
- Modularity - All parts of the protocol can be separated into individual units.
- Agility - Contracts of Ethereum are not set in stone, but modifications will be done judiciously.
- Non-discrimination - All kinds of applications can be developed using Ethereum.
The state is made up of objects called "accounts." There are 2 types:
1. Externally owned accounts controlled by private keys
2. Have no inherent code.
3. Messages are sent by creating and signing a transaction.
4. Contract accounts are controlled by contract code.
5. Code activates depending on the content of the received message.
Messages and Transactions
- Transactions are signed and encrypted data packages that store a message to be sent from an externally owned account.
- A STARTGAS value is the max number of computational steps the transaction execution is allowed to take.
- A GASPRICE value is a fee the sender pays per computational step.
- STARTGAS and GASPRICE are crucial for Ethereum's anti-denial of service model.
- Messages are similar to transactions but created by contract accounts.
Ethereum State Transition Function
- Check that a transaction is valid.
- Calculate and subtract a fee from the sender's balance and increment the sender's nonce.
- Take off a certain quantity of gas per byte.
- Transfer the transaction value from the sender's account to the receiving account.
- Refund fees for all remaining gas to the sender, and send the fees paid for gas consumed to the miner.
- Ethereum contracts are written in EVM, which is a series of bytes where each byte is an operation.
- Basic implementation of Ethereum can be done in a few hundred lines of code.
Blockchain and Mining
- Ethereum blockchain is very similar to Bitcoin with a few differences.
- Unlike Bitcoin, Ethereum blocks contain a copy of the transaction list, the most recent state, the block number, and the difficulty.
- Financial Applications - e.g., currencies, derivatives, and contracts.
- Semi-financial Applications - e.g., automatic bounties on finding solutions to computational problems.
- Governance - e.g., online voting.
- Have many applications - e.g., token may represent smart property, assets, and point systems.
- A literal implementation of the state transition function.
- Allows the ability to pay transaction fees directly in that currency.
Financial Derivatives and Stable-Value Currencies
- The main challenge in implementing financial contracts is that they require reference to an external price ticker. This makes crypto volatile.
- Financial derivatives are an alternative to issuer-backed assets and are used to offer protection against crypto's volatility.
Identity and Reputation Systems
- A basic contract can provide a Namecoin-like name registration system on Ethereum, where users can register their names in a public database alongside other data.
Decentralized File Storage
- Ethereum contracts allow for the development of a decentralized file storage system, which allows users to earn money by renting out their own hard drives.
- Alternative to online file storage such as Dropbox, which is costly.
Decentralized Autonomous Organizations
- A virtual entity that has a certain number of shareholders that have the right to spend the entity's funds and modify the code.
- Essentially replicates the legal trappings of a traditional company but using only crypto blockchain technology for enforcement.
- Savings wallets, crop insurance, a decentralized data feed, multi-signature transaction contracts, cloud computing, peer-to-peer gambling, prediction markets, and on-chain decentralized marketplaces are all possible applications.
Miscellanea And Concerns
- GHOST is used to increase the security of blockchains with fast confirmation times. Ethereum only implements a simplified version of GHOST, which may decrease security.
- Transaction fees are needed as a regulatory mechanism to prevent abuse.
- Malicious users could potentially shut full nodes and miners down by forcing them to enter into an infinite loop.
- The long-term supply growth rate tends to zero like Bitcoin.
- Ethereum's solution to mining centralization (as seen in Bitcoin) is still untested.
- The Ethereum blockchain could grow extremely large and lead to centralization.