0% found this document useful (0 votes)
64 views27 pages

Ethereum

Ethereum is a blockchain-based computing platform. • Can build and deploy decentralized applications. • Participants of that particular application are the decision-making authority. • Second most popular cryptocurrency

Uploaded by

csreesowmya22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views27 pages

Ethereum

Ethereum is a blockchain-based computing platform. • Can build and deploy decentralized applications. • Participants of that particular application are the decision-making authority. • Second most popular cryptocurrency

Uploaded by

csreesowmya22
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Ethereum- Overview

2013: White Paper written by Vitalik Buterin (who was 19 at the time!)
2015: The project was launched
Goals:
• An alternative protocol for building decentralized applications (DApps)
• A blockchain with a Turing-complete programming language
• To build smart contracts on top of the protocol
Ethereum
• Ethereum is a blockchain-based computing platform.
• Can build and deploy decentralized applications.
• Participants of that particular application are the decision-making authority.
• Second most popular cryptocurrency.
Features
• Ether: Cryptocurrency.
• Smart contracts: Ethereum allows the development and deployment of these types of
contracts.
• Ethereum Virtual Machine: Ethereum provides the underlying technology—the
architecture and the software—that understands smart contracts and allows you to interact
with it.
• Decentralized applications (Dapps): A decentralized application is called a Dapp.
• Decentralized Autonomous Organizations (DAOs): Ethereum allows you to create
these for democratic decision-making.
Ether
• Ether (ETH) is Ethereum’s cryptocurrency.
• Fuel that runs the network.
• Used to pay for the computational resources and the transaction fees for any transaction
executed on the Ethereum network.
• Like Bitcoins, ether is a peer-to-peer currency.
• Ether is also used to buy gas.

• Gas:
• Is used to pay for the computation of any transaction made on the Ethereum network.
• Gas is the internal currency used to pay for the execution of smart contracts on the
Ethereum network.
• to deploy a contract on Ethereum.
• Is the execution fee paid by a user for running a transaction in Ethereum. Ether can be
utilized for building decentralized applications, building smart contracts, and making
regular peer-to-peer payments.
Ether vs Gas
• Ether (ETH): This is the actual cryptocurrency of the Ethereum network. Think of it like
money that you use to buy things or pay for services on Ethereum.

• Gas: This is a measure of how much work or effort is needed to perform actions on
Ethereum, like sending money or running smart contracts. You pay for this work using
Ether.

• Ether is the currency.

• Gas is a way to measure how much Ether you need to spend to get something done on
Ethereum.
Smart Contracts
• Simple computer program that facilitates the exchange of any asset between two parties.
• Assets can be money, shares, property, or any other digital asset that you want to
exchange.
• Anyone on the Ethereum network can create these contracts.
• The contract consists primarily of the terms and conditions mutually agreed on between
the parties (peers).
• Key feature: Once executed can’t be altered. i.e any transaction done on top of a smart
contract is registered permanently—it is immutable

Smart Contract Traditional Contract


Decentralized Centralized
Agreement is coded in program Physical
Immutable Data tampering is possible
Automatic Manual
DAO Central Authorities
Deployment of Smart Contract
EVM
• Turing complete virtual machine accessed globally through a participating network node.
• A runtime environment for compiling and deploying Ethereum-based smart contracts.
• Acts both as a development and testing environment.
• EVMs aren’t tied to a specific physical device and have no system interface or hardware.
• Uses the computing power of many participants to provide a runtime environment similar
to a physical computer.
• Unlike physical computers, virtual machines aren’t bound to a single operating system or
location.
• People worldwide can use the machine regardless of where they live or what kind of
computer they use.
• Smart contracts are compiled in byte codes which then can be read and executed using
EVM.
• Popular language to write smart contract is Solidity.
• Smart contracts written using solidity are converted into bytecode and gets deployed on
EVM thereby protected from cyber attacks.
• EVM is a state machine- Computation engine that switches between states.
• When a transaction causes a smart contract to execute, the EVM changes Ethereum’s
state to meet the needs of the specific contract call.

• Is EVM decentralized?
• Mostly decentralized. – Run on AWS
DAPP
DAO
• Decentralized Autonomous Organizations (DAOs) are entities with no central leadership,
governed by a community organized around a specific set of rules enforced on
a blockchain.
• DAOs operate using smart contracts, which are chunks of code that automatically execute
whenever a set of criteria are met.
• DAOs are fully autonomous and transparent, built on open-source blockchains, allowing
anyone to view their code and audit their built-in treasuries.
Bitcoin Vs Ethereum
Bitcoin Ethereum
Creator Satoshi Nakamoto Vitalik Buterin
Launch 2009 2015
Platform Alternative platform for traditional fiat Platform to run programmatic
currencies contracts and applications
Currency Bitcoin Ether
Consensus PoW PoW, PoS
Block time 10 minutes 15 seconds on an average
Transaction throughput 7 transactions per second 30 transactions per second
Supply Finite-capped at 21 million BTC Infinite supply
Algorithm SHA-256 Ethash
What is Ethereum Client?
 Ethereum clients are software implementations of the Ethereum protocol that allow users to
interact with the Ethereum network.
 They provide a way for users to connect to the network and participate in the creation and
execution of smart contracts and decentralized applications (dApps).
 While these many clients are created by various teams and in various programming languages, they
all “speak” the same protocol and adhere to the same rules.
 As a result, they may all function on and interact with the same Ethereum network.
 These interactions among different clients in the network take place using various programming
languages like
Geth (Go), OpenEthereum/"Parity Ethereum" (Rust), Parity(Rust) ,
Nethermind (C#, .NET), Besu (enterprise-grade Ethereum client) (Java), Erigon
(Go/Multi).
• Each client implements the Ethereum protocol in its own way, and developers can choose the client
that best suits their needs. Users can run an Ethereum client on their own computer or on a cloud-
based server.
• By running an Ethereum client, users can interact with the Ethereum network, send and receive
ether (ETH), deploy smart contracts, and execute transactions on the network.
• Ethereum clients are a critical component of the Ethereum ecosystem, enabling developers and
users to create and use decentralized applications on the Ethereum blockchain.
Ethereum address
 An Ethereum address is a 42-character string that uniquely identifies a wallet on the
Ethereum blockchain.
 The first two characters of an Ethereum address are always "0x".
 Example: 0xb794f5ea0ba39494ce839613fffba74279579268
 Ethereum addresses are generated from public-private key pairs.
 The private key is used to sign transactions and messages, while the public key is used
to generate the Ethereum address.
 Ethereum addresses are case-insensitive and can be represented in upper or lower case.
 It's important to note that if you send ether to an incorrect address, the funds will be lost
forever, as there is no way to reverse a transaction on the Ethereum blockchain.
 Therefore, it's important to double-check the accuracy of an Ethereum address before
sending any funds.
Ethereum address cont…

There are two types of Ethereum addresses:


 Externally Owned Accounts (EOA):
These are standard user-controlled addresses that are generated by a private
key. They are used for sending and receiving ether and interacting with
smart contracts.
 Contract Addresses:
These are addresses that are generated when a smart contract is deployed on
the Ethereum blockchain.
They are used to receive and send ether, but they also have additional
functionality, such as executing code and storing data.
Ethereum Accounts

18
Ethereum wallets
Ethereum wallets are software programs that allow users to securely store,
manage, and send Ethereum and other Ethereum-based tokens.
Some popular types of Ethereum wallets include:
Hardware wallets: Physical devices that store the user's private keys offline,
providing an extra layer of security.
Examples include Trezor and Ledger.
Software wallets: Desktop or mobile apps that store the user's private keys on the
device.
Examples include MetaMask and MyEtherWallet.
Web wallets: Online wallets that store the user's private keys on a remote server.
Examples include Coinbase Wallet and Trust Wallet.
It's important to note that users should never share their private keys with anyone,
as they give access to the funds stored on the corresponding Ethereum address.
Ether Denomination

20
Ethereum transaction
An Ethereum transaction is a digital contract that is used to transfer Ether or other Ethereum-based
tokens from one address to another.
The process of creating and sending a transaction involves the following steps:
1. The sender's wallet creates a digital signature, using their private key, that authorizes the transfer
of funds from their address to the recipient's address.
2. The transaction is broadcast to the Ethereum network and included in the next block by a miner.
3. Once the transaction is included in a block, it is considered to be confirmed.
4. The transaction is then stored on the Ethereum blockchain and can be viewed by anyone using a
block explorer.
It's important to note that every transaction on the Ethereum network requires a small amount of
Ether to be paid as a fee, known as gas, to cover the cost of processing the transaction on the
network.
The cost of gas is determined by the complexity of the transaction and the current demand on the
network.
It's also important to mention that Ethereum transactions can also include smart contract
interactions, which goes beyond simple fund transfer, allowing for more complex decentralized
applications to be built on top of Ethereum
Ethereum transaction cont..
The structure of Ethereum transaction contains different parameters those are:
 Nonce: Ethereum has two types of nonce: proof-of-work nonce and transaction nonce.
Transaction nonce is a sequence number of transactions sent from a given address.
Each time you send a transaction, the nonce value increased by one. Moreover, Nonce
prevents replay-attack on Ethereum blockchain.
 Gas price: Gas Price represents the price of Gas in Gwei.
 For example, 1 Gas = 10 Gwei. It is basically determined by market supply and
demand.
 Gas Limit: it’s the limit of the amount of ETH the sender is willing to pay for the
transaction.
 To / Recipient: The recipient is the destination of Ethereum address.
 Value: The value field represents the amount of ether/wei from the sender to the
recipient.
 Data: Data contains messages that can be conceived of as function calls.
 v, r, s(ECDSA): This field is 3 components of an ECDSA(Elliptic Curve Digital
Signature Algorithm) digital signature of the originating EOA(Externally-Owned
Contract Accounts
• Contract accounts can hold and execute code written in Solidity or
other Ethereum-compatible languages. They can perform complex
logic, store data, and manage state.
• Each contract has a unique address, similar to EOAs, but its creation
involves deploying a contract code.
• Contract accounts do not have private keys. They are controlled by
their internal code logic.
• Contracts can receive ETH, but they can only send ETH if explicitly
programmed to do so.
Account Interaction
• A user with an EOA wants to interact with a DeFi application (a smart
contract).
• The user creates a transaction specifying the contract's address and
the function they wish to call (e.g., depositing ETH).
• The transaction is signed with the user’s private key and broadcast to
the network.
• Once mined and confirmed, the contract executes the specified
function, altering its internal state and possibly sending ETH back to
the user.
Ethereum Languages
Ethereum is a blockchain platform that allows developers to build decentralized
applications (dapps) using smart contracts.
There are several programming languages that can be used to write smart contracts on
the Ethereum platform, including:
Solidity: This is the most popular language for writing smart contracts on Ethereum. It is
a contract-oriented, high-level language that is designed to target the Ethereum Virtual
Machine (EVM). Solidity is similar to JavaScript in syntax and is easy to learn for
developers with a background in object-oriented programming.
Vyper: This is a contract-oriented, high-level language that is similar to Python in syntax.
It was developed by the Ethereum Foundation as an alternative to Solidity, with a focus
on security and simplicity.
Serpent: This is a contract-oriented, high-level language that is similar to Python in
syntax. It was one of the first languages supported by the Ethereum platform, but has
been largely superseded by Solidity and Vyper.
LLL (Low-Level Lisp-like Language): This is a low-level language that is designed to give
developers fine-grained control over the EVM. It is not commonly used for writing smart
contracts, but can be useful for optimizing certain parts of a contract.
In addition to these languages, there are also tools and frameworks available for building
dapps on Ethereum, such as Truffle, Embark, and Remix.
These tools can help developers write, test, and deploy smart contracts more easily.
Ethereum development tools
Here are some popular development tools for building decentralized applications (dApps) on the Ethereum blockchain:
1.Solidity: Solidity is the primary programming language used for developing smart contracts on the Ethereum
blockchain. It is a high-level, contract-oriented language that is similar to JavaScript and is designed to be easy to
learn and use.
2.Truffle: Truffle is a popular development framework for building, testing, and deploying dApps on the Ethereum
blockchain. It includes features such as automated contract testing, contract deployment, and application migration.
3.Remix: Remix is a browser-based IDE for developing smart contracts on the Ethereum blockchain. It provides a
user-friendly interface for writing, testing, and deploying Solidity contracts.
4.Ganache: Ganache is a local blockchain development tool that allows developers to create a private Ethereum
blockchain for testing and development purposes. It provides features such as real-time contract testing, contract
debugging, and transaction tracing.
5.Web3.js: Web3.js is a JavaScript library that allows developers to interact with the Ethereum blockchain and build
dApps that can be run in a web browser. It provides a set of APIs for reading and writing data to the blockchain,
managing user accounts, and executing transactions.
6.Infura: Infura is a cloud-based infrastructure provider that allows developers to connect to the Ethereum blockchain
without running a full node. It provides a set of APIs that allow developers to access the Ethereum blockchain,
including reading and writing data to the blockchain, managing user accounts, and executing transactions.
These are just a few of the many development tools available for building dApps on the Ethereum blockchain.
Depending on your specific needs, you may find other tools that better suit your project.

You might also like