Ethereum: The Next Generation of Electronic Contracts and Decentralized Application Platform
Ethereum White Paper Table of Contents
Ethereum: The Next Generation of Electronic Contracts and Decentralized Application Platform
This paper introduces Ethereum, a decentralized platform based on blockchain technology that allows users to create and run smart contracts and build various decentralized applications on this basis.
Table of Contents
Introduction
Bitcoin's dual innovation:
Decentralized peer-to-peer online currency
Blockchain based on proof of work
Application prospects of blockchain technology:
Digital assets
Smart property
Decentralized exchanges
Identity and reputation systems
Decentralized Autonomous Organizations (DAOs)
Ethereum's goals:
Provide a Turing-complete cryptocurrency ledger
Allow users to encode arbitrarily complex contracts
Realize the vision of "cryptocurrency 2.0"
Why do we need a new platform?
Limitations of existing protocols
Colored Coins:
As an "overlay protocol" for Bitcoin
Main flaws:
Difficulty in simplifying payment verification
Incompatible with scripts
Inheriting Bitcoin's limitations
Metacoins:
Encode metacoin transaction data into Bitcoin transaction outputs
Main flaw: Simplifying payment verification is completely impossible
Conclusion: A more powerful base layer is needed to build decentralized applications
Ethereum's solution:
Owns its own blockchain and state tree
Provides a powerful scripting system
Provides a foundation for innovation
Design philosophy
Simplicity: The protocol is as simple and easy to understand as possible
Versatility: Provides a Turing-complete scripting language
Modularity: Each part of the protocol is as modular and separable as possible
Agility: The details of the protocol can be adjusted according to actual conditions
Non-discrimination: No attempt to restrict specific types of use
Basic building blocks
Proof-of-Work mining cryptocurrency based on memory difficulty
Simplified transaction model: based on balance rather than multi-input and output
Remove sequence numbers and lock times
Uniform data encoding format
Address generation method: SHA3 hashing
Core function: smart contracts
Improved GHOST implementation
GHOST Protocol: Solve the security problem of fast confirmation time blockchain
Ethereum's GHOST implementation:
Simplified version, only traces back one level
Provide block rewards for "uncle blocks"
Advantages:
Improve network security
Reduce centralization risk
Achieve fast block time
Ethereum client P2P protocol
Standard cryptocurrency protocol, supports GHOST
Client functions:
Maintain network connection
Request block data
Serve as block browser backend
Currency and issuance
Ethereum built-in currency: Ether (ether)
The role of ether:
Incentivize network security
Pay transaction fees
Denomination:
Wei (minimum unit)
Szabo
Finney
Ether (main unit)
Issuance model:
Issue X ether in the crowdfunding stage
Allocation ratio:
Early contributors: 0.225X
Start-up capital: 0.05X
Long-term reserve: 0.225X
Mining rewards: 0.4X/year (permanent)
Linear issuance model:
Reduce wealth concentration risk
Long-term inflation rate tends to zero
Data format
Recursive length prefix encoding (RLP)
Block structure:
Block header
Transaction list
Uncle list
Block header information:
Parent block hash
Uncle list RLP encoded SHA3 hash
Miner address
State tree root
Transaction list RLP encoded SHA3 hash
Difficulty
Timestamp
Extra data
Random number
State tree: store all account information
Account information:
Balance
Random number
Contract root
Store deposit
Mining algorithm
Goal: resist dedicated hardware optimization
Memory difficulty:
Scrypt: vulnerable to ASIC attack
Birthday attack: time-memory trade-off attack
Dagger: vulnerable to multi-computing circuit shared memory attack
Ethereum's solution:
Initial solution: improved Dagger algorithm
Long-term goal: hold mining algorithm competition to find better solutions
Transaction
Transaction structure:
Random number
Receiving address
Amount
Data item list
Signature (v, r, s)
Transaction verification:
Signature validity
Account balance sufficiency
Contract creation transaction: sent to empty string address
Difficulty adjustment
Adjustment formula: based on the past 500 timestamp of blocks
Goal: Stable block time of around 60 seconds
Block rewards
Reward types:
Static block rewards
Transaction fees
Uncle block rewards
Distribution ratio:
Block rewards: 100% to miners
Transaction fees: 50% to miners, 50% to the past 64 miners
Uncle block rewards: 87.5% to uncle block miners, 12.5% to the miners of the block containing the uncle block
Contracts
Contract types:
Real users
Smart contracts (automatic agents)
Contract activation: Run code when a transaction is received
Contract state:
Stack (temporary storage)
Memory (temporary key-value storage)
Storage (persistent key-value storage)
Applications
Sub-currencies:
Representing assets (US dollars, gold, etc.)
Company stocks
Collectibles or smart property
Financial derivatives:
Data feeds: Provide asset price information
Contract example: Hedge contracts
Identity and reputation systems:
Namecoin-like name registration system
Reputation and trust network mechanism
Decentralized autonomous organization (DAO):
Members or shareholders jointly manage funds and code
Fund distribution methods: bounties, wages, internal currencies
Type:
Decentralized Autonomous Company (DAC)
Decentralized Autonomous Community
Code Example: Basic Framework of DAO
More Applications
Savings Wallet
Crop Insurance
Decentralized Data Feed
Smart Multi-Signature Escrow
Peer-to-Peer Gambling
Decentralized Stock Market and Prediction Market
Decentralized Market
Decentralized Dropbox
How Contracts Work
Contract Creation Transaction Encoding
Contract Creation Transaction Verification Process
Contract Script Interpretation Process
Language Specification
Stack-based Scripting Language
Memory Type:
Stack
Memory
Storage
Operation Code:
Arithmetic Operations
Logical Operations
Cryptographic Operations
Memory Operations
Storage Operations
Jump Instructions
External Calls
Other Instructions
Compiler: Converts high-level languages to Ethereum script code
Fee
Mandatory Fee System
Fee Types:
Transaction Fee (TXFEE)
Contract Creation Fee (NEWCONTRACTFEE)
Calculation Step Fee (STEPFEE)
Storage Fee (STORAGEFEE)
Data Access Fee (DATAFEE)
External Call Fee (EXTROFEE)
Crypto operation fee (CRYPTOFEE)
Fee adjustment mechanism:
Inversely proportional to the square root of difficulty
Proof of Stake voting
Conclusion
Ethereum's design philosophy: simplifying complexity and providing a universal scripting language
Potential of Ethereum:
Supporting a variety of financial and non-financial protocols
Serving as the base layer for decentralized applications
Summary
The above is a detailed catalog of the Ethereum white paper, covering its core concepts, technical architecture and application scenarios. Ethereum is committed to building an open, flexible and secure decentralized platform to provide unlimited possibilities for the future development of blockchain applications.
Ethereum: The next generation of electronic contracts and decentralized application platforms - technical document interpretation
This document is an interpretation of Ethereum's early technical document "Ethereum: Die nächste Generation elektronischer Verträge und die Plattform für dezentrale Anwendungen", which will focus on its main themes, important ideas and key facts.
1. The original intention of Ethereum's design
Ethereum was born to solve the limitations of the Bitcoin protocol in dealing with complex applications, aiming to build a more general and flexible platform for the development and deployment of various decentralized applications.
1.1 Limitations of the Bitcoin protocol
Colored Coins:
As an extension of the Bitcoin protocol, colored coins attempt to implement custom currencies and assets on the blockchain.
Disadvantages:
Simplified Payment Verification (SPV) is difficult: the color of the transaction output cannot be easily verified.
Incompatible with scripts: The Bitcoin scripting language cannot recognize the concept of "color", which limits functions such as decentralized transactions.
Inheriting Bitcoin's limitations: complex contracts and conditional transfers cannot be supported.
Metacoins:
Encode metacoin transaction data into Bitcoin transaction outputs and build on the Bitcoin protocol.
Disadvantages:
Simplified payment verification is completely unfeasible: all historical transactions need to be scanned to verify the validity of the transaction.
1.2 Ethereum's design philosophy
Simplicity: The protocol should be as simple as possible, even at the expense of storage space or time efficiency, to facilitate understanding and implementation.
Universality: Instead of providing specific functions, it provides a Turing-complete scripting language that allows users to build any computable smart contracts and transaction types.
Modularity: The various parts of the protocol should be as modular and separable as possible to facilitate upgrading and maintenance.
Agility: The details of the protocol are not set in stone and can be adjusted and optimized according to actual conditions.
Non-discrimination: There is no restriction on specific application categories, and all regulatory mechanisms should be directly targeted at harmful behaviors rather than specific applications.
2. Basic building blocks of Ethereum
Memory-intensive proof of work (PoW): Similar to Bitcoin, but using the improved GHOST protocol, which improves security and reduces centralization risks.
"We are currently considering adopting an algorithm similar to Dagger and adjusting parameters to minimize attacks on dedicated hardware. If it is deemed necessary, it can also be combined with our own proof-of-stake algorithms such as Slasher to enhance security."
Ethereum client P2P protocol: A standard cryptocurrency protocol that supports the GHOST protocol and acts as the backend of a blockchain browser.
Currency and issuance: The built-in currency ether (ether) is used to reward miners and pay transaction fees. The issuance model is as follows:
Initial ether is issued through crowdfunding.
Part of the ether is allocated to early contributors and reserves.
Permanent linear issuance, with a fixed number of ether issued each year.
Data format: All data is serialized using recursive length prefix encoding (RLP).
"All data in Ethereum will be stored in recursive length prefix encoding, which serializes string arrays of arbitrary length and dimension into strings."
Mining algorithm: Committed to developing ASIC-resistant algorithms, and plans to hold competitions to find the best solution.
Transaction: The transaction structure is simplified, a balance-based model is adopted, and transaction fees are automatically included.
"A transaction sent to an empty string as an address is a special type of transaction that creates a "contract."
Difficulty adjustment: The difficulty is automatically adjusted according to the block time, and the target block time is 60 seconds.
Block rewards: Includes static block rewards, transaction fees, and uncle block rewards.
3. Smart Contracts
Smart contracts are self-executing programs stored on the blockchain that have an Ethereum address and balance and can send and receive transactions.
Contract Execution: When a transaction is sent to a contract address, the contract code is executed, possibly modifying internal states or sending other transactions.
Contract Scripting Language: A low-level language that combines assembly language and Bitcoin's stack-based language.
"The contract scripting language is a hybrid of assembly language and Bitcoin's stack-based language. It maintains an index pointer that is usually incremented by 1 after each operation and continues to process operations found at the current index pointer."
Fee: Fees are required to execute contract operations to prevent abuse and network congestion.
4. Application Scenarios
Sub-currencies: Create custom currencies that represent assets, company stocks, or collectibles.
Financial Derivatives: Create a variety of financial instruments, such as hedging contracts, options, and debt-backed bonds.
Identity and Reputation Systems: Build decentralized identity authentication and reputation management systems.
Decentralized Autonomous Organizations (DAOs): Create virtual entities that are jointly managed by members or shareholders, such as decentralized autonomous companies (DACs).
"In the long term, the Ethereum Foundation itself intends to transform into a fully self-sufficient DAO."
Other applications: savings wallets, crop insurance, decentralized data feeds, multi-signature hosting, peer-to-peer gambling, decentralized markets, and file storage, etc.
V. Summary
Ethereum aims to build an open, flexible, and general decentralized application platform, and its Turing-complete smart contract functionality provides developers with endless possibilities.
"In summary, we believe that this design is a big step towards achieving "Crypto 2.0", and we hope that Astraleums will make a significant contribution to the cryptocurrency ecosystem, just as the emergence of Web 2.0 was a stark contrast to the static content Internet in 1999."
Ethereum Learning Guide
Glossary
Term Definition Blockchain A distributed database that uses cryptography to ensure the security and immutability of data. Smart contract A piece of code stored on the blockchain that is automatically executed when preset conditions are met. Decentralization A system architecture without a central control point. Ethereum is an open-source, blockchain-based distributed computing platform that supports smart contracts and decentralized applications (DApps). Ether (ETH) is the native cryptocurrency of the Ethereum network, used to pay for transaction fees and computing services. Miners are responsible for validating and adding new blocks to the blockchain nodes and are rewarded with Ether. Consensus mechanism is an algorithm that ensures that all nodes reach a consensus on the state of the blockchain. Proof of Work (PoW) is a consensus mechanism that requires miners to perform a large amount of calculations to add new blocks. GHOST protocol is an improved PoW protocol used by Ethereum that can improve block confirmation speed and security. Merkle tree is a data structure that can efficiently verify large amounts of data. Turing completeness is the ability of a programming language or machine to execute any computable algorithm. Decentralized Autonomous Organization (DAO) is an organization controlled by code and has no centralized management. Short answer question
What is the main difference between Ethereum and Bitcoin?
Explain what "Gas" is in Ethereum and what it is used for?
What role do smart contracts play in Ethereum?
Briefly describe how the GHOST protocol used in Ethereum improves the traditional proof-of-work mechanism?
What is a decentralized application (DApp)? Please give an example.
How are transaction fees calculated in Ethereum?
Explain the concept of "state tree" in Ethereum and its role.
How does Ethereum solve the limitations of traditional "colored coins" and "meta-coin" protocols?
Briefly describe the role of Ethereum's recursive length prefix encoding (RLP).
Why did Ethereum choose to use a Turing-complete scripting language?
Short answer questions
The main difference between Ethereum and Bitcoin lies in their functions and purpose. Bitcoin is mainly used as a decentralized digital currency, while Ethereum is a platform that supports smart contracts and decentralized applications. Ethereum's scripting language is Turing-complete, making it more powerful and flexible.
In Ethereum, "Gas" refers to the computing resources required to execute smart contracts or transactions.Source. Users need to pay for Gas to incentivize miners to process their transactions. The higher the Gas price, the faster the transaction is processed, and vice versa.
Smart contracts are the core feature of Ethereum. They are pieces of code stored on the blockchain and automatically executed. Smart contracts can be used to create decentralized applications, tokens, and other complex logic.
Ethereum's GHOST protocol improves the traditional proof-of-work mechanism by rewarding "uncle blocks". This increases the speed of block confirmation and reduces the waste of miners' resources on "orphan blocks", thereby improving the security of the network.
Decentralized applications (DApps) are applications running on decentralized networks that are not controlled by any single entity. For example, a decentralized exchange can allow users to trade cryptocurrencies directly without a centralized exchange.
Transaction fees in Ethereum are calculated based on the complexity of the transaction and network congestion. Transaction fees are used to cover the cost of miners processing and verifying transactions.
The state tree in Ethereum is a Merkle tree that stores the status of all accounts. Each block contains a root hash of the state tree, which is used to verify and track the current state of the network.
Ethereum addresses the limitations of traditional "colored coin" and "metacoin" protocols by providing Turing-complete smart contracts and a built-in currency, Ether. This enables more complex and feature-rich applications to be built on Ethereum and simplifies transaction fee payments.
Ethereum's Recursive Length Prefix Encoding (RLP) is used to serialize and deserialize data structures in Ethereum. It provides a concise and efficient way to store and transfer various data types, including transactions, blocks, and state trees.
Ethereum chose to use a Turing-complete scripting language to maximize the flexibility and functionality of the platform. This enables developers to create a wide variety of applications without relying on predefined opcodes or functions.
Paper Title
Analyze how Ethereum enables decentralized financial applications (DeFi) through smart contracts.
Discuss the scalability challenges of the Ethereum network and evaluate existing and future solutions.
Compare and contrast Ethereum with other smart contract platforms, such as EOS and Hyperledger Fabric.
Explore the potential and risks of decentralized autonomous organizations (DAOs) and analyze their impact on future governance structures.
Evaluate the impact of the Ethereum platform on different industries, such as supply chain management, digital identity, and gaming.
FAQs about Ethereum
This document aims to answer some common questions about the Ethereum project.
1. What is Ethereum?
Ethereum is an open source, blockchain-based distributed computing platform that has smart contract capabilities. It provides developers with a platform to build and deploy decentralized applications (DApps) that can run without a third party.
2. What is the difference between Ethereum and Bitcoin?
While both Ethereum and Bitcoin are cryptocurrencies based on blockchain technology, there are some key differences between them:
Purpose: Bitcoin aims to be a peer-to-peer electronic cash system, while Ethereum aims to be a more general platform for building and deploying decentralized applications.
Functionality: Ethereum has Turing-complete smart contract capabilities, allowing developers to create a variety of complex applications. In contrast, Bitcoin's scripting language has limited functionality.
Programming language: Ethereum provides a C-like programming language called Solidity for writing smart contracts.
Block time: Ethereum's block time is about 15 seconds, while Bitcoin's block time is about 10 minutes.
3. What is a smart contract?
Smart contracts are self-executing contracts that run on the Ethereum blockchain. They contain code for the terms of the contract that automatically executes when predefined conditions are met. For example, a simple smart contract could stipulate that a certain number of tokens are automatically sent to a specified address when a certain amount of Ether is received.
4. How does Ethereum solve the problem of Colored Coins and Metacoins?
Both Colored Coins and Metacoins were early attempts to build more complex applications on the Bitcoin blockchain. However, these projects faced scalability and efficiency issues due to the limitations of Bitcoin's scripting language.
Ethereum solves these problems by providing the following features:
Turing-complete smart contract language: Developers can use Ethereum's smart contract language to create powerful applications without the limitations of Bitcoin's scripting language.
Independent blockchain: Ethereum has its own blockchain, which means it is not limited by Bitcoin's block size and transaction throughput limits.
State storage: Ethereum includes a state tree in each block, allowing for more efficient storage and updating of application data.
5. What is Ethereum's mining algorithm?
Ethereum currently uses a proof-of-work (PoW) mining algorithm called Ethash. Ethash is designed to resist optimization by specialized hardware (such as ASIC miners), making mining more decentralized.
6. What are the application scenarios of Ethereum?
Ethereum has a wide range of application scenarios, including:
Decentralized Finance (DeFi): Creating decentralized exchanges, lending platforms, and stablecoins.
Supply Chain Management: Tracking products from source to end consumer.
Identity Management: Creating a secure and decentralized identity system.
Games: Developing blockchain-based games with real asset ownership.
7. How do developers use Ethereum to create applications?
Developers can use a variety of tools and resources provided by Ethereum to create applications, including:
Solidity programming language: used to write smart contracts.
Remix IDE: A web-based integrated development environment for writing, testing, and deploying smart contracts.
Truffle and Hardhat: Frameworks for developing, testing, and deploying Ethereum applications.
8. What is the future direction of Ethereum?
Ethereum is under active development and will undergo major upgrades in the future, including:
Ethereum 2.0: A series of upgrades designed to improve the scalability, security, and sustainability of Ethereum. One of the key upgrades is the transition from the PoW consensus mechanism to the Proof of Stake (PoS) mechanism.
Layer 2 solutions: Aims to improve Ethereum's scalability by moving transactions off-chain for processing.