0% found this document useful (0 votes)
21 views15 pages

Ethereum

Uploaded by

Andreea Daniela
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)
21 views15 pages

Ethereum

Uploaded by

Andreea Daniela
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/ 15

PROOF OF WORK

The system that is used to ensure that all copies of the blockchain are intact and as identical as possible
and therefore give an unambiguous presentation of the state of the blockchain is the proof of work.
In the absence of a master copy the problem of maintaining the integrity of all copies is quite difficult.

The concept behind proof of work can be found in Fiat currency, i.e. the money we use every day.
Fiat money is money that is accepted by force of law and its value is linked to trust in the authority that
issues it. Usually, it is the state or the central bank that with its authority imposes the use and validity of
a currency. The opposite of fiat money is commodity money, whose value is linked to the price of the
raw material, such as gold or silver, from which it was created.
FIAT CURRENCY
For example, the inscription on English banknotes, “I promise to pay the bearer on
demand the sum of 50 Pounds”.

This sentence might seem to


imply that there is a collateral in
gold, which guarantees these 50
pounds, this implies that for every
note delivered we can redeem a
The creation of money is the responsibility of the
gold consideration.
conventional banks, and occurs when a loan is made,
This correspondence between the required sum is created from nothing. There are
coins and gold does not exist, this limits and criteria, but in simple terms, to meet a new
correspondence, which is called debt, circulating money is created.
the Gold Standard, was abolished
by the US government during the
Vietnam war.
In this way the presence of circulating money is related to the growing economy. The role of the ECB is
to control the cost of money and the interest rate.
This implies that in order to lower the interest rate and facilitate the economy more money should be
created. But it cannot be lowered more than a certain limit, so in order to bring this down,
government bonds will be bought to create new money.

Common examples
of fiat money are the
British Pound, the
Euro and the US
Dollar.

When analysing a banknote, we realise that it takes a lot of work to create it, which makes it
difficult to counterfeit, so that the derived object is readily verifiable. This is what happens with
banknotes; we can immediately recognise a banknote at a glance, whereas making a banknote is a
labour-intensive process, as it has holograms, watermarks and lettering that make it unmistakable
and reliable.
PROOF OF WORK Returning to proof of work, an example of the
application of proof of work is the Hashcash protocol (
https://it.wikipedia.org/wiki/Hashcash ) used in e-mail to
counter spam.
Spammers use pre-packaged emails that contain
advertisements. Sending e-mails actually costs nothing,
so sending one message or sending a million actually
costs the same.

A common email message consists of the TO field which


specifies the recipient, the FROM field which identifies
the sender, the subject which identifies the subject of
the message and the body which contains the text of the
message.
The hashcash protocol adds other fields to the email. A
POW field and a RANDOM field. The content of the
message composed of TO, FROM, SUBJECT and BODY
constitute a digital document, therefore a string of bits,
to this string we can add a random element (RANDOM),
of the whole we apply a hash function for example SHA-
256 to obtain a string that represents the hash of our
message and the random amount, which will be written
on the POW field.

The objective of the work trial is to obtain a POW


starting with a certain number of zeros e.g. 5. The larger
the number of zeros required, the more work and the
number of attempts to obtain them. All attempts differ
only by the RANDOM field which will vary until the POW
meets the chosen condition. This iteration takes time.
If we consider two messages with the same from, subject and body but with different to, then
the same message but with different recipients, to obtain a valid POW I will have to make a
number of iterations for each different recipient. Consequently, sending many messages
becomes very expensive.
In the blockchain the concept is the same. A block is a digital document that contains smaller digital
documents that are the transactions and finally contains the proof of work that corresponds to the
block identifier itself and has the characteristic of starting with a certain number of zeros. This process
ensures that the person who generated the block will have performed a number of iterations to find a
hash that meets the requirements, and will therefore have performed a proof of work.
If transactions were simply entered without proof of work, this would create different copies of
the blockchain with inconsistencies, making it difficult to guarantee the integrity of the
blockchain as a payment ledger. This system by slowing down the insertion of new blocks ensures
the integrity of the blockchain. Incentive to build blocks and insert them into the blockchain is
given by the creation of new bitcoins which goes to the miner who performs the job faster.

Through the consensus protocol the set of nodes determine that the block is indeed valid and
therefore deserves to be inserted into the blockchain.
ETHEREUM
Ethereum (https://ethereum.org/ ) is a particular Blockchain, an ecosystem that serves to create
decentralised Dapps applications, unlike Bitcoin which aims to create an environment to perform digital
currency transactions without the need for intermediaries. Thus, Bitcoin opened up the world to
blockchain technology, rather Ethereum aims to create applications in one big computer shared between
all nodes in the world. In Ethereum you can create your own cryptocurrency or games using Ethereum
data and smart contracts that regulate the exchange of transactions based on criteria defined within the
contract. All this is done using Solidity, a programming language for creating smart contracts. The
possibilities opened up by using Solidity are enormous and are beginning to spread to all areas of finance,
production and business. Knowing Solidity can give you a real professional advantage.

Ethereum, thanks to Solidity, gives the possibility to create Dapps, i.e. Distributed and Decentralised
Applications, which are created directly within the Ethereum ecosystem, so that all network participants
work on applications that are available within the network, but cannot be downloaded and used locally,
but are used in a shared way. This structure is considered as the application of the future Web 3.0, the
internet of Ethereum and blockchain.
ETHEREUM- CRYPTOCURRENCIES
Within the Ethereum system, there are two different types of cryptocurrency: one is called ETHER and the
second is called GAS.

ETHER is the external cryptocurrency of the Ethereum platform:


 Every activity that changes the state of the network has a transaction fee to be paid in ETHER.
 Unlike Bitcoin, there is no limit to the amount of Ether that can be released.
 Miners who contribute to the recording of blockchain transactions are rewarded in ETHER.
 Each ETHER is worth 1*10^18 Wei, where Wei is the smallest unit of ETHER.
 ETHERs can be bought and traded like a normal currency with other real currencies (Dollar, Pound, Euro)
or other cryptocurrencies.

GAS is the internal cryptocurrency of the Ethereum ecosystem:


 It cannot be exchanged for real currency but only for ETHER.
 The price of GAS varies in the opposite direction to the price of ETHER: when the value of ETHER goes
up, the value of GAS goes down and vice versa.
 GAS is a currency designed for developers of the Ethereum network.
 Every action on Smart Contracts, such as invoking a function, costs a fee paid in GAS.
The reason we need two cryptocurrencies is shown in this example:

Suppose we want to distribute a smart contract and the cost of distribution is 1 ETHER (in reality the cost is a few cents
of ETHER).
If only ETHER existed:
on February 1, 1 ETHER = 1000€ => you would spend 1000€ on distribution.
on March 1st 1 ETHER = 2000€ => 2000€ would be spent on distribution
on 1 April 1 ETHER = 500€ => you would spend 500€ on distribution.
Therefore, to distribute my contract in three different months I have spent three different amounts. This is
counterproductive for the development of the Ethereum eco-system, because a developer would be disincentivised, as
he would have to wait for the ETHER price to decrease in order to distribute his contract.

Using the GAS we can say that the distribution of a Smart Contract would cost 1 GAS and not 1 ETHER therefore.
With existence of GAS:
at 1 February 1 ETHER = 1000€ and 1 GAS = 1 ETHER => you would spend 1000€.
on 1 March 1 ETHER = 2000€ and 1 GAS = 0.5 ETHER => you would spend 1000€.
on 1 April 1 ETHER = 500€ and 1 GAS = 2 ETHER => you would spend 1000€.

Therefore, regardless of the period and the fluctuations in the money market to which ETHER is subject, the price for
distribution is always €1000.
Therefore, the GAS serves as an incentive for developers to work on Ethereum with the
certainty of a fixed cost of use.

At the URL https://ethgasstation.info/calculatorTxV.php it is possible to calculate the


conversion rate between ETHER and GAS.

On the left is an amount 21000 Gas which is


generally the fee to be paid to invoke a
function of a Smart contract. On the right you
can see that under Transaction fee (ETH) you
see the value in ETHER and under Transaction
fee (Fiat) you see the value in dollars which in
this case is 11 cents on the dollar.
NODES ON ETHEREUM
When we talk about Ethereum nodes we refer to a computer connected to the Ethereum network. There are
two types of nodes: EVM (Ethereum Virtual Machine) nodes and Mining nodes. Each node can be either a
miner or an EVM, there is no a priori distinction.

EVM nodes provide the structure to execute the code written in Smart Contracts, after being compiled by the
Solidity compiler. Thus, they can be considered as the execution engine of the Ethereum Network. The task of
an EVM node is to read and execute the instructions of the smart controller line by line.

The miner node has the task of writing the transactions that take place in the network within the blockchain. To
acquire the right to record a transaction, the miners compete with each other to solve a mathematical puzzle
using the computing power of their computers. Whoever solves the mathematical puzzle first has the right to
record the transaction and is rewarded with the transaction fee in fractions of Ether for his/her work, which he
can convert into currency (Dollars, Euros, etc.).
ACCOUNTS

Besides the internal nodes of the network there are other types of entities that can interact with Ethereum
defined by the following accounts:

Externally owned accounts: these are the accounts owned by normal people who join the network, each
account has a public key and a private key. Each account has a public key and a private key. All users can see
the public key, which in fact identifies the account on the network (but is still anonymous). The private key is
owned and known only by the account owner and is used when performing a transaction on the network. It is
not recoverable, so if you lose it, you also lose your account with the entire Ether balance.

Contract accounts: These accounts contain Smart Contracts with all their constructs (methods, attributes,
etc). They possess only the public key to identify them within the network. They do not have a private key.
READ MORE

• https://www.investopedia.com/tech/how-does-bitcoin-mining-work/#:~:text=
By%20mining%2C%20you%20can%20earn,are%20added%20to%20the%2
0blockchain
.
• https://www.researchgate.net/publication/318850089_A_Relative_Study_on_
Bitcoin_Mining
• https://ethereum.org/en/
• https://www.ig.com/en/glossary-trading-terms/fiat-currency-definition

You might also like