0% found this document useful (0 votes)
14 views22 pages

ETHEREUM

Study Material

Uploaded by

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

ETHEREUM

Study Material

Uploaded by

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

CRYPTOCURRENCY AND

BLOCKCHAIN TECHNOLOGIES

ETHEREUM
Ethereum Overview:
 Overview :
 Vitalik Buterin, a programmer, proposed Ethereum in 2013. The network went live in 2015, with
an initial supply of 72 million coins, after being crowdfunded in 2014.
 The Ethereum Virtual Machine (EVM) can run decentralized programs and execute scripts.
Ethereum is used for decentralized banking, the production and distribution of non-fungible tokens
(NFTs), and many ICOs.
 Ethereum, on the other hand, refers to itself as a decentralized computer network based on block
chain technologies. Ethereum is built on top of a block chain network. A block chain is a
transparent, distributed public ledger that verifies and records all transactions.
 The Ethereum network allows users to build and run apps, smart contracts, and other transactions.
These features are not available in Bitcoin.
 It is only used as a medium of exchange and a store of cash. There is no boundary on how much
Ether tokens can be produced while Bitcoin can only deliver 21 million coins.
 The Ethereum Virtual Machine (EVM) is run by Ethereum clients, which may be built in any
popular programming language.
Ethereum:
 Ethereum is a decentralized, open-source block chain with smart contract functionality.
 Ether is the native cryptocurrency of the platform.
 Among cryptocurrencies, ether is second only to bitcoin in market capitalization.
 Ethereum was conceived in 2013 by programmer Vitalik Buterin.
 Smart contracts allow participants to transact with each other without a trusted central authority.
 Transaction records are immutable, verifiable, and securely distributed across the network, giving
participants full ownership and visibility into transaction data.
 Transactions are sent from and received by user-created Ethereum accounts.
 A sender must sign transactions and spend Ether, Ethereum's native cryptocurrency, as a cost of
processing transactions on the network.
Ethereum uses the proof-of-stake algorithm, where a network of participants called validators create
new blocks and work together to verify the information they contain. The blocks contain information
about the state of the block chain, a list of attestations (a validator's signature and vote on the validity of
the block), transactions, and much more.
What is a dApp?
Decentralized applications (dApps) are one of several paths to bring back users’ data liberty
out of centralized control. Hence, instead of reaching a centralized server, your requests actually
contact the Block chain for information. dApps are the apps only, without centralized control.
App = Frontend + Backend → Hosted on Centralized Network Servers.
DApp = Frontend + Backend + Smart Contracts → Hosted on Block chain.
Smart contracts help to encode the regulations and conditions of the decentralized application. It
works along with the Backend of the application. Usually, smart contracts are programmed in
solidity language and executed by Ethereum Virtual Machine (EVM).

How Does a dApp Work?


 dApps interact with users on mobile or browser like a normal app or website. Users can also connect
or log in via wallet to access the application. The dApp hosts on the block chain network. The source
code is available for verification to each node in the network.
 The front end of the application is written in HTML, CSS, JS, etc. Backend is written in JS or
Python, usually interacting with smart contracts and Block chain. Moreover, frameworks like NodeJS
and Web3 or Django help to create the Backend.
Benefits of dApps:
Following are the advantages of Decentralized Applications (dApps):
 Data integrity and Privacy
 Censorship Resistant: Nobody is authorized to control the application’s actions. Hence,
equality and decentralization.
 No Downtime: As the whole network is decentralized, no one or central point of failure.
 Open-Source and Permission less
 Provides incentives for valuable reviews and building reputation
 No third-party trust
Limitations of dApps:
Following are the disadvantages of Decentralized Applications (dApps):
 Decentralization might affect the User experience and maintenance as no single entity is
responsible.
 Once a smart contract is deployed on the Block chain, it can’t be altered.
 dApp can lead to network congestion due to heavy computation.
 Performance overhead
 Scalability issues
Examples of dApps:
Following are a few of the application examples of dApps:
 Augur: A decentralized prediction marketplace based on Ethereum
 Bit Torrent: A decentralized file-sharing application
 Golem: A decentralized marketplace for renting computational power and resources
.
Cryptokitties: A decentralized game application
 Minds: A decentralized social media platform between content creators and consumers
Components of Ethereum Network:
Component-1:
Nodes-
There are two types of nodes in an Ethereum network. They are as follows
1.Mining Node –
These nodes are responsible for writing all the transactions that have occurred in the Ethereum
network in the block.
2.Ethereum Virtual Machine Node –
These are the nodes in the Ethereum network in which Smart Contracts (it is a type of
contract between supporter and developer in which there are a set of rules based on which
both the parties agree to interact with each other. The agreement will be automatically
executed when the pre-defined rules are met.) are implemented. By default, this node
utilizes a 30303 port number for the purpose of communication among themselves
Component-2:
Ether –
 Ether is a type of cryptocurrency used in the Ethereum network just like a bitcoin is used in
a block chain network. It is a peer-to-peer currency, similar to Bitcoin. It tracks and
promotes each transaction in the network.
 It is the second-largest cryptocurrency in the world. The first one is Bitcoin. Other
cryptocurrencies can be used to get ether tokens, but vice versa is not true.
 It means that ether tokens can’t be interchanged by other cryptocurrencies to render
computing power for Ethereum transactions. Ether is paid as a commission for any
execution that affects the state in Ethereum.
 It is used in the Ethereum algorithm as an incentive for miners who connect blocks to the
block chain using a proof-of-work method.
 It is the only currency that can be used to pay transaction costs, which go to miners as well.
The block reward, as well as transaction fees, provide miners with an opportunity to keep
the block chain rising.
 Aside from paying for transactions, ether is often used to purchase gas, which is used to pay
for the computation of any transaction on the Ethereum network.
Component-3 :
Gas –
 Gas is an internal currency of the Ethereum network. We need gas to run applications on the
Ethereum network, much as we need gas to run a vehicle.
 To complete every transaction on the Ethereum network, a consumer must first make a payment—
send out ethers—and the intermediate monetary value is known as gas.
 Gas is a unit of measurement on the Ethereum network for the computing power used to execute a
smart contract or a transaction.
 The price of gas is very low compared to Ether. The execution and resource utilization costs are
predetermined in Ethereum in terms of Gas units, called gwei
Component-4 :
Ethereum Accounts –
There are two types of Ethereum accounts. They are as follows.
 Externally owned account –
These accounts are used to store transactions.
 Contract account –
As the name itself suggests, these accounts store the details of Smart Contracts
Component-5 :
Nonce –
For externally owned accounts, nonce means the number of transactions via this account. For
a contract account, nonce means the number of contracts generated via this account.

Component-6 :
Storage Root –
It is the main root node of a Merkle tree. Hash of all details of the account is stored here.
The root of the Merkle tree is the verification of all transactions
Component-7:
Ethash-
The intended Pow algorithm for Ethereum 1.0 is Ethash. It’s the most recent version of
Dagger-Hashimoto, however, it’s no longer proper to call it that because many of the algorithms’
initial characteristics have been dramatically altered in the previous month of study and
development. The original version may be found here.
Algorithm:
The algorithm follows the following general path as follows.
1. There is a seed for each block that may be determined by reading over the block headers till that
point.
2. A 16 MB pseudo-random cache may be computed from the seed. The cache is saved by light
clients.
3. We can construct a 1 GB dataset from the cache, with the condition that each item in the dataset
is dependent on just a few cache items. The dataset is stored by full clients and miners. The
dataset expands linearly over time.
4. Taking random slices of the dataset and hashing them together is what mining is all about.
Verification may be done with little memory by utilizing the cache to renew just the parts of the
dataset that you require, requiring just the cache to be stored.
What are smart contracts?
 Smart contracts are simply computer programs living on the Ethereum block chain.
 They only execute when triggered by a transaction from a user (or another contract).
 They make Ethereum very flexible in what it can do and distinguish it from other
cryptocurrencies. These programs are what we now call decentralized apps, or dapps.
 Have you ever used a product that changed its terms of service? Or removed a feature you found
useful?
 Once a smart contract is published to Ethereum, it will be online and operational for as long as
Ethereum exists. Not even the author can take it down. Since smart contracts are automated,
they do not discriminate against any user and are always ready to use.
 Popular examples of smart contracts are lending apps, decentralized trading exchanges,
insurance, crowdfunding apps - basically anything you can think of.
A smart contract includes an automatically-executable program of the business logic or
requirement mentioned. It follows if-then statements. If a particular condition is true, then do a
specific operation. The smart contract programs are executed by Ethereum Virtual Machine
(EVM). Once the program gets executed, the action will be taken automatically as defined in the
contract.
 On a prepaid order, the payment by the customer goes to an escrow account.
 The payment will not be transferred to the vendor until the customer gets their order.
 Once the customer receives the order, the payment automatically transacts to the vendor.
 If the order does not deliver, the payment goes back to the customer after a specific number
of days.
Features of Smart contract:
 Self-executable code
 Deployed on Block chain networks like Ethereum
 Follows IF-THEN conditions for contract
 Irreversible, can’t alter later
 Traceable and Transparent
 An Agreement between Buyer and Seller
 Secure and Reliable

How does Smart Contract work?


Following are the steps to run an Ethereum smart contract:
 Contract deal between buyer (party A) and the seller (party B).
 A developer writes the smart contract in the solidity programming language.
 Solidity code (converted into) → Opcodes (compiles into) → Byte code
 Byte code (low-level machine language) saved by Ethereum Virtual Machine (EVM).
 Miners convert the smart contract into a new block to add to the Ethereum block chain network.
 When the conditions meet, the contract automatically executes. Hence, payment release to the
seller (party B).
 Verification of payment transaction
Benefits of Smart contracts:
Following are the advantages of Ethereum-based Smart Contracts:
 Smart contracts are automatically executable programs.
 It removes the need for middle parties or intermediaries. Hence, it eliminates the risk of
manipulation and cost-cutting.
 No fear of data loss as the contract has multiple copies shared across the block chain
network.
 Impressions of digital signing and cryptography ensure the safety and authenticity of the
contract.
 Saves time and effort in producing real business contracts.
 Eliminate manual human errors while filling out forms.
Limitations of Smart contracts:
Following are the disadvantages of Ethereum-based Smart Contracts:
 Once the smart contract code is deployed, it’s impossible to alter it.
 There are possibilities of loopholes in the contract
 Not a complete elimination of intermediaries as developers require them to establish rules
for smart contact.
 Not legally binded yet. No approval by any jurisdiction.
Ether in Ethereum:
What Is Ether?
 Ether is the second-largest cryptocurrency and handles more transaction volume than any other
digital asset.
 Ether (ETH) is the main token of the Ethereum block chain and the world’s second-largest
cryptocurrency by market capitalization. Just like the largest cryptocurrency, bitcoin, ether can
be used to send payments directly to another person without the need for an intermediary such as
a bank.
 The long-term vision for Ethereum is to power more than just financial transactions. Software
developers are able to build applications on Ethereum, ranging from decentralized platforms for
lending money to social media networks.
 For any Ethereum-based app, ether acts as the primary "fuel.” Any activity on the block chain
requires an amount of ether to power it, also known as "gas."
In Ethereum, ether can be used for the following things:

1.Payments:
Like bitcoin, ether can be used for payments. Users can send ether to another user and,
just like cash, the payment doesn’t require a third party to process or approve it.

2.Powering decentralized applications:


Ether is required in order to use decentralized apps (dapps) built on Ethereum, from
staking ERC-20 tokens for yield farming to completing functions such as governance voting.
3.Transactions fees:
Every Ethereum action – from payments to using dapps – requires a fee.
What is Ethereum Client?
An Ethereum client is a software program that is used to implement the Ethereum
specification and connect itself with other Ethereum clients over a peer-to-peer network. Different
Ethereum clients can communicate with one another if they follow the reference specification and the
defined communication protocols. 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 (Rust), Nethermind (C#, .NET), Besu (Java), Erigon
(Go/Multi).
 The yellow paper is the Ethereum protocol that allows anybody to run a client to construct a node.
 The formal requirements that comprise Ethereum distinguish the block chain from Bitcoin.
Whereas Ethereum sets standard behaviors that all Ethereum clients must adhere to, Bitcoin Core
does not. Ethereum’s specs enabled the block chain to allow for different, but interoperable,
software implementations of an Ethereum client by providing standard documentation and simple
language.
Types of Ethereum Clients:

There are 3 types of Ethereum Clients:


1. Full Client: Full clients save the complete Ethereum block chain, which might take several
days to synchronize and takes a massive amount of disc space – more than 1 Terabyte, according
to the most recent estimates. Full clients enable connected nodes to conduct all network functions,
including as mining, transaction and block-header validation, and smart contract execution.
2. Light Client: Ethereum clients do not always need to necessary keep all of the data, so often,
when data storage and performance are concerns, developers utilize the “light clients”. Light
clients provide a portion of full client capability. Because light clients do not keep the entire
Ethereum block chain, as a result, they can provide quick delivery and free up data storage space.
The functionality of a light client is adapted to the purposes of the Ethereum client:
 Light clients, for example, are widely used within wallets to maintain private keys and Ethereum
addresses.
 They also manage smart contract interactions and transaction broadcasts.
 Light clients are also useful for web3 instances within JavaScript objects, Dapp browsers, and
obtaining the exchange rate data.
Ethereum Virtual Machine:
 The Ethereum Virtual Machine or EVM is a piece of software that executes smart
contracts and computes the state of the Ethereum network after each new block is added
to the chain.
 The EVM sits on top of Ethereum's hardware and node network layer. Its main purpose is to
compute the network's state and to run and compile various types of smart contract code into a
readable format called 'Bytecode.'
 This makes it possible for smart contracts deployed on EVM-compatible chains like Polygon or
Avalanche to be recognized by Ethereum nodes, and allows developers to port their dapps or
tokens over from Ethereum to other EVM-compatible chains with relative ease.
What Is an Ethereum Virtual Machine (EVM)?
 Ethereum Virtual Machine (EVM) is a computation engine which acts like a decentralized
computer that has millions of executable projects.
 It acts as the virtual machine which is the bedrock of Ethereum’s entire operating structure
 It is considered to be the part of the Ethereum that runs execution and smart contract deployment.
 The role of the EVM is to deploy a number of extra functionalities to the Block chain to ensure
users face limited issues on the distributed ledger.
 Every Ethereum node runs on the EVM to maintain consensus across the block chain.
 Ethereum facilitates something called smart contracts, a piece of code that is running on Ethereum.
 EVM is completely isolated meaning the code inside the EVM has no access to network, file system
or other processes.
 Ethereum has two types of accounts: Externally Owned Accounts (EOA) and Contract Accounts,
both of which are treated equally under the EVM.
 Account abstraction tries to reduce this to just one account meaning both EOAs and Contract
Accounts function like each other.
 EOAs are controlled by private keys, meanwhile contract accounts are stored in the smart
contracts, also known as smart wallets.
 A contract which is written in the smart-contract coding is converted into something called a
bytecode.
 Most of the source code for using smart contracts is done using programming language from
Solidity.
 It is then converted into opcodes for the EVM to interpret.
 The EVM then uses the operation codes in order to complete certain tasks.
 So, the EVM works like a large decentralized or master computer to complete all types of
tasks on the block chain.
 EVM is one of the biggest projects in the world of cryptocurrencies.

You might also like