UNIT 3 Ethereum
UNIT 3 Ethereum
Ethereum
Ethereum is a blockchain platform with its own cryptocurrency, called Ether (ETH) or
Ethereum, and its own programming language, called Solidity.
Our “Ethereum Explained” Ethereum tutorial video lays it all out for you, and
here we’ll cover what’s discussed in the video.
Ethereum
Ethereum Features
the architecture and the software—that understands smart contracts and allows
you to interact with it.
These are the essential features of Ethereum and before going deep into the Ethereum
tutorial, let’s discuss each of these features in more detail.
Ether
Also, if you want to deploy a contract on Ethereum, you will need gas, and you
would have to pay for that gas in ether. So gas 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.
Smart Contracts
The verification process for the smart contracts is carried out by anonymous
parties of the network without the need for a centralized authority, and that’s what
makes any smart contract execution on Ethereum a decentralized execution.
In conventional contract systems, you sign an agreement, then you trust and
hire a third party for its execution. The problem is that in this type of process, data
tampering is possible. With smart contracts, the agreement is coded in a program.
A centralized authority does not verify the result; it is confirmed by the participants
on the Ethereum blockchainbased network. Once a contract is executed, the
transaction is registered and cannot be altered or tampered, so it removes the risk
of any data manipulation or alteration.
Let’s take an example in which someone named Zack has given a contract
of $500 to someone named Elsa for developing his company’s website. The
developers code the agreement of the smart contract using Ethereum’s
programming language. The smart contract has all the conditions (requirements)
for building the website. Once the code is written, it is uploaded and deployed on
the Ethereum Virtual Machine (EVM).
paid to Elsa in ether. Zack’s account will be automatically debited, and Elsa will
be credited with $500 in ether.
converted into the bytecode and gets deployed on the EVM. And thereby EVM
guarantees security from cyberattacks.
a) Working of EVM
Suppose person A wants to pay person B 10 ethers. The transaction will be sent
to the EVM using a smart contract for a fund transfer from A to B. To validate the
transaction; the Ethereum network will perform the proof-of-work consensus
algorithm.
b) Proof of Work
• The history of the smart contract, which is the address at which the smart contract
is deployed, along with the transactions associated with the smart contract
The goal of the miners on the Ethereum network is to validate the blocks.
For each block of a transaction, miners use their computational power and resources
to get the appropriate hash value by varying the nonce. The miners will vary the
nonce and pass it through a hashing algorithm—in Ethereum, it is the Ethash
algorithm.
SITB3011 BLOCKCHAIN TECHNOLOGIES– UNIT 3
This produces a hash value that should be less than the predefined target as
per the proof-of-work consensus. If the hash value generated is less than the target
value, then the block is considered to be verified, and the miner gets rewarded.
When the proof of work is solved, the result is broadcast and shared with all
the other nodes to update their ledger. If other nodes accept the hashed block as
valid, then the block gets added to the Ethereum main blockchain, and as a result,
the miner receives a reward, which as of today stands at three ethers. Plus the miner
gets the transaction fees that have been generated for verifying the block.
All the transactions that are aggregated in the block— the cumulative transaction
fees associated with all the transactions are also given as a reward to the miner.
c) Proof of Stake
d) Gas
Just like we need fuel to run a car, we need gas to run applications on the
Ethereum network. To perform any transaction within the Ethereum network, a user
has to make a payment—shell out ethers—to get a transaction done, and the
intermediary monetary value is called gas. On the Ethereum network, gas is a unit
that measures the computational power required to run a smart contract or a
transaction. So, if you have to do a transaction that updates the blockchain, you
would have to shell outgas, and that gas costs ethers.
SITB3011 BLOCKCHAIN TECHNOLOGIES– UNIT 3
To understand the gas limit and the gas price, let’s consider an example using
a car. Suppose your vehicle has a mileage of 10 kilometers per liter and the amount
of petrol is $1 per liter. Then driving a car for 50 kilometers would cost you five
liters of petrol, which is worth $5. Similarly, to perform an operation or to run code
on Ethereum, you need to obtain a certain amount of gas, like petrol, and the gas has
a per-unit price, called gas price.
If the user provides less than the amount of gas to run a particular operation,
then the process will fail, and the user will be given the message “out of gas.” And
Gwei, as noted above, is the lowest denomination of ether used for measuring a unit
of a gas price.
The hashing algorithm is the primary difference between Ethereum mining and
Bitcoin mining.
Bitcoin uses SHA-256, and Ethereum uses Ethash. The average time taken
on Bitcoin for mining a block is 10 minutes, whereas on Ethereum it is 12 to 15
seconds. As of today, the mining reward for Bitcoin is 12.5 bitcoins; for Ethereum
it’s three ethers plus the transaction fee—the cumulative transaction fees of all the
transactions of a block. As of April 10, 2019, the value of 1 bitcoin is $5249.03,
whereas one ether is $180.89.
Bitcoin Ethereum
Below is a screenshot of an Ethereum reward that has been given to the miner
of the block. As you can see, the reward is three ethers plus the total accumulated
transaction fees of all the underlying transactions in this block, which are 0.0666
ethers.
It’s a simple process: your front end executes the backend API, and the API goes and
fetches your data from a centralized database.
SITB3011 BLOCKCHAIN TECHNOLOGIES– UNIT 3
Here’s how it works. People add funds through the DAO because the DAO
requires funding in order to execute and make decisions. Based on that, each member
is given a token that represents that person’s percentage of shares in the DAO. Those
tokens are used to vote in the DAO, and the proposal status is decided based on the
maximum votes. Every decision within the organization has to go through this voting
process.
Voting Systems
As we’ve seen with DAO, voting systems are adopting Ethereum. The results of
polls are publicly available, ensuring a transparent and fair democratic process by
eliminating voting malpractices.
Banking Systems
Shipping
Deploying Ethereum in shipping helps with the tracking of cargo and prevents
goods from being misplaced or counterfeited. Ethereum provides the provenance
and tracking framework for any asset required in a typical supply chain.
SITB3011 BLOCKCHAIN TECHNOLOGIES– UNIT 3
Agreements
Now, as we have understood the concept of consensus mechanism, let’s start discussing with
Proof-of-Work (PoW) consensus.
Moreover, a person with enough money to invest can purchase an insane amount of
coins, thereby reducing the decentralization of the system.
Hybrid PoW/PoS consensus mechanisms utilize elements of both PoW and PoS
models when determining transaction validation rights, and for doing so, hybrid aims to
mitigate the weaknesses of each consensus mechanism.
Decred is the most notable project to utilize both the consensus mechanisms (PoW
& PoS) in recognizable forms and merge them together to produce a hybrid consensus
mechanism. It is a governance-focused cryptocurrency that utilizes neither solely the 1
CPU = 1 vote of PoW nor the ‘1 token = 1 vote’ of a PoS consensus. Instead, it opts for
a hybrid approach where transactions on the Decred network are validated through a
hybrid of both the consensus mechanisms.
A hybrid consensus starts with having PoW miners to create new blocks
containing transactions to be added to the blockchain. Once these blocks are created,
PoS miners decide whether to confirm them or not. PoS miners purchase votes by
staking a portion of their tokens. However, instead of examining the total vote count,
the hybrid PoW/PoS mechanism
randomly chooses 5 ‘votes’ to determine the efficacy of the newly created block; if 3 of
the 5 chosen votes are affirmative, the block is added to the blockchain. In exchange for
these services, PoW miners receive 60% of the block reward, PoS miners receive 30%,
and the remaining 10% is dedicated to developmental efforts.
It is clear that consensus algorithms make the nature of the blockchain networks
versatile. But it is not a single consensus algorithm that can claim it to be perfect. There
are various other consensus mechanisms such as Proof of Activity, Proof-of-Burn,
Proof-ofWeight, amongst others.
Blockchain Diagram: Only when the transaction is verified and validated, values can be transferredto
another place.
Whenever a blockchain is introduced to a new blockchain transaction or any new block is tobe
added to the blockchain, in general, numerous nodes within the same blockchain
1
implementation are required to execute algorithms to evaluate, verify and process the history
of the blockchain block. If most of the nodes authenticate the history and signature of the block,
the new block of blockchain transaction is accepted into the ledger and the new block
containing data is added to the blockchain. If a consensus is not achieved, the block is denied
being added to the blockchain. This distributed consensus model allows blockchains to function
as a distributed ledger without requiring any central or unifying authority to validate the
blockchain transactions. Thus, the blockchain transaction is extremely secure.
Blockchain Architecture
When we investigate the DNA of blockchain architecture for a better understanding, we
need to analyze several aspects that contribute to this disruptive technological marvel. Howdoes
blockchain work? These aspects include the blockchain platform, nodes, transactions that
makeup blocks, security implementations, and the process of adding new blocks to the chain.
The blockchain architecture is undoubtedly complex, but once you get a hold of it you will get
acquainted with the same.
2
cryptographic hashes and digital signatures to ensure the integrity of transactions. Once
authenticated, these blockchain transactions are considered successful and irreversible.
Transactions rely a lot on hash values and hash functions. These hash functions are
mathematical processes that take input data of any size, perform required operations on it, and
return the output data of a fixed size. These functions can be used to take a string of any length
as input and return a sequence of letters of a fixed length. This functionality of hash functions
makes them apt for transaction processing. Regardless of the size of transactions, the final
output will always be fixed and untampered.
After coming across the term ‘hashing’ these many times, it has become a matter of innate
necessity for us to understand what hashing depicts. Also, let’s shed some light on the
‘identity’ of blocks. Under the hood of blockchains, hashing is necessarily a process that helps
differentiate between blocks. The process of hashing gives blocks in a blockchain a unique
identity. Technically, blocks in a blockchain are identified by their hash, which serves the
purposes of both identification and integrity verification. An identification string that also
provides its own integrity is called a self-certifying identifier. The hashing functions generate
public keys. Here’s an example pertaining to hashing for a bitcoin blockchain. Bitcoin uses
SHA-256 hash function that produces a hash code of size 256 bits or 32 bytes.
3
makes it impossible to reconstruct the original message. Hacking, therefore, is a distant dream
with hash functions.
Cryptographic Keys and Digital Signatures
As the information on the blockchain is transferred over peer-to-peer (P2P) networks
across the globe, cryptographic keys are incorporated to send data throughout the network
without compromising the safety and integrity. These keys not only allow blockchains to
respect the privacy of users but also uphold the ownership of assets and secure the information
of blocks in the network. Cryptography is applied throughout the entire blockchain onto all the
information that is stored and transacted. This provides users with cryptographic proof that
serves as the basis for trusting the legitimacy of a user’s claim to an asset on the blockchain.
Cryptographic hashes also help a great deal as they ensure that even the smallest change to a
transaction will result in a different hash value being computed, which will eventually indicate
a clear change in the transactional history. While cryptographic keys are necessary for safety
and integrity, digital signatures provide verification and authentication of ownership on the
blockchain. Using cryptographic digital signatures, a user can sign a transaction proving the
ownership of that asset and anyone on the blockchain can digitally verify the identity to be true.
Blockchain Nodes
In simple terms, every participant in a blockchain network is a node. Being a
decentralized network where a central authority is absent, there is great value for blockchain
nodes. There exist several types of blockchain nodes, and each of them requires specific
hardware configurations to get hosted or connected. Basically, there are two types of nodes:
full nodes and lightweight nodes. These types comprise a constellation of a variety of nodes
that are grouped under them.
4
send and private transactions. When making decisions for the future of a network, full nodes
are the ones that vote on proposals.
Pruned Full Nodes: The specific characteristic here is that these nodes begin to download
blocks from the beginning, and once they reach the set limit, the oldest ones are deleted,
retaining only their headers and chain placement.
Archival Full Nodes: These are what most people refer to when they talk about full nodes.
These nodes envision a server that hosts the full Blockchain in its database.
Compared to full nodes, Master nodes themselves cannot add blocks to the blockchain. Their
only purpose is to keep a record of transactions and validate them. Whether Mining or
Staking nodes, they’re the ones who write blocks on the blockchain.
Lightweight or Simple Payment Verification (SPV) nodes, on the other hand, are used in
day-to-day cryptocurrency operations. These nodes communicate with the blockchain while
relying on full nodes to provide them with necessary sets of information. They do not store a
copy of the blockchain but only query the current status for the last block. Also, they broadcast
transactions to other nodes in the network for processing.
Blockchain Consensus
The set of rules by which a blockchain network operates and validates the information of blocks
is known as ‘consensus’.
5
is the 51% attack, where more than half of nodes are concentrated in one entity. This paves the
way for the entity to change consensus rules as it sees fit, which could lead to a monopoly.
Blockchain Proof of Work
A popular consensus mechanism for blockchains, Proof of Work is a requirement
through which expensive computations, also called mining, can be performed in order to
facilitate transactions on the blockchain. Although it might be hard for nodes to generate a valid
block, it is quite easy for the network to validate the block’s authenticity. This is achieved
through hash functions. Since hashes are quite sensitive to changes and even minute
modifications will result in a completely different hash output, they can be used to validate and
secure blocks.
6
process of sharding, a way of partitioning, blockchain miners can maintain a consistent
throughput throughout the network. Blockchain protocols, however, demand constant attention
for their efficient functioning.
7
• Lisk: A relatively new blockchain protocol, Lisk allows the development of decentralized
applications in pure JavaScript.
• BigchainDB: This open-source system starts with a big data distributed database and then
adds blockchain characteristics to the network including decentralized control and digital
asset transfers.
Blockchain Hashing
Hashing, or a hashing algorithm, is a one-way process that converts your input data of any size
into fixed-length enciphered data.
8
• Fixed length
• Unique
• One-way function
• Eg:- SHA256
Hash – Example -1
SHA 256
Input from:
person1 to:
person2
amount: 5000
Hash
A1BA93299F5836B8A58543CAD52B8818F0C95F12991635609B0F7CAAF6388A58
Hash – Example -1
SHA 256
Input from:
person1 to:
person2
amount: 5001
Hash
C677256A3CD1F73CD4476204BCA19050E0A11AB11FAEBF14CD7B37FB696F73C5
Characteristics of Hash Function
Ensure data integrity.
• Serve as a check-sum
• Hash digest changes completely when any of the email content gets modified after being
digitally signed
• Secure against unauthorized modifications.
• The smallest of changes to a message will result in the creation of an entirely new hash
value.
• Protect stored passwords
• Websites typically do is hash passwords to generate hash values.
• Operate at different speeds to suit different purposes.
9
• Different hash functions serve different purposes depending on their design and hash
speeds
Popular Hash Functions
Message Digest (MD) – MD5 128-bit
hash function.
provide assurance about integrity of transferred file. Secure
Hash Function (SHA)
160-bit hash function
Each block has the following key components: data, hash, previous hash and metadata
(timestamp, block number).
• Data in a block could be a simple string such as “Blockchain Data Structure” or a list of
transactions
• Hash is a unique identifier for a block and is analogous to a fingerprint for a human
• Previous Hash is the hash value of the previous block in the blockchain
• Metadata is information about the data; e.g., block number, timestamp, etc.
10
Figure 3.9 Blocks in a blockchain linked cryptographically through hash
Key properties of Secure Hash Algorithms (SHA)
SHA-256 used in Bitcoin is one of the examples of a cryptographic hashing algorithm. SHA-
256 always generates a 256-character hash value irrespective of the input data size.
Secure hash algorithms used in blockchain should have the following properties:
• Same hash value should always be generated for the same input
• Hash should be calculated from the data, but it shouldn’t be possible to derive data from the
hash
• Even a slight change in the data should change the hash value completely
• Algorithm should be able to compute the hash quickly
The same input data produces same hash but a single change completely changes the hash. The
result returned is the verifiable fingerprint. Bitcoin uses the SHA256 hash function that returns
a fixed 256-bit fingerprint.
11
Data integrity blockchain is distributed to all the peers in the blockchain network in real-time.
Blockchain solution looks for updates constantly and replicates the blockchain that is in
majority of the actor’s systems in the network.
The immutable nature of blockchain combined with its decentralized framework
ensures data integrity because it is extremely difficult to tamper with the data in the entire block
chain in majority of the systems in a blockchain within seconds especially when there are
numerous entities in the blockchain. The only possibility of a malicious actor being successful
in tampering block chain is when that actors has more computational power than the rest of the
blockchain network combined. This is called 51% attack.
Use of Cryptographic Hashes Proof-of-work
• Block contains transactions to be validated and previous hash value.
• Pick a nouce such that H(prev hash, nounce, Tx) < E. E is a variable that the system
specifies. Basically, this amounts to finding a hash value who’s leading bits are zero.
The work required is exponential in the number of zero bits required.
• Verification is easy. But proof-of-work is hard.
Merkle Tree
The concept was patented by Professor Ralph Merkle back in 1979. Now it helps to solve
problems in large decentralized networks.
• A Merkle tree is a data structure that is used for secure verification of data in a large content
pool.
• It is also efficient and consistent when it comes to verifying the data.
• Ethereum and Bitcoin both utilize Merkle Trees.
Problem in blockchain :
• Each data is copied among the nodes. So, it is a challenge to efficiently access data.
• The challenge is also to make a copy of the data and share it among nodes. On top of that,
the shared data needs to be verified for each of the receiving nodes.
Solution :
12
• Merkle Trees enable decentralized blockchains to share data, verify them, and make them
trustworthy.
• Merkle trees are data structure trees where the non-leaf node is defined as a hash value of
its respective child nodes.
The Merkle tree is inverted down where the leaf nodes are the lowest node.
At the core of Merkle trees, we need to learn three important terms. They are as below:
• Merkle Root
• Leaf Nodes
• Non-Leaf Nodes
• It is an upside-down tree
• The tree is capable of summarizing a whole set of transactions by itself. This means that
the user can verify if a transaction is part of the block or not.
13
Figure 3.13 Merkle Tree example
A hash is a result of converting a hash function. It is a function that converts an array of
input data of arbitrary length into an output string of a specified length in accordance with a
specific algorithm.
• To make Merkle trees work, hasing is used. It simply does the hashing pairs of nodes
repeatedly until only one hash value is left.
• The left hash value is known as Merkle Root or the Root Hash.
• The tree is created from the bottom up using the individual transactions hashes.
• The individual transaction hashes are also known as Transaction IDs.
• The leaf nodes are the nodes that contain transactional data hashes.
• In the case of the non-leaf nodes, they store the hash of the two previous hashes.
• Another important property of Merkle trees is that it is binary in nature.
• This means that it requires leaf nodes to be even for it works.
• In case, if there is an odd number of leaf nodes, it will simply duplicate the last hash and
make it even.
Merkle Tree of odd number of transections
14
Figure 3.14 : Merkle tree using four data blocks D0, D1, D2, and D3
• It is a data structure tree in which every leaf node labelled with the hash of a data block.
• A Merkle tree stores all the transactions in a block by producing a digital fingerprint of the
entire set of transactions.
• It allows the user to verify whether a transaction can be included in a block or not.
• Merkle trees are created by repeatedly calculating hashing pairs of nodes until there is only
one hash left.
• This hash is called the Merkle Root, or the Root Hash.
• The Merkle Trees are constructed in a bottom-up approach.
• Every leaf node is a hash of transactional data, and the non-leaf node is a hash of its
previous hashes.
• Merkle trees are in a binary tree, so it requires an even number of leaf nodes.
• If there is an odd number of transactions, the last hash will be duplicated once to create an
even number of leaf nodes.
15
Figure 3.15 : Merkle tree
• Merkle Root is stored in the block header. The block header is the part of the bitcoin block
which gets hash in the process of mining.
• It contains the hash of the last block, a Nonce, and the Root Hash of all the transactions in
the current block in a Merkle Tree.
• So having the Merkle root in block header makes the transaction tamper-proof.
• As this Root Hash includes the hashes of all the transactions within the block, these
transactions may result in saving the disk space.
• The Merkle Tree maintains the integrity of the data. If any single detail of transactions or
order of the transaction's changes, then these changes reflected in the hash of that
transaction.
• This change would cascade up the Merkle Tree to the Merkle Root, changing the value of
the Merkle root and thus invalidating the block.
16
• So everyone can see that Merkle tree allows for a quick and simple test of whether a
specific transaction is included in the set or not.
17
Figure 3.17 : blockchain sample transaction
Survey shows that financial and manufacturing use cases are facing more targeted
cyberattacks. According to an article in Fortune magazine, more than 4 million bitcoins are
missing. This number accounts for 17% to 23% of the total cryptocurrency, which worth more
than $8,500 each.
Blockchain has some other inherent properties that can provide additional security. Some of
the properties of Blockchain technology are:
1. Increased Capacity
The structure of the linked system of blockchain is more than capable of increasing the
capacity of an entire network.
2. Immutability
It means that once a transaction is done, it is impossible to erase it from the database.
3. Faster Settlements banking transactions take time, but blockchain transaction save lot of
time.
4. Encryption
Asymmetric-key algorithm and Hash function encryption.
5. Decentralization: collaborative manner.
‘51% Attacks’
Phishing
• Phishing is one of the most common hacking techniques.
• It can mimic the emails from trusted and reputed sources.
18
• These emails are sent to the owners of digital wallets, asking them to fill their personal
information on the fake links.
• As per a report of Chainalysis, more than $225 million were lost to phishing scams in
the first of 2017.
Sybil Attacks
• Sybil attacks involve the use of multiple fake identities.
• In other words, a single party can run a number of nodes at the same time, using fake
identities to disrupt the activities of the network by crashing it. Routing Attack
• The information of blockchains can be intercepted by hackers by compromising ISPs.
• The compromised Internet Service Providers can also be the cause of this type of
attack.
Direct Denial of Service
• DDoS attacks are also a major security issue for blockchain applications.
• In this attack, hackers flood the network with false requests consequently increasing the
traffic of the network and disrupting legitimate requests or they target applications with
the low and slow attacks to make these applications unavailable for its users. Some of the
most common issues
• 51% vulnerability
• Private key security
• Exchange hacks
• Social engineering
• Double spending
• Transaction privacy leakage. 51% vulnerability
• Blockchain’s consensus mechanism has a 51% security vulnerability that can be exposed
by malicious attackers in an attempt to control the network.
• PoW - a 51% attack occurs when a single miner or a pool of miners own more than 50%
of total hashing power.
• PoS - a 51% attack can be performed by a single miner who owns more than 50% of all
the funds.
• a 51% attack would be extremely expensive to undertake.
• Smaller blockchains that have less hashing power are more vulnerable to such attacks.
19
Private key security (wallet security)
• blockchains today, public and private keys are generated using the elliptical curve digital
signature algorithm (ECDSA).
• The public key can be derived from the private key, but not vice-versa.
• While the public key can be shared and used as the address for sending transactions, the
private key should always be kept safe, known only to the owner.
• In spite of the blockchains being inherently secure structures, their security is directly
related to the private key.
• private key will give an attacker access to one’s blockchain wallet.
• Once lost, private keys cannot be recovered.
• If the private key is by any chance stolen by attackers, it will give them full access to the
associated blockchain account and the opportunity to initiate transactions
• Since the blockchain is not controlled by any centralized authority, it is difficult to track
and recover the lost funds or information.
Exchange hacks
• Exchange is considered as quick investment return.
• For the exchange to work, the users are register their wallets in third party databases.
• It is prone to attacks
• The safest methods of storing cryptocurrency are either using hardware or paper wallets.
• These wallets are so-called cold storage wallets that have minimal exposure to malicious
online attacks.
• Solution: perform trading on decentralized exchanges (DEX) as they communicate directly
with the cryptocurrency wallet. Social engineering attack
• Manipulate individuals into uncovering and sharing their private keys, passwords, and
other sensitive information that can be used for fraudulent purposes
• Phishing - the attacker impersonates a trustful resource and sends out messages,
notifications, and emails requiring the victims to click on malicious links, fill out forms,
and give out their sensitive information.
• Scenario involves the attacker using the domain name similar to the legit one.
Social engineering attacks - Solutions
• To avoid falling prey to a phishing scam, make sure to:
• Never share login credentials or private keys.
• Educate yourself and the people around you about common cases of social engineering.
20
• Never click on the email attachments, links, ads, or websites of unknown origin.
• Use anti-malware software and keep the software applications and operating systems
updated.
• Use multi-factor authentication solutions whenever possible. Double spending attacks
• Double-spending is a situation in which the same digital funds are spent multiple times.
• In the blockchain-based decentralized network, a reliable consensus mechanism has to
be put in place to prevent double-spending.
• Bitcoin network, double spending attacks are prevented by evaluating and verifying the
authenticity of each transaction using the transaction logs stored in Bitcoin’s blockchain
protocol.
Transaction privacy leakage
• In public blockchain networks, transactions are open and transparent.
• Their architecture makes every transaction traceable as well.
• Transactions could contain sensitive information about their issuers.
• In some blockchain applications, such as the internet of things or mobilecrowdsourcing,
transaction privacy leakage is a critical issue.
• Solution : mixing service (cryptocurrency tumbler).
IPFS (InterPlanetary File System) is a peer to peer, version controlled, content-addressed file system.
It makes use of Computer Science concepts like Distributed Hash Table, BitSwap (Inspired by
BitTorrent), MerkleDag (Inspired by The Git Protocol).
History:
IPFS was created by Juan Bennet at Protocol Labs in 2015. There are multiple applications currently
being built on top of IPFS.
Description:
The current default way to exchange data across the Internet is HTTP, but it fails in some cases. Large
files cannot be transferred using HTTP, data is not permanent on HTTP, HTTP mainly uses a Client-
Server protocol which leads to low latency and makes it difficult to establish a peer to peer connection,
also real-time media streaming is difficult on HTTP. All of these failures are overcome using IPFS.
Unlike HTTP which is IP addressed, an IPFS network is content addressed. Which means, when any
data is uploaded on an IPFS network, it returns a Hash and the data is then requested using that hash.
Anyone can provide storage on the IPFS network and everyone is incentivized with crypto tokens.
Data is distributed and replicated throughout the network which leads to data permanence. While
requesting data it searches for the nearest copy of that data which leads to high latency and overcomes
any bottleneck points. As the data is completely distributed, it has no scope for the centralization of
data.
IPFS could be seen as a single BitTorrent swarm, exchanging objects within one Git repository.
21
-Juan Bennet (IPFS Whitepaper)
Distributed Hash Table: It is used to store and retrieve data across nodes in the network. It is a class
which is similar to hash tables. Using a DHT, any node on the network can request the value
corresponding to a hash key.
Block Exchange: It is used in the BitTorrent Protocol (also known as BitSwap) to exchange data
between nodes. It is a peer to peer file sharing protocol which coordinates data exchange between
untrusted swarms.It uses a tit for tat strategy which rewards nodes that contribute to each other and
punishes nodes that only request resources. This helps an IPFS node in retrieving multiple parts of
data parallelly.
Merkle DAG: It uses a Merkle Tree or a Merkle DAG similar to the one used in the Git Version
Control system. It is used to track change to files on the network in a distributed-friendly way. Data
is content-addressed, by the cryptographic hash of the content.
IPFS Nodes: Every node on the network is identified using a NodeID which is nothing but the hash
of its public key. Everyone on the network can store files on their local storage and they are
incentivized to do so. Each node maintains a DHT which is used to find out Ids of other peers on the
network and what data those peers can serve.
Advantages of IPFS:
• Users in a local network can communicate with each other, even if the Wide Area network is
blocked for some reason.
• Since no servers are required, creators can distribute their work without any cost.
• Data load faster as it has higher bandwidth.
Disadvantages of IPFS:
• IPFS installation has a lot of hassles, it is not at all user friendly.
• IPFS consumes a lot of bandwidth which is not appreciated by metered internet users.
• IPFS currently is used by tech enthusiasts and normal people don’t tend to set up their own
node, which leads to the shortage of nodes on the network.
Non-fungible tokens (NFTs) are assets like a piece of art, digital content, or video that have been
tokenized via a blockchain. Tokens are unique identification codes created from metadata via an
encryption function. These tokens are then stored on a blockchain, while the assets themselves are
stored in other places. The connection between the token and the asset is what makes them unique.
NFTs can be traded and exchanged for money, cryptocurrencies, or other NFTs—it all depends on
the value the market and owners have placed on them. For instance, you could draw a smiley face on
a banana, take a picture of it (which has metadata attached to it), and tokenize it on a blockchain.
Whoever has the private keys to that token owns whatever rights you have assigned to it.
Cryptocurrencies are tokens as well; however, the key difference is that two cryptocurrencies from
22
the same blockchain are interchangeable—they are fungible. Two NFTs from the same blockchain
can look identical, but they are not interchangeable.
Key Takeaways
• NFTs (non-fungible tokens) are unique cryptographic tokens that exist on a blockchain and
cannot be replicated.
• NFTs can represent digital or real-world items like artwork and real estate.
• "Tokenizing" these real-world tangible assets makes buying, selling, and trading them more
efficient while reducing the probability of fraud.
• NFTs can represent individuals' identities, property rights, and more.
• Collectors and investors initially sought NFTs after the public became more aware of them,
but their popularity has since waned.
As tokens are minted, they are assigned a unique identifier directly linked to one blockchain address.
Each token has an owner, and the ownership information (i.e., the address in which the minted token
resides) is publicly available. Even if 5,000 NFTs of the same exact item are minted (similar to
general admission tickets to a movie), each token has a unique identifier and can be distinguished
from the others.
Many blockchains can create NFTs, but they might be called something different. For instance, on
the Bitcoin blockchain, they are called Ordinals. Like an Ethereum-based NFT, a Bitcoin
Ordinal can be bought, sold, and traded. The difference is Ethereum creates tokens for the asset,
while Ordinals have serial numbers (called identifiers) assigned to satoshis—the smallest bitcoin
denomination.
Like physical money, cryptocurrencies are usually fungible from a financial perspective, meaning
that they can be traded or exchanged, one for another. For example, one bitcoin is always equal in
value to another bitcoin on a given exchange, similar to how every dollar bill of U.S. currency has
an implicit exchange value of $1. This fungibility characteristic makes cryptocurrencies suitable as
a secure medium of transaction in the digital economy.
For this reason, NFTs shift the crypto paradigm by making each token unique and irreplaceable,
making it impossible for one non-fungible token to be "equal" to another. They are digital
representations of assets and have been likened to digital passports because each token contains a
unique, non-transferable identity to distinguish it from other tokens. They are also extensible,
meaning you can combine one NFT with another to create a third, unique NFT—the cryptocurrency
industry calls this "breeding."
Examples of NFTs
23
Perhaps the most famous use case for NFTs is that of cryptokitties. Launched in November
2017, cryptokitties are digital representations of cats with unique identifications on Ethereum’s
blockchain. Each kitty is unique and has a different price. They "reproduce" among themselves and
create new offspring with other attributes and valuations compared to their "parents."
Within a few short weeks of their launch, cryptokitties racked up a fan base that spent millions in
ether to purchase, feed, and nurture them.
Much of the earlier market for NFTs was centered around digital art and collectibles, but it has
evolved into much more. For instance, the popular NFT marketplace OpenSea has several NFT
categories:
• Photography: Photographers can tokenize their work and offer total or partial ownership. For
example, OpenSea user erubes1 has an "Ocean Intersection" collection of beautiful ocean and
surfing photos with several sales and owners.
• Sports: Collections of digital art based on celebrities and sports personalities.
• Trading cards: Tokenized digital trading cards. Some are collectibles, while others can be
traded in video games.
• Utility: NFTs that can represent membership or unlock benefits.
• Virtual worlds: Virtual world NFTs grant you ownership of anything from avatar wearables
to digital property.
• Art: A generalized category of NFTs that includes everything from pixel to abstract art.
• Collectibles: Bored Ape Yacht Club, Crypto Punks, and Pudgy Panda are some examples of
NFTs in this category.
• Domain names: NFTs that represent ownership of domain names for your website(s)
• Music: Artists can tokenize their music, granting buyers the rights the artist wants them to
have.
Benefits of NFTs
Perhaps the most apparent benefit of NFTs is market efficiency. Tokenizing a physical asset can
streamline sales processes and remove intermediaries. NFTs representing digital or physical
artwork on a blockchain can eliminate the need for agents and allow sellers to connect directly with
their target audiences (assuming the artists know how to host their NFTs securely).
Investing
NFTs can also be used to streamline investing. For example, consulting firm Ernst & Young
developed an NFT solution for one of its fine wine investors—by storing wine in a secure
environment and using NFTs to protect provenance.
Real estate can also be tokenized—a property could be parceled into multiple sections, each
containing different characteristics. For example, one of the sections might be on a lakeside, while
another is closer to the forest. Depending on its features, each piece of land could be unique, priced
differently, and represented by an NFT. Real estate trading, a complex and bureaucratic affair, could
then be simplified by incorporating relevant metadata into a unique NFT associated with only the
corresponding portion of the property.
NFTs can represent ownership in a business, much like stocks—in fact, stock ownership is already
tracked via ledgers that contain information such as the stockholder's name, date of issuance,
certificate number, and the number of shares. A blockchain is a distributed and secured ledger, so
issuing NFTs to represent shares serves the same purpose as issuing stocks. The main advantage to
using NFTs and blockchain instead of a stock ledger is that smart contracts can automate ownership
transferral—once an NFT share is sold, the blockchain can take care of everything else.
Security
Non-fungible tokens are also very useful in identity security. For example, personal information
stored on an immutable blockchain cannot be accessed, stolen, or used by anyone who doesn't have
24
the keys.
NFTs can also democratize investing by fractionalizing physical assets. Fractionalized ownership
through tokenization can extend to many assets. For instance, a painting need not always have a
single owner—tokenization allows multiple people to purchase a share of it, transferring ownership
of a fraction of the physical painting to them.
While there are numerous benefits for creators, owners, investors, and other interested parties, there
are several issues that should concern you if you're considering investing or minting NFTs.
The token represents ownership via hashed metadata and matching key pairs generated by your
wallet. The image, video, music, or other digitized item can be copied and circulated without your
permission using various techniques. It's very easy to copy an image by right-clicking on it and
saving it. The person who does this to a tokenized digital asset is pirating the asset because there is
established ownership. However, it is up to the owner to locate and file charges against the
multitudes of people who might do this.
Non-fungible tokens are also very limited by their liquidity. They attract a specific audience of
collectors or buyers because they are much more specific than cryptocurrencies. If you find yourself
holding an NFT you no longer want, it might be difficult to find a buyer if that type is no longer
popular.
DeFi (or “decentralized finance”) is an umbrella term for financial services on public
blockchains, primarily Ethereum. With DeFi, you can do most of the things that banks support
— earn interest, borrow, lend, buy insurance, trade derivatives, trade assets, and more — but it’s
faster and doesn’t require paperwork or a third party. As with crypto generally, DeFi is global,
peer-to-peer (meaning directly between two people, not routed through a centralized system),
pseudonymous, and open to all.
Why is DeFi important?
DeFi takes the basic premise of Bitcoin — digital money — and expands on it, creating an entire
digital alternative to Wall Street, but without all the associated costs (think office towers, trading
floors, banker salaries). This has the potential to create more open, free, and fair financial markets
that are accessible to anyone with an internet connection.
What are the benefits?
• Open: You don’t need to apply for anything or “open” an account. You just get access by
creating a wallet.
• Pseudonymous: You don’t need to provide your name, email address, or any personal
information.
• Flexible: You can move your assets anywhere at any time, without asking for permission,
waiting for long transfers to finish, and paying expensive fees.
25
• Fast: Interest Rates and rewards often update rapidly (as quickly as every 15 seconds),
and can be significantly higher than traditional Wall Street.
• Transparent: Everyone involved can see the full set of transactions (private corporations
rarely grant that kind of transparency)
How does it work?
Users typically engage with DeFi via software called dapps (“decentralized apps”), most of which
currently run on the Ethereum blockchain. Unlike a conventional bank, there is no application to
fill out or account to open.
Here are some of the ways people are engaging with DeFi today:
• Lending: Lend out your crypto and earn interest and rewards every minute - not once per
month.
• Getting a loan: Obtain a loan instantly without filling in paperwork, including extremely
short-term “flash loans” that traditional financial institutions don’t offer.
• Trading: Make peer-to-peer trades of certain crypto assets — as if you could buy and sell
stocks without any kind of brokerage.
• Saving for the future: Put some of your crypto into savings account alternatives and earn
better interest rates than you’d typically get from a bank.
• Buying derivatives: Make long or short bets on certain assets. Think of these as the
crypto version of stock options or futures contracts.
3 Payment methods
Cryptocurrencies, both Bitcoin and Ethereum development , can be used as forms of payment.
The characteristics of smart contracts and blockchain make Ethereum a very advantageous means
of payment.
Instead of depending on the honesty of a third party or a banking entity, smart contracts can
manage the transaction , encoding each step of the sale. In this sense, since the blockchain is
public and transparent, anyone can review the transaction information, and since it is immutable,
it cannot be manipulated or duplicated.
In this sense, Ethereum could be used to send international remittances, a business that moves
about $500 billion a year. Today, sending large amounts of money between countries is a slow
and expensive process, as it can take days. However, with Ethereum the sending of remittances
can be immediate and, in addition, completely free of charges , as it can be done directly between
users, without the intermediation of a banking entity.
27
5 Create a voting system
When talking about use cases, Vitalik Buterin himself, co-creator of Ethereum, has pointed out
on more than one occasion that his blockchain could be used to create a transparent voting system
that could be implemented in countries with unstable democracies or in danger.
With Ethereum it would be impossible to manipulate the results of an election, since each vote
would be recorded in the blockchain and, since no person or entity has the power to change the
records, it would be impossible to change the results of the elections. In addition, each vote would
be visible to everyone, so any organization could contrast and review the results of an election.
9 Supply chain
Blockchain can reduce costs and improve transparency. This would be possible
since Ethereum would create its own network in which most of the bureaucratic processes that
complicate logistical processes and increase final costs could be eliminated.
It could also improve the current understanding of the flow of trade , as we would have a system
to track and trace products in real time at each stage of the journey. In this way, we could better
understand the risks associated with each stage and improve their management.
Thanks to blockchain technology, brands could maintain real-time tracking of their products. For
example, a high-end brand could track a shipment between Spain and China, recording all the
29
details of each point along the way, such as the temperature of the containers and the ports at
which it has stopped. In this way, brands can prevent counterfeits or claim liability in case of
poor cargo handling.
10 Social programs
In 2018, the Center for Social Innovation at Stanford Business School analyzed the work of 193
organizations, initiatives and projects that use blockchain for social and public work.
This study found that 86% of these initiatives were making real progress in solving public
problems. For example, some organizations are creating a blockchain system to create a credit
system that protects the more than 2 billion people excluded from the banking system .
Another real-world use case for erc20 token development service would be to record and track
nonprofit donations. In some cases, such as money donated to help with natural disaster recovery,
30% of donations are lost or diverted. Thanks to the immutability of the blockchain, donations
are recorded and, therefore, fraud and diversion of funds can be prevented.
30