0% found this document useful (0 votes)
57 views

Evolution of Digital Assets (BlockChain, WEB3, NFT)

This book provides a high level overview of blockchain technology and its algorithms, the evolution of Web 3.0, and the rise of Non-Fungible Tokens (NFTs).

Uploaded by

Adnan Pervaiz
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)
57 views

Evolution of Digital Assets (BlockChain, WEB3, NFT)

This book provides a high level overview of blockchain technology and its algorithms, the evolution of Web 3.0, and the rise of Non-Fungible Tokens (NFTs).

Uploaded by

Adnan Pervaiz
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/ 57

World OF Digital

Assets
Evolution of
Blockchain,WEB3 ,NFTs

Adnan Pervaiz
Network & Cloud Architect
1
Blockchain
World of Digital Assets

The "World of Digital Assets" refers to the rapidly evolving ecosystem of technologies, financial instruments, and platforms
centered around digital, blockchain-based, and tokenized assets. This landscape includes a variety of assets that exist in
digital form, often leveraging decentralized networks and cryptographic principles for security, transparency, and efficiency.
Here’s a detailed look at the key components:

The future holds significant potential for digital assets. As the technology matures and more use cases emerge, industries
like finance, real estate, entertainment, and healthcare will likely be transformed. Increased institutional adoption,
regulatory clarity, and advancements in security will help shape a more robust ecosystem for digital assets.

In summary, the world of digital assets is diverse and dynamic, ranging from cryptocurrencies and NFTs to tokenized
physical assets and decentralized financial systems. This ecosystem is disrupting traditional industries and creating new
opportunities for investors, innovators, and consumers.
Blockchain Basic Concepts

Blockchain platforms provide the infrastructure and tools necessary to build and deploy decentralized applications and
blockchain networks. Hyperledger, Corda, and Polkadot are three prominent blockchain platforms, each with its own
unique characteristics and use cases. Here's an overview of each:
1. Hyperledger
Overview: Hyperledger is an open-source project hosted by the Linux Foundation. It is a collection of blockchain
frameworks and tools designed for enterprise use, providing a modular approach to building blockchain applications.
Key Components:
Hyperledger Fabric: The most popular framework under the Hyperledger umbrella, Fabric is designed for permissioned
networks, where participants are known and trusted. It allows for the creation of private channels and supports smart
contracts (called "chaincode").
Hyperledger Sawtooth: A modular blockchain platform designed for versatile deployment in various industries. It
supports a consensus algorithm called Proof of Elapsed Time (PoET).
Hyperledger Besu: An Ethereum client designed for enterprise use, supporting both permissioned and public Ethereum
networks.
Blockchain Basic Concepts
Key Features:
Permissioned Network: Hyperledger platforms typically operate in a permissioned environment, meaning participants are
known and verified, which enhances privacy and security.
Modularity: Components like consensus, membership services, and smart contracts can be customized based on specific
use cases.
Smart Contracts (Chaincode): Supports writing smart contracts in languages like Go, Java, and JavaScript.
Use Cases:
Supply chain management  In 1956, IBM manufactured the
305 RAMAC, a 5MB hard drive
Healthcare unit which (literally) weighed a
Financial services ton.
Government

Blockchain is a
disruptive
Technology
Blockchain Basic Process

Users initiate
Users Broadcast One or more Nodes aggregate
transactions
their Nodes begin validated
using their
transactions to validating each transactions into
Digital
Nodes transaction Blocks
Signatures

1 2 3 4
Block reflecting
Nodes Broadcast
Consensus “true state” is
Blocks to each
protocol used chained to prior
other
Block

5 6 7
Blockchain Basic Concepts
Blockchain: a growing list of records, called blocks, that are linked using cryptography.
Block Hash: 001 002 003 004 005
Block: Confirmed Confirmed Confirmed Confirmed Confirmed
Transactions Transactions Transactions Transactions Transactions
Confirmed Transactions T1… T4… T7… T10… T13…
T2… T5… T8… T11… T14…
T3… T6… T9… T12… T15…
Previous Block Hash: 000 001 002 003 004
Genesis Block

1 2 3 4 5

1) Ledger: Kind of database where confirmed transactions are recorded.

2) Node: Electronic devices like computer, laptop, mobile etc.

3) Block: Each batch is called a Block.

4) Transaction: Text update from outside and handled in batches.

5) Mining: Process of adding transactions to a blockchain is called mining.

6) Miner: Anyone who can create a block in public blockchain.

7) Platforms: IBM, Amazon Blockchain, Stellar etc.

8) Types: Public, Private Hybrid/ Consortium. 7


Blockchain Basic Concepts
Key Features Immutable
Scalability • Encryption
• Decentralized

Challenges Scalability (V,H)


• Energy Consumption
Security Decentralization
• Money Laundering

Current Issues Transaction Throughput


• Network Latency
Throughput
• Security

Response Memory
Time Usage

Network
CPU Usage
Usage

8
Blockchain Basic Process
Miners

Mining Unconfirmed Written by Public


Transaction

Puzzle/
Consensus Algorithm

Genesis Block
001 002 003 004 005 006
Confirmed Confirmed Confirmed Confirmed Confirmed Confirmed
Transactions Transactions Transactions Transactions Transactions Transactions
New
T1… T4… T7… T10… T13… T13…
T2… T5… T8… T11… T14… Block
T14…
T3… T6… T9… T12… T15… T15…
000 0001 002 003 004 005 Node

1 2 3 4 5
Each NODE has a copy of the ledger.

Fig: Unconfirmed to Confirmed Transaction and creation of new Block

Key Features Challenges Current Issues Platform

✓ Immutable ✓ Scalability ✓ Transaction Throughput


✓ Encryption ✓ Energy consumption ✓ Network Latency Node

✓ Decentralized ✓ Money laundering ✓ Consensus System


✓ Open to everyone ✓ Personal responsibility ✓ Security etc. Block

✓ No need for Intermediaries


✓ Consistent state across all participants
✓ Resistant against malicious participants Transactions

9
 Blockchain is a disruptive technology:

Trust Blockchain D Apps

How to digitally time stamp an electronic document, 1991 research paper

Blockchain is a distributed immutable ledger which is completely transparent


Applications Of Blockchain
Blockchain applications:
• Hashing Algorithm
• Product tracking Block No.
• Coffee, IKEA ect
• smart contract
• Food/ medicine delivery Data
• health system
• Hospital to hospital isolation system Block Hash
• international wire Transfer Previous Block
• Banking transfer from Pak to US Hash
• High fee, high time
Scalability Problems with BlockChain
Number of users of blockchain directly impact the scalability issues of blockchain.
Performance metrics
I. Transaction Throughput
II. Transaction Confirmation Latency

Scalability Types

Blockchain Scalability
System achieves a higher TPS through adjusting some system parameter(s).
Scalability Improvement Approaches
Layer-0 Data Propagation Erlay, Kadcast, Velocity, BloXroute

SegWit, Bitcoin-Cash, Compact Block Relay, Txilm,


Block Data
CUB

Consensus BitCoin-NG, Algorand, Snow White, Ouroboros


Scalability Layer-1
Achieving (On-Chain) Sharding Elastico, OmniLedger, RapidChain, Monoxide
Techniques
Inclusive, SPECTRE, PHANTOM, Conflux, Dagcoin,
DAG
IOTA, Byteball, Nano

Payment Channel Lightning Network, DMC, Raiden Network, Sprites

Side Chain Pegged SideChain, Plasma, Liquidity Network


Layer-2
(Non On-Chain) Cross-Chain Cosmos, Polkadot

Off-Chain Computation Truebit, Arbitrum


13
Blockchain Architecture
T0 T2 T4 T6 T8
T1 T3 T5 T7 T9

Conventional BlockChain Architecture

Zone 1 Zone 2 Zone 3

T1 T3 T3 T3
Zone T1 T1 T2 T2 T2 2 3
2 3 1
2 3 1
1
Node

Blockchain
T1 T1 T1 T2 T 22 T2 T3 T3 T3
3 2 3
Transaction 2 3 1 1
1

Asynchronous Consensus Zones Architecture


14
Scalability Improvement Approaches
• Each step involve a single zone. Those steps are relay and executed across zones by miners.
II. Eventual atomicity

Fetch Relay Execute

Zone-1 Zone-2

T T T T T T
0 2 4 0 2 4
TT T T TT T T
T T
16 83 5 16 83 5
1 1
T T T T
0 0
7 9 7 9

Step 1 Step 2 Step 3


15
1. Data Propagation:
Layer-0
Faster block propagation leads to larger blocks and shorter block intervals, thereby increasing transaction throughput.

Paper Name Description Result

Reduce overall bandwidth


1.Erlay Optimizes Bitcoin’s transaction relay protocol consumption while increasing
the propagation latency

Efficient Bandwidth
2.Kadcast Efficient block propagation approach based on overlay structure of Kademlia.
consumption
Block propagation improvement by utilizing Fountain code, a kind of erasure Reduce the amount of data be
3.Velocity
code propagated

Blockchain Distribution Network (BDN) that helps individual nodes to


4.BloXroute Faster Block creation
propagate transactions and blocks more quickly

1. G. Naumenko, G. Maxwell, P. Wuille, S. Fedorova, and I. Beschastnikh, “Bandwidth-efficient transaction relay for bitcoin,” arXiv preprint arXiv:1905.10518, 2019.
2. E.RohrerandF.Tschorsch,“Kadcast:Astructuredapproachtobroadcast in blockchain networks,” in Proceedings of the 1st ACM Conference on Advances in Financial Technologies. ACM, 2019, pp. 199–213.
3. N.Chawla,H.W.Behrens,D.Tapp,D.Boscovic,and K.S.Candan,“Velocity: Scalability improvements in block propagation through rateless erasure coding,” in 2019 IEEE International Conference on Blockchain and Cryptocurrency (ICBC). IEEE, 2019, pp. 447–454.
4. Uri Klarman, Soumya Basu, Aleksandar Kuzmanovic and Emin Gun Sirer "bloXroute: A Scalable Trustless Blockchain Distribution Network WHITEPAPER"

16
Layer-1
1. Block Data: (On-Chain)
Scalability problem has a certain relevance with block size, Block compression.
Paper Name Description Result
Splitting the transaction into two segments, removing the unlocking
1. Segregated Witness signatures from the original transaction hashes, and the new Witness Enhanced Block creating
structure will contain both the scripts and signatures
2. Bitcoin-Cash Increased Block size 1Mb to 8 Mb and 32 Mb More transactions in one block
A compact block contains the header of the block and some short
3. Compact Block Relay transaction IDs (TXIDs), which will be used for matching transactions that Faster Block creation
are already available to the receivers.
4. Txilm Compresses transactions in each block Save the bandwidth.
Minimize the total query cost,
Different nodes into a Consensus Unit. In each unit, each node stores part reduces the storage overhead
5. CUB
of the block data. of each node while ensuring
the throughput and latency.
Significantly reduces
6. Bitcoin-NG Transactions can be processed continually until the next leader is elected. transaction confirmation time
and improves the scalability.

1. E. Lombrozo, J. Lau, and P. Wuille, “Segregated witness (consensus layer),” 2015.


2. “Bitcoin cash,” https://www.bitcoincash.org/.
3. “Bip152,” https://github.com/bitcoin/bips/blob/master/bip-0152.media wiki
4. D. Ding, X. Jiang, J. Wang, H. Wang, X. Zhang, and Y. Sun, “Txilm: Lossy block compression with salted short hashing,” arXiv preprint arXiv:1906.06500, 2019
5. Z.Xu,S.Han,andL.Chen,“Cub,aconsensusunit-basedstoragescheme for blockchain system,” in 2018 IEEE 34th International Conference on Data Engineering (ICDE). IEEE, 2018, pp. 173–184.
6. I. Eyal, A. E. Gencer, E. G. Sirer, and R. Van Renesse, “Bitcoinng: A scalable blockchain protocol,” in 13th USENIX Symposium on Networked Systems Design and Implementation (NSDI 16), 2016, pp. 45–59.
17
Layer-1
(On-Chain)
Paper Name Description Result
Uses bias-resistant public-randomness protocol for shard assignment. It Resilient to Byzantine faults up to a
7. OmniLedger also adopts the data structure blockDAG to make block commitment 1/3 fraction of the participants
parallelly and increase transaction throughput.
Attack mitigation technique,
Cryptocurrency = Byzantine Agreement (BA) protocol + Verifiable Random
8. Algorand adjustment of 500,000 users and
Functions.
achieves high throughput.
9. Snow-white Exploits a random oracle to elect a leader. Efficient Consensus
Participants in Ouroboros Praos utilize a verifiable random function to
10. Ouroboros generate a random number, which will be used to determine whether a Efficient Consensus
participant can be elected as a leader.
Leader is responsible for generating the final decisions on the consensus Efficient Consensus
11. Elastico results of other shards. Finally, the final value will be sent back to update
other shards.
Where each account has its own blockchain, delivering near instantaneous
transaction speed and unlimited scalability. Transactions keep track of Efficient Consensus
12. Nano
account balances rather than transaction amounts, allowing aggressive
database pruning without compromising security.
7. E. Kokoris-Kogias, P. Jovanovic, L. Gasser, N. Gailly, E. Syta, and B. Ford, “Omniledger: A secure, scale-out, decentralized ledger via sharding,” in 2018 IEEE Symposium on Security and Privacy (SP). IEEE, 2018, pp. 583–598.
8. Y. Gilad, R. Hemo, S. Micali, G. Vlachos, and N. Zeldovich, “Algorand: Scaling byzantine agreements for cryptocurrencies,” in Proceedings of the26thSymposiumonOperatingSystemsPrinciples. ACM,2017,pp. 51–68.
9. I. Bentov, R. Pass, and E. Shi, “Snow white: Provably secure proofs of stake.” IACR Cryptology ePrint Archive, vol. 2016, p. 919, 2016.
10. A.Kiayias,A.Russell,B.David,andR.Oliynykov,“Ouroboros:Aprovably secure proof-of-stake blockchain protocol,” in Annual International Cryptology Conference. Springer, 2017, pp. 357–388.
11. L. Luu, V. Narayanan, C. Zheng, K. Baweja, S. Gilbert, and P. Saxena, “A secure sharding protocol for open blockchains,” in Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security. ACM, 2016, pp. 17–30.
12. C. LeMahieu, “Nano: A feeless distributed cryptocurrency network,” Nano [Online resource]. URL: https://nano. org/en/whitepaper (date of access: 24.03. 2018), 2018.
18
Layer-1
(On-Chain)

Paper Name Description Result

RapidChain reveals that the communication overhead per transaction is a major


13. RapidChain bottleneck to the transaction throughput and latency in previous sharding-based Efficient Throughput
protocols
Considerably maintaining
Monoxide is a scale-out blockchain that proposes Asynchronous Consensus Zones
14. Monoxide decentralization and
and scales the blockchain linearly
security of the system
There is no single central entity that manages or coordinates admission of new Efficient Throughput
15. Byteball units into the database, everyone is allowed to add a new unit provided that he
signs it and pays a fee equal to the size of added data in bytes.

Treats each transaction as a block and focuses on faster security confirmations and Efficient Throughput
16. Dagcoin
greater throughput.

In IOTA, there is no block, miner and transaction fee involved. Every node can Efficient Throughput
17. IOTA create transactions freely after solving a specific computational task and choose
two previous transactions to validate and approve them if valid

13. M. Zamani, M. Movahedi, and M. Raykova, “Rapidchain: scaling blockchain via full sharding,” in Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security. ACM, 2018, pp. 931–948.
14. J. Wang and H. Wang, “Monoxide: Scale out blockchains with asynchronous consensus zones,” in 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI 19), 2019, pp. 95–112.
15. Churyumov, “Byteball: A decentralized system for storage and transfer of value,” URL https://byteball. org/Byteball. pdf, 2016.
16. S. D. Lerner, “Dagcoin: a cryptocurrency without blocks,” 2015.
17. “Iota,” https://www.iota.org/.
19
Layer-2
1. Payment Channel: (On-Chain)

Temporary off-chain ( Transferring some transactions to this channel to achieve the effect of reducing the transaction volume)

T1 T2 T3 T4 T5 T6 T7 T8 T1 T1 TY1 T12

T1 T1 T9 T10 T11 T1 T1

Paper Name Description Result


Two nodes in Bitcoin establish an off-chain trading channel, in which they can
1. Lightning Network Better TPS
carry out multiple low-latency transactions.
An off-chain scaling solution, enabling near-instant, low-fee and scalable
Better TPS
2. The Raiden Network payments. It’s complementary to the Ethereum blockchain and works with any
ERC20 compatible token.
develops constant locktimes to improve transaction throughput in Payment
Better TPS
3. Sprites channel networks and support incremental deposits and withdrawals without
interrupting the payment channel.

1. “Bitmex-the lightning network,” https://blog.bitmex.com/the-lightningnetwork/.


2. “Raiden network,” https://raiden.network/.
3. A. Miller, I. Bentov, S. Bakshi, R. Kumaresan, and P. McCorry, “Sprites and state channels: Payment networks that go faster than lightning,” in International Conference on Financial Cryptography and Data Security. Springer, 2019, pp. 508–526.

20
Layer-2
(On-Chain)

Paper Name Description Result

Transferring assets from parent chain to side chain by the Two-way peg protocol
4. Pegged SideChain Efficient Processing
proposed in Pegged Sidechains.
Plasma is a framework of sidechain attached to the Ethereum main chain. Its root
5. Plasma is a smart contract running on the main chain, which records the rules and the Efficient Processing
state hash of the sidechain.
The previous state-channel solutions require at least one transaction on the
parent chain when a channel is established, and also have the drawback that the
6. Liquidity Network Efficient Processing
transaction funds need to be saved in the trading channel as a deposit and the
transaction channel relies on complex routing topologies.
An ecosystem of connected blockchains. The network is comprised of many
independent blockchains, each of which is called a zone. Powered by consensus
7. Cosmos algorithms like Tendermint consensus, those zones can communicate with each Efficient Processing
other via their InterBlockchain Communication (IBC) protocol, allowing
heterogeneous chains to exchange values (i.e. tokens) or data with each other.
4. A. Back, M. Corallo, L. Dashjr, M. Friedenbach, G. Maxwell, A. Miller, A. Poelstra, J. Timón, and P. Wuille, “Enabling blockchain innovations with pegged sidechains,” URL: http://www. opensciencereview. com/papers/123/enablingblockchain-innovations-with-
peggedsidechains, p. 72, 2014.
5. “Minimal viable plasma,” https://ethresear.ch/t/minimal-viable-plasma/4 26.
6. “liquidity.network,” https://liquidity.network/.
7. “Cosmos,” https://cosmos.network/whitepaper.

21
Layer-2
(On-Chain)

Paper Name Description Result


Outlined a multi-chain protocol that provides a relay-chain to connect Interoperability,
heterogeneous blockchains. Relay-chain enables an independent blockchain, for Efficient Processing
8. Polkadot
example ‘parachain’ in Polkadot, to exchange information and trust free inter-chain
transactability
System for verifiable computation that outsources complex computing tasks to an Efficient Processing
9. Truebit offchain market. Such the off-chain market executes the tasks and verifies the results
and finally submits them back to the main chain.
By moving the computation of verifying smart contracts off-chain. In Arbitrum,
Improves the
Verifier is a global role that validates transactions, e.g., Miners in Bitcoin. It utilizes a
10. Arbitrum scalability of smart
Virtual Machine to implement a contract that owns a fund, which cannot be
contracts
overspent by any execution of the contract.

8. G.Wood,“Polkadot:Visionforaheterogeneousmulti-chainframework,” White Paper, 2016.


9. J. Teutsch and C. Reitwiessner, “Truebit–a scalable verification solution for blockchains.(2018),” 2018.
10. H. Kalodner, S. Goldfeder, X. Chen, S. M. Weinberg, and E. W. Felten, “Arbitrum: Scalable, private smart contracts,” in 27th{USENIX}Security Symposium ({USENIX}Security 18), 2018, pp. 1353–1370

22
Comparison Among the Consensus Algorithms
Consensus Blockchain
Programming Languages Smart Contracts Pros Cons
Algorithms Platform
Less opportunity for 51% attack Greater energy consumption
PoW Bitcoin C++ No
Better Security Centralization of Miners
Energy efficient
PoS NXT Java Yes Nothing-at-stake problem
More decentralized
Energy efficient
Partially centralized
DPoS Lisk JavaScript No Scalable
Double spend attack
Increased security
Fair usage
LPoS Waves Scala Yes Decentralization Issue
Lease Coins
Hyperledger Python, JavaScript, Go, C++, Need for specialized hardware
PoET Yes Cheap participation
Sawtooth Java, and Rust Not good for Public Blockchain
JavaScript, Python, Java REST No Need for Confirmation Communication Gap
PBFT Hyperledger Fabric Yes
and Go Reduction in Energy Sybil Attack
Good Security
SBFT Chain Java, Node, and Ruby No Not for Public Blockchain
Signature Validation
Python,.NET, Java, C++, C, Go, Scalable
DBFT NEO Yes Conflictions in the Chain
Kotlin, JavaScript Fast
Javascript, Rust, Java Go, and Low cost network Implementation gaps
DAG IOTA In Process
C++ Scalability Not suited for smart contracts
Reduces the probability of the 51% attack Greater energy consumption
POA Decred Go Yes
Equal contribution Double signing
Vesting
PoI NEM Java, C++XEM Yes Decentralization Issue
Transaction partnership
Cheap
Favoring bigger fishes
PoC Burstcoin Java Yes Efficient
Decentralization issue
Distributed
Not for short term investors
PoB Slimcoin Python, C++, Shell, JavaScript No Preservation of the network
Wasting coins
Scalable
PoWeight Filecoin SNARK/STARK Yes Issue with Incentivization 23
Customizable
Hyperledger and Enterprise
Blockchain
Hyperledger and Enterprise Blockchain

• Hyperledger is an open-source project by the Linux Foundation.


• Aimed at advancing cross-industry blockchain technologies.
• Modular architecture, permissioned blockchain, smart contracts.

Hyperledger Frameworks

Hyperledger Fabric: Modular, secure, and private.

Hyperledger Sawtooth: Focus on modularity and flexibility.

Hyperledger Composer: Simplified blockchain application


development.
Hyperledger Fabric
• Hyperledger Fabric is a permissioned blockchain framework for enterprises.
• Designed for private, secure, and scalable blockchain applications.
• Allows for flexible and customizable network configurations.

Key Features of Hyperledger Fabric

1. Modular Architecture
2. Permissioned Network
3. Private and Confidential Transactions
4. Scalability
5. High Security
6. Support for Rich Queries
Hyperledger Fabric

Security in Hyperledger Fabric


• Fabric’s permissioned model ensures only trusted participants join the network.
• Endorsement policies allow for custom validation of transactions.
• Supports advanced cryptographic algorithms for secure data communication.

Use Cases for Hyperledger Fabric


1. Supply Chain Management
2. Financial Services
3. Healthcare
4. Government and Public Sector
Hyperledger Composer

Introduction to Hyperledger Composer


• Hyperledger Composer is a development toolset for building blockchain applications.
• It simplifies blockchain application development on top of Hyperledger Fabric.
• Although deprecated, it was widely used for rapid prototyping.

Key Features of Hyperledger Composer


1. Simplified Blockchain Development
2. Smart Contract Modeling
3. Business Network Definition (BND)
4. Development Tools (CLI, SDKs)
5. REST API Integration
6. Automated Chaincode Deployment
ChainCode

What is Chaincode?
• Chaincode is the smart contract in Hyperledger Fabric.
• It defines business logic for managing assets and automating transactions.
• Chaincode interacts with the blockchain ledger to read and update data.

Key Features of Chaincode

1. Written in multiple languages (Go, JavaScript, Java).


2. Encodes business logic and manages assets.
3. Runs in secured Docker containers on peers.
4. Implements endorsement policies for transaction validation.
ChainCode

Chaincode Lifecycle
1. Develop: Write chaincode using Go, JavaScript, or Java.
2. Package: Bundle the chaincode for deployment.
3. Install: Deploy the chaincode on the peer nodes.
4. Instantiate: Define endorsement policies.
5. Upgrade: Update chaincode as business logic evolves.

How Chaincode Interacts with the Ledger


• Chaincode reads from and writes to the ledger.
• The ledger consists of the blockchain and the world state.
• Chaincode defines transactions that modify assets on the world state.
Ethereum Blockchain

Ethereum is a decentralized, open-source blockchain platform that enables developers to build and deploy
decentralized applications (dApps) and smart contracts. Launched in 2015 by Vitalik Buterin and a team of co-founders,
Ethereum is one of the most widely used and well-known blockchain platforms in the world, second only to Bitcoin in
terms of market capitalization.
While Bitcoin was designed primarily as a digital currency, Ethereum was developed with the broader goal of providing a
platform for decentralized computing. This flexibility has led to Ethereum being the foundation for a wide range of
applications, including decentralized finance (DeFi), non-fungible tokens (NFTs), and more.

The Ethereum Virtual Machine

The Ethereum Virtual Machine or EVM is the runtime environment for smart contracts in Ethereum. It is not only
sandboxed but completely isolated, which means that code running inside the EVM has no access to network, filesystem
or other processes. Smart contracts even have limited access to other smart contracts.

31
Ethereum Blockchain
1. Smart Contracts
Description: Smart contracts are self-executing contracts with the terms of the agreement directly written into code. They
automatically execute and enforce the terms of a contract when predefined conditions are met, without the need for
intermediaries.
Programming Language: Solidity is the most common language used for writing smart contracts on Ethereum, though Vyper
and others can also be used.

2. Ethereum Virtual Machine (EVM)


Description: The Ethereum Virtual Machine (EVM) is a decentralized "world computer" that executes smart contracts. It
provides a runtime environment for smart contracts, enabling them to operate across the Ethereum network in a secure and
predictable manner.
Turing Completeness: The EVM is Turing complete, meaning it can execute any computation that can be described
algorithmically, given enough resources.

3. Ether (ETH)
Description: Ether (ETH) is the native cryptocurrency of the Ethereum network. It is used to pay for transactions and
computational services on the network, such as executing smart contracts. Ether also serves as an incentive for miners and
validators to secure the network.
Gas Fees: Transactions and operations on the Ethereum network require a fee, known as "gas," which is paid in Ether. Gas
fees fluctuate based on network demand and the complexity of the transaction.
32
Ethereum Blockchain

4. Decentralized Applications (dApps)


Description: Ethereum provides a platform for developers to build and deploy decentralized applications (dApps). Unlike
traditional apps, dApps run on a decentralized network, making them resistant to censorship and downtime.
Ecosystem: Ethereum hosts a vast ecosystem of dApps, including DeFi protocols, games, marketplaces, social networks, and
more.
5. Decentralized Finance (DeFi)
Description: DeFi refers to a broad category of financial applications built on blockchain networks, particularly Ethereum,
that aim to recreate traditional financial systems (e.g., lending, borrowing, trading) in a decentralized manner. These
applications are open, interoperable, and typically require no intermediaries.
Examples: Some popular DeFi protocols on Ethereum include Uniswap (decentralized exchange), Aave (lending platform),
and MakerDAO (stablecoin issuance).
6. Non-Fungible Tokens (NFTs)
Description: NFTs are unique digital assets that are often used to represent ownership of digital art, collectibles, or other
items. They are created and traded on Ethereum, with standards like ERC-721 and ERC-1155 defining their structure.
Marketplace: Ethereum hosts various NFT marketplaces, such as OpenSea and Rarible, where users can buy, sell, and trade
NFTs.

33
Ethereum Blockchain

7. Consensus Mechanism
Proof of Work (PoW): Originally, Ethereum used a Proof of Work (PoW) consensus mechanism, similar to Bitcoin, where
miners competed to solve cryptographic puzzles to validate transactions and create new blocks.
Transition to Proof of Stake (PoS): Ethereum has transitioned to a Proof of Stake (PoS) consensus mechanism with
Ethereum 2.0 (also known as "The Merge"). In PoS, validators are chosen to create new blocks and validate transactions
based on the amount of Ether they "stake" as collateral.

8. Ethereum 2.0 (Eth2)


Description: Ethereum 2.0, also known as Eth2, is a series of upgrades aimed at improving the scalability, security, and
sustainability of the Ethereum network. The key features of Eth2 include the transition to PoS and the introduction of
shard chains.
Sharding: Sharding is a technique that involves splitting the Ethereum network into smaller pieces, called shards, to
increase transaction throughput and reduce congestion.

34
Ethereum Blockchain

Use Cases of Ethereum

Decentralized Finance (DeFi): Platforms for lending, borrowing, trading, and other financial services without intermediaries.
Supply Chain Management: Tracking the origin, authenticity, and journey of products across the supply chain.
Digital Identity: Secure and decentralized management of identity information.
Gaming and Virtual Worlds: Platforms where users can own, trade, and interact with digital assets, such as in-game items or
virtual land.
Crowdfunding: Platforms like initial coin offerings (ICOs) and decentralized autonomous organizations (DAOs) for raising
funds.
Conclusion
Ethereum is a powerful and versatile blockchain platform that has revolutionized the way decentralized applications and
smart contracts are built and deployed. With its transition to Ethereum 2.0, it aims to address scalability and energy
efficiency challenges, further solidifying its position as a leader in the blockchain space. Ethereum’s broad ecosystem and
active developer community continue to drive innovation across various industries, making it a cornerstone of the
decentralized web (Web3).

35
Merkle Trees

Merkle trees are a structured way of encoding data for easy verification and better security.
Blockchains use Merkle trees to generate hashes that are used to verify transactions and secure the blocks.
Visual representations of Merkle trees resemble upside-down trees with the root at the top.
The repeated hashing technique used in blockchain Merkle trees is one of the mechanics that contribute to their immutability.

Applications:
Merkle trees are useful in distributed systems where same data should exist in multiple places.
Merkle trees can be used to check inconsistencies.
Apache Cassandra uses Merkle trees to detect inconsistencies between replicas of entire databases.
It is used in bitcoin and blockchain.
Ethereum Blockchain
Key Concepts of a Merkle Tree:
Leaf Nodes:
The bottom-most nodes of the tree, called leaf nodes, contain the hash of individual data elements (e.g., transactions
in a block of a blockchain).
Non-Leaf Nodes:
Above the leaf nodes, non-leaf nodes are formed by concatenating and hashing the hashes of two child nodes. This
process continues upwards, layer by layer, until only one node remains at the top—the Merkle root.
Merkle Root:
The Merkle root is the single hash at the top of the tree, representing the entire data set. It is used as a fingerprint of
the data, ensuring that any change to the underlying data would result in a different Merkle root.
Data Integrity and Efficiency:
Merkle trees allow efficient and secure verification of large data structures. For example, in a blockchain, to verify that
a particular transaction is part of a block, you only need to trace the path from the transaction’s hash up to the Merkle
root, rather than checking the entire block’s content.
Proof of Inclusion:
A Merkle tree enables a concept called Merkle proof (or proof of inclusion). This proof allows someone to verify the
existence of a specific piece of data in a large dataset using a small amount of information (just the hashes along the
path to the Merkle root).
Solidity Coding
Solidity Coding Technique
• Solidity is the programming language for writing smart contracts on the Ethereum blockchain.
• Writing efficient, secure, and maintainable Solidity code is crucial for building robust decentralized applications
(dApps).
• This presentation covers key techniques and best practices for Solidity development.

Smart Contract Design Patterns

- **Factory Pattern:** A contract that deploys other contracts. Useful for managing multiple instances of similar contracts.
- **Proxy Pattern:** Enables upgradeable contracts by separating logic and storage contracts.
- **Pull Payment Pattern:** Prevents reentrancy by allowing users to withdraw funds instead of pushing payments.
- **State Machine Pattern:** Manages contract states, ensuring operations are executed
Solidity Coding Technique
- **Factory Pattern:** A contract that deploys other contracts. Useful for managing multiple instances of similar
contracts.
- **Proxy Pattern:** Enables upgradeable contracts by separating logic and storage contracts.
- **Pull Payment Pattern:** Prevents reentrancy by allowing users to withdraw funds instead of pushing
payments.
- **State Machine Pattern:** Manages contract states, ensuring operations are executed

- **Factory Pattern:** A contract that deploys other contracts. Useful for managing multiple instances of similar
contracts.
- **Proxy Pattern:** Enables upgradeable contracts by separating logic and storage contracts.
- **Pull Payment Pattern:** Prevents reentrancy by allowing users to withdraw funds instead of pushing payments.
- **State Machine Pattern:** Manages contract states, ensuring operations are executed
WEB3 Evolution
WEB3
What is Web3?
• Web3 is the third generation of internet services that focuses on decentralization, blockchain technology, and user
empowerment. It aims to create an internet where users have control over their data, digital identities, and online
activities. Transition from Web1 (static web) to Web2 (interactive/social web) to Web3 (decentralized web).

Evolution of the Web


• Web1 (Static Web): Read-only, static pages, limited interaction.
• Web2 (Social Web): User-generated content, social media, centralized platforms, data monetization by large corporations.
• Web3 (Decentralized Web): Decentralization, blockchain, user control over data, trustless interactions, token economies.

Core Concepts of Web3


- Decentralization: No central authority; data and operations are distributed across a network.
- Blockchain Technology: The foundation of Web3, enabling decentralized applications (dApps) and trustless systems.
- Smart Contracts: Self-executing contracts with the terms of the agreement directly written into code.
- Cryptocurrencies and Tokens: Digital assets that power transactions and governance in Web3 ecosystems.
- Decentralized Applications (dApps): Applications that run on a blockchain rather than centralized servers.
WEB3

Blockchain as the Backbone of Web3


• - Immutable Ledger: Transparent and tamper-proof record of transactions.
• - Consensus Mechanisms: Proof of Work (PoW), Proof of Stake (PoS), and others ensure network security and trust.
• - Smart Contracts: Automate and enforce agreements without intermediaries.
• - Interoperability: Cross-chain communication enables different blockchains to interact.

Real-World Applications of Web3


• - Finance: Decentralized finance (DeFi), payments, remittances.
• - Supply Chain: Transparency, tracking, and verification of goods.
• - Gaming: Play-to-earn models, digital ownership of in-game assets.
• - Social Media: Decentralized social networks, content monetization.
• - Healthcare: Secure data sharing, patient-controlled records.
Smart Contracts

Understanding Smart Contracts


• Definition: Self-executing contracts with the agreement’s terms directly written in code.
• Automation: Triggered automatically when predefined conditions are met.
• Transparency: Visible and verifiable on the blockchain.
• Examples: DeFi protocols, NFTs, DAOs.

The Rise of Decentralized Finance

- Definition: Financial services built on blockchain, removing the need for intermediaries.
- Key Components: Lending, borrowing, trading, yield farming, and stablecoins.
- Benefits: Accessibility, transparency, reduced fees, and no single point of failure.
- Examples: Uniswap, Aave, Compound.
Current Challenges and Limitations
• - Scalability: Blockchain networks still face scalability issues.
• - User Experience: Complexity and technical barriers for non-expert users.
• - Regulation: Legal and regulatory uncertainties in decentralized systems.
• - Energy Consumption: Environmental concerns, particularly with Proof of Work (PoW).
• - Security: Vulnerabilities in smart contracts and DeFi protocols.

What Lies Ahead for Web3?


• - Scalability Solutions: Layer 2 solutions, sharding, and Ethereum 2.0.
• - Interoperability: Cross-chain communication and multi-chain ecosystems.
• - Mainstream Adoption: Increasing use cases, better user interfaces, regulatory clarity.
• - Web3 and AI: Integrating AI with decentralized networks for smarter applications.
• - Sustainability: Transition to more energy-efficient consensus mechanisms.
Key Concepts of Web3:
Decentralization
Web3 is built on decentralized networks, where control is distributed among users rather than centralized in the
hands of a few large companies. This decentralization is primarily achieved through blockchain technology, where
data is stored across a network of nodes rather than on centralized servers.
Blockchain and Cryptocurrencies
Blockchain technology is at the heart of Web3. It enables the creation of decentralized applications (dApps) and
decentralized autonomous organizations (DAOs) that operate without intermediaries. Cryptocurrencies like Bitcoin,
Ethereum, and others are native to Web3 and serve as both a medium of exchange and a way to incentivize
participation in decentralized networks.
Smart Contracts
Smart contracts are self-executing contracts with the terms written into code. They enable trustless transactions and
interactions in Web3, where the rules are enforced automatically without the need for a central authority or
intermediary.
Tokenization
Web3 introduces the concept of tokenization, where digital assets or even physical assets are represented as tokens
on a blockchain. These tokens can be traded, used in decentralized finance (DeFi), or represent ownership of digital
goods like NFTs (non-fungible tokens).
Decentralized Finance (DeFi)
DeFi is a subset of Web3 that seeks to recreate traditional financial systems (such as lending, borrowing, and
trading) in a decentralized manner, removing intermediaries like banks and brokers. DeFi platforms operate on
blockchain networks and allow users to interact directly with financial services.
Self-Sovereign Identity
Web3 promotes the idea of self-sovereign identity, where users own and control their digital identities without
relying on centralized authorities. This approach enhances privacy and security, as users decide what personal
information to share and with whom.
Interoperability
In Web3, different blockchain networks and decentralized applications can interact with each other seamlessly. This
interoperability is key to creating a cohesive decentralized ecosystem where users can move assets and data across
various platforms without friction.
Decentralized Autonomous Organizations (DAOs)
DAOs are organizations governed by smart contracts and managed by their members through a decentralized
governance model. Decisions are made collectively, often through token-based voting, without a central authority.
Ownership and Control of Data
One of the core principles of Web3 is giving users ownership and control over their data. Instead of data being
stored and monetized by centralized platforms, users have the power to decide how their data is used, shared, or
monetized, often through the use of decentralized storage solutions like IPFS (InterPlanetary File System).
Web3 Browsers and Wallets
Web3 requires specialized browsers (like Brave or Opera) and wallets (like MetaMask) that can interact with
decentralized applications and manage cryptocurrencies. These tools allow users to access the Web3 ecosystem
directly from their devices.
Comparison to Previous Web Generations:
Web1 (The Static Web): The early internet, where content was static, and users were primarily consumers of
information. Websites were read-only, and there was little to no interaction.
Web2 (The Social Web): The current internet, characterized by interactivity, user-generated content, and
social media. Web2 is dominated by centralized platforms like Facebook, Google, and Amazon, which control
user data and interactions.
Web3 (The Decentralized Web): The emerging internet, where decentralization, user control, and blockchain
technology redefine online interactions. Web3 emphasizes user ownership, privacy, and trustless systems.
Potential Impact of Web3:
Empowering Users: Web3 shifts power from centralized entities to users, allowing them to control their data,
digital assets, and online identities.
Reducing Censorship: By decentralizing content and interactions, Web3 makes it more difficult for any single
entity to censor or control information.
New Economic Models: Web3 introduces new ways to monetize content and services, such as through token
economies and decentralized finance, which could disrupt traditional business models.
Innovation and Collaboration: The open and interoperable nature of Web3 fosters innovation and
collaboration across different platforms and ecosystems.

Challenges and Criticisms:


Scalability: Many blockchain networks struggle with scalability, which can limit the widespread adoption of
Web3 technologies.
User Experience: The complexity of Web3 technologies can be a barrier to entry for non-technical users, who
may find it challenging to navigate decentralized applications and manage digital wallets.
Regulatory Uncertainty: The decentralized nature of Web3 raises questions about regulation, legal
compliance, and consumer protection in a largely uncharted territory.
Energy Consumption: Some blockchain networks, particularly those using Proof of Work (PoW) consensus
mechanisms, are criticized for their high energy consumption.
Decentralized Applications (Dapps) Overview

• • Dapps are decentralized applications running on a blockchain.

Key Features:
• Open-source
• Decentralized data storage
• Smart contracts for back-end logic
• Tokenization for governance, utility.
• Front-End: User interface (HTML, CSS, JavaScript).
• Smart Contracts: Back-end logic on the blockchain (e.g., Solidity).
• Decentralized Storage: IPFS, Swarm for data storage.
• Token System: Tokens for governance and utility (e.g., ERC-20, ERC-721).
Decentralized Applications (Dapps)
How Dapps Interact with Blockchain
• Wallet Integration: Users connect via digital wallets (e.g., MetaMask).
• Web3.js/Ethers.js: Libraries for blockchain interaction.
• Transaction Process: Users sign transactions which are broadcast to the blockchain.

Real-World Examples of Dapps


• DeFi: Uniswap, Aave, MakerDAO
• NFTs: OpenSea, Rarible, Axie Infinity
• Gaming: Decentraland, CryptoKitties
• Governance: Aragon, DAOstack

Benefits of Dapps
• Censorship Resistance: Decentralized control.
• Transparency: Open-source and verifiable.
• Decentralization: No central authority.
• Incentive Structures: Tokens create a reward ecosystem.
WEB3.js
Web3.js is a collection of libraries that allows you to interact with an Ethereum blockchain easily using JavaScript. It is a
primary tool for creating decentralized applications (Dapps) that run on the Ethereum blockchain.
Key Features of Web3.js:
•Blockchain Interaction: Enables communication between Dapps and the Ethereum network. You can query blockchain
data and send transactions.
•Smart Contracts: Allows developers to interact with Ethereum smart contracts (deployed on the blockchain) via JavaScript.
•Event Listening: Can listen for events emitted by smart contracts, allowing real-time updates in your application.
•Wallet Integration: Works with various wallets like MetaMask to sign and broadcast transactions.
// Import Web3.js
const Web3 = require('web3');

// Connect to an Ethereum node (Infura or a local node)


const infuraUrl = 'https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID'; // Replace with your Infura
Project ID
const web3 = new Web3(new Web3.providers.HttpProvider(infuraUrl));

// Bob's Ethereum account address (the source account)


const bobAddress = '0xBobAccountAddress'; // Replace with Bob's Ethereum address
};
Non-Fungible Token(NFT)
Non-Fungible Tokens(NFTs)
Introduction to NFTs
• Unique digital asset
• Represents ownership of a specific item, verified on a blockchain

How NFTs Work


• Blockchain Technology: How NFTs use blockchain for authenticity and ownership tracking
• Smart Contract
• Ethereum and other blockchains

Types of NFTs
• Categories:
• Digital Art
• Collectibles (e.g., trading cards, virtual pets)
• Music and Videos
• Virtual Real Estate (e.g., in games)
• Domain Names
Non-Fungible Tokens(NFTs)
How to Create and Sell NFTs
• Process Overview:
• Creating (Minting) an NFT
• Choosing a Marketplace (e.g., OpenSea, Rarible)
• Setting Prices (Fixed price, auction)

NFT Marketplaces
• Popular Platforms:
• OpenSea
• Rarible
• Foundation
• SuperRare
Non-Fungible Tokens(NFTs)
NFT Use Cases
• Art and Creativity
• Gaming and Virtual Worlds
• Fashion and Digital Wearables
• Music and Entertainment
• Domain Names and Intellectual Property

Advantages of NFTs

- Provenance and Ownership


- Royalties for Artists
- New Revenue Streams
- Transparency and Security
Non-Fungible Tokens(NFTs)

Challenges and Criticisms


• Environmental Impact (Energy Consumption)
• Market Volatility
• Legal and Regulatory Concerns
• Intellectual Property Risks

Case Studies

• Examples:
• Beeple’s $69 million NFT sale
• Cryptopunks
• NBA Top Shot

You might also like